@duplicati/ngclient 0.0.204 → 0.0.205

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.
Files changed (31) hide show
  1. package/assets/dest-icons/selectel.png +0 -0
  2. package/{chunk-IFP4WWLK.js → chunk-37CUOEGJ.js} +1 -1
  3. package/chunk-4GXIF5HF.js +1 -0
  4. package/{chunk-ZORSGUCK.js → chunk-4RYK5OOO.js} +1 -1
  5. package/{chunk-NG3P67UR.js → chunk-5MHYH7GK.js} +1 -1
  6. package/{chunk-PXULEZKF.js → chunk-5QWAH3QX.js} +1 -1
  7. package/{chunk-IMHM7ISI.js → chunk-AT64P6E5.js} +1 -1
  8. package/{chunk-TX7JDBPD.js → chunk-BT2VIZXE.js} +1 -1
  9. package/{chunk-5I4CGX7S.js → chunk-COPBOHWE.js} +1 -1
  10. package/chunk-DESKT7LH.js +1 -0
  11. package/{chunk-RNYUAYNZ.js → chunk-F3JL4GJQ.js} +1 -1
  12. package/{chunk-QLENTLZJ.js → chunk-G2FJM62F.js} +1 -1
  13. package/chunk-GJKZESBX.js +1 -0
  14. package/{chunk-F6H5V7OU.js → chunk-H4LQO7G2.js} +1 -1
  15. package/{chunk-A2O2XHOB.js → chunk-I3IIG2AK.js} +1 -1
  16. package/{chunk-YN3R7XGF.js → chunk-JN4WCRAH.js} +1 -1
  17. package/{chunk-UNZWYG3U.js → chunk-KV5UORE3.js} +1 -1
  18. package/{chunk-MO72YRC7.js → chunk-LT3AVRVP.js} +1 -1
  19. package/{chunk-TN6HBIUN.js → chunk-LXSHDO5C.js} +1 -1
  20. package/{chunk-RJOLHDBR.js → chunk-M7Y3VPRV.js} +1 -1
  21. package/{chunk-5FCREC3N.js → chunk-MIMGEZMT.js} +1 -1
  22. package/{chunk-TXFTUL4R.js → chunk-MLNK7NFW.js} +1 -1
  23. package/{chunk-OINQP25T.js → chunk-OIYIWMS7.js} +1 -1
  24. package/{chunk-77VFSONV.js → chunk-OPLWAKSM.js} +1 -1
  25. package/{chunk-CB6NK5B2.js → chunk-YLQF5ATT.js} +1 -1
  26. package/index.html +1 -1
  27. package/{main-T6UJTPG4.js → main-HMCIC27B.js} +1 -1
  28. package/package.json +1 -1
  29. package/chunk-2PCEVKZ4.js +0 -1
  30. package/chunk-4I55TVYE.js +0 -1
  31. package/chunk-B5GHHS3A.js +0 -1
@@ -1 +1 @@
1
- import{a as cn}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{b as ee,k as rn}from"./chunk-IMHM7ISI.js";import{b as an}from"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as _n}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ln}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import{a as on}from"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{A as je,B as Z,C as We,E as qe,G as Qe,K as Ye,L as Ze,S as en,T as nn,u as Y}from"./chunk-UNMDSCAN.js";import{c as tn}from"./chunk-CFNARBNK.js";import{e as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as N,Ab as i,Bb as C,Cc as P,Dc as G,E as j,Ec as h,Fb as O,Gb as m,Gc as q,Hb as f,Ib as A,Ma as J,Pa as a,Pb as c,Qb as s,Rb as T,Sb as L,Tb as H,Ub as W,Vb as D,W as x,Xb as r,aa as M,cb as Xe,ec as U,gc as R,hb as I,ib as Je,jc as u,la as X,lc as S,na as ve,oc as Ve,pb as we,pc as Ue,qb as ze,qc as Ke,sb as g,tb as p,ub as w,wb as z,xb as V,xc as K,yb as E,yc as $,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var un=()=>[Q,import("./chunk-ZWLAV6HO.js").then(e=>e.NgTemplateOutlet),Z,Y,qe,nn,en,import("./chunk-UNLX3IVU.js").then(e=>e.DurationFormatPipe),import("./chunk-G4IFZKMI.js").then(e=>e.BytesPipe),import("./chunk-XIYAYCFU.js").then(e=>e.RelativeTimePipe)],Fn=()=>["/add-backup"],Cn=()=>["/restore"],sn=e=>({$implicit:e}),Tn=()=>["/backup/new"],En=e=>["/backup",e],dn=e=>["/restore",e],gn=e=>["/backup",e,"export"],pn=e=>["/backup",e,"delete"],Sn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],mn=e=>["/backup",e,"log"];function Nn(e,t){e&1&&T(0,11,1)}function Mn(e,t){e&1&&T(0,11,2)}function In(e,t){if(e&1&&T(0,11,3),e&2){let n=r(2);L(n.timeType()),H(0)}}function Pn(e,t){if(e&1){let n=A();o(0,"button",56),D("click",function(){let F=N(n).$implicit,d=r(3);return M(d.sortByColumn.set(F.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function fn(e,t){if(e&1&&(o(0,"sh-menu",57)(1,"button",58),c(2,14),C(3,"strong")(4,"sh-icon"),s(),i(),O(5,59),z(6,Pn,2,3,"button",60,w),m(),i()),e&2){let n=r(2);a(4),L(n.orderBy()),H(2),a(2),V(n.sortOrderOptions())}}function Dn(e,t){if(e&1){let n=A();o(0,"div",54)(1,"sh-button-group",55)(2,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("list"))}),c(3,9),C(4,"sh-icon"),s(),i(),o(5,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("details"))}),c(6,10),C(7,"sh-icon"),s(),i()(),o(8,"sh-menu",57)(9,"button",58),c(10,11),o(11,"strong"),g(12,Nn,1,0)(13,Mn,1,0)(14,In,1,1),i(),C(15,"sh-icon"),s(),i(),O(16,59),o(17,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("relative"))}),T(18,12),i(),o(19,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("actual"))}),T(20,13),i(),m(),i(),g(21,fn,8,1,"sh-menu",57),i()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function $n(e,t){if(e&1){let n=A();o(0,"div",65)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()()(),o(7,"div",68)(8,"sh-chip",69),T(9,16),i()(),o(10,"div",54)(11,"button",70),D("click",function(){N(n);let F=r().$implicit,d=r(4);return M(d.openInConsole(F))}),c(12,17),C(13,"sh-icon"),s(),i()()()}if(e&2){let n=r().$implicit,_=r(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," ")}}function Rn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),u(3),P(4,"relativeTime"),i()),e&2){let n=r(2).$implicit,_=r(4);a(3),S(" ",h(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function hn(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r(2).$implicit,_=r(4);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function An(e,t){e&1&&(O(0),u(1,"-"),m())}function Ln(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Hn(e,t){e&1&&(O(0),u(1,"-"),m())}function xn(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Gn(e,t){e&1&&(O(0),u(1,"-"),m())}function kn(e,t){e&1&&(o(0,"sh-chip",69),T(1,24),i())}function yn(e,t){e&1&&f(0)}function Bn(e,t){if(e&1&&(o(0,"div",66)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()(),o(7,"p")(8,"span"),T(9,18),i(),u(10),P(11,"relativeTime"),i(),g(12,Rn,5,4,"p"),o(13,"p")(14,"span"),T(15,19),i(),g(16,hn,2,4)(17,An,2,0,"ng-container"),i(),o(18,"p")(19,"span"),T(20,20),i(),g(21,Ln,2,3)(22,Hn,2,0,"ng-container"),i(),o(23,"p")(24,"span"),T(25,21),i(),g(26,xn,2,3)(27,Gn,2,0,"ng-container"),i()(),o(28,"div",68)(29,"sh-chip",71),T(30,22),i(),g(31,kn,2,0,"sh-chip",69),i(),o(32,"div",54),I(33,yn,1,0,"ng-container",72),i()()),e&2){let n=r().$implicit,_=r(4),F=U(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",h(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(16,sn,n))}}function bn(e,t){if(e&1&&g(0,$n,14,3,"div",65)(1,Bn,34,18,"div",66),e&2){let n=t.$implicit;p(n.Backup.ExternalID?0:1)}}function vn(e,t){if(e&1&&z(0,bn,2,1,null,null,w),e&2){let n=r(3);V(n.backups())}}function Xn(e,t){e&1&&(o(0,"div",64),c(1,25),o(2,"button",73),C(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),E("routerLink",K(1,Tn)))}function Jn(e,t){if(e&1&&(o(0,"div",63),g(1,vn,2,0)(2,Xn,4,2,"div",64),i()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function wn(e,t){e&1&&(c(0,26,1),f(1),s())}function zn(e,t){e&1&&(c(0,27,1),f(1),s())}function Vn(e,t){e&1&&(c(0,28,1),f(1),s())}function Un(e,t){e&1&&(c(0,29,1),f(1),s())}function Kn(e,t){e&1&&(c(0,30,1),f(1),s())}function jn(e,t){e&1&&(c(0,31,1),f(1),s())}function Wn(e,t){e&1&&(c(0,32,1),f(1),s())}function qn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Qn(e,t){e&1&&(O(0),u(1,"-"),m())}function Yn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Zn(e,t){e&1&&(O(0),u(1,"-"),m())}function et(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function nt(e,t){e&1&&(O(0),u(1,"-"),m())}function tt(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function it(e,t){e&1&&(O(0),u(1,"-"),m())}function ot(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function _t(e,t){e&1&&(O(0),u(1,"-"),m())}function at(e,t){e&1&&f(0)}function lt(e,t){if(e&1&&(o(0,"tr")(1,"td"),u(2),i(),o(3,"td")(4,"sh-chip",84),C(5,"img",67),u(6),i()(),o(7,"td"),g(8,qn,2,4)(9,Qn,2,0,"ng-container"),i(),o(10,"td"),g(11,Yn,2,4)(12,Zn,2,0,"ng-container"),i(),o(13,"td"),g(14,et,2,4)(15,nt,2,0,"ng-container"),i(),o(16,"td"),g(17,tt,2,3)(18,it,2,0,"ng-container"),i(),o(19,"td"),g(20,ot,2,3)(21,_t,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),I(26,at,1,0,"ng-container",72),i()()),e&2){let n=t.$implicit,_=r(3),F=U(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(12,sn,n))}}function rt(e,t){if(e&1){let n=A();o(0,"sh-table",74),Ke("sortByColumnChange",function(F){N(n);let d=r(2);return Ue(d.sortByColumn,F)||(d.sortByColumn=F),M(F)}),o(1,"tr",75)(2,"th",76),c(3,26),I(4,wn,2,0,"ng-container",77),s(),i(),o(5,"th",78),c(6,27),I(7,zn,2,0,"ng-container",77),s(),i(),o(8,"th",79),c(9,28),I(10,Vn,2,0,"ng-container",77),s(),i(),o(11,"th",80),c(12,29),I(13,Un,2,0,"ng-container",77),s(),i(),o(14,"th",81),c(15,30),I(16,Kn,2,0,"ng-container",77),s(),i(),o(17,"th",82),c(18,31),I(19,jn,2,0,"ng-container",77),s(),i(),o(20,"th",83),c(21,32),I(22,Wn,2,0,"ng-container",77),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),z(27,lt,27,14,"tr",null,w),i()}if(e&2){let n=r(2),_=U(35);E("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),V(n.backups())}}function ct(e,t){if(e&1&&g(0,Jn,3,3,"div",61)(1,rt,29,10,"sh-table",62),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function st(e,t){e&1&&(o(0,"div",85),C(1,"sh-progress-bar",86),o(2,"div",50)(3,"h3"),T(4,36),i()()())}function ut(e,t){e&1&&T(0,37,1)}function Ft(e,t){e&1&&(o(0,"sh-icon"),u(1,"check"),i())}function Ct(e,t){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),i())}function Tt(e,t){if(e&1){let n=A();o(0,"button",87),D("click",function(){let F=N(n).$implicit,d=r();return M(d.startBackup(F.Backup.ID))}),c(1,37),C(2,"sh-icon"),g(3,ut,1,0),s(),i(),o(4,"button",88)(5,"sh-icon"),u(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",51),g(9,Ft,2,0,"sh-icon")(10,Ct,2,0,"sh-icon"),i(),O(11,59),o(12,"h3",89),u(13,"Operations"),i(),o(14,"button",90),c(15,38),C(16,"sh-icon"),s(),i(),o(17,"button",90),c(18,39),C(19,"sh-icon"),s(),i(),o(20,"button",90),c(21,40),C(22,"sh-icon"),s(),i(),C(23,"sh-divider"),o(24,"h3",89),T(25,41),i(),o(26,"button",90),c(27,42),C(28,"sh-icon"),s(),i(),o(29,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.verifyFiles(F.Backup.ID))}),c(30,43),C(31,"sh-icon"),s(),i(),o(32,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.compressBackup(F.Backup.ID))}),c(33,44),C(34,"sh-icon"),s(),i(),o(35,"button",90),c(36,45),C(37,"sh-icon"),s(),i(),C(38,"sh-divider"),o(39,"h3",89),T(40,46),i(),o(41,"button",90),c(42,47),C(43,"sh-icon"),s(),i(),m(),i()}if(e&2){let n=t.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,En,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,dn,n.Backup.ID)),a(3),E("routerLink",$(19,gn,n.Backup.ID)),a(3),E("routerLink",$(21,pn,n.Backup.ID)),a(6),E("routerLink",$(23,Sn,n.Backup.ID)),a(9),E("routerLink",$(25,On,n.Backup.ID)),a(6),E("routerLink",$(27,mn,n.Backup.ID))}}function Et(e,t){e&1&&(o(0,"sh-icon",91),u(1,"funnel-simple"),i(),o(2,"sh-icon",92),u(3,"sort-ascending"),i(),o(4,"sh-icon",93),u(5,"sort-descending"),i())}var dt={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=x(tn);#t=x(an);#e=x(_n);#i=x(ln);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=on("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#i.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){return t?ee(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=ee(t);if(!n)return"";let _=dt[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+t.split("?")[1],k=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[y,B]of Object.entries(rn))if(k.endsWith(y))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(j(()=>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=Xe({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 F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let k;k=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Externally managed`;let ce;ce=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let se;se=$localize`Last successful backup:`;let ue;ue=$localize`Duration:`;let Fe;Fe=$localize`Source:`;let Ce;Ce=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Te;Te=$localize` ${b}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Next scheduled run:`;let de;de=$localize`Externally managed`;let ge;ge=$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 pe;pe=$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 Se;Se=$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 Oe;Oe=$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 me;me=$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 Ne;Ne=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$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 Pe;Pe=$localize`Version`;let fe;fe=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let De;De=$localize` ${v}:ICU@@3521773141017690117: `;let $e;$e=$localize`Loading backups...`;let Re;Re=$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 he;he=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Ae;Ae=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Le;Le=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let He;He=$localize`Advanced`;let xe;xe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ge;Ge=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ke;ke=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ye;ye=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Be;Be=$localize`Reporting`;let be;return be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,F,d,k,y,B,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,he,Ae,Le,He,xe,Ge,ke,ye,Be,be,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[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"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",48),C(4,"img",49),o(5,"div",50)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",51),c(11,4),C(12,"sh-icon"),s(),i()(),o(13,"sh-card",48),C(14,"img",52),o(15,"div",50)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",51),c(21,7),C(22,"sh-icon"),s(),i()()(),o(23,"div",53)(24,"h2"),O(25),T(26,8),m(),g(27,Dn,22,6,"div",54),i(),Je(28,ct,2,1)(29,st,5,0),we(30,28,un,null,29),i()(),I(32,Tt,44,29,"ng-template",null,0,q)(34,Et,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",K(4,Fn)),a(10),E("routerLink",K(5,Cn)),a(14),p(_.backups().length>0?27:-1),a(3),ze(!_.backupsLoading()))},dependencies:[Q,cn,We,Z,Y,Qe,Ye,Ze,je],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
1
+ import{a as cn}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{b as ee,k as rn}from"./chunk-AT64P6E5.js";import{b as an}from"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as _n}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import{a as ln}from"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import{a as on}from"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{A as je,B as Z,C as We,E as qe,G as Qe,K as Ye,L as Ze,S as en,T as nn,u as Y}from"./chunk-UNMDSCAN.js";import{c as tn}from"./chunk-CFNARBNK.js";import{e as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as N,Ab as i,Bb as C,Cc as P,Dc as G,E as j,Ec as h,Fb as O,Gb as m,Gc as q,Hb as f,Ib as A,Ma as J,Pa as a,Pb as c,Qb as s,Rb as T,Sb as L,Tb as H,Ub as W,Vb as D,W as x,Xb as r,aa as M,cb as Xe,ec as U,gc as R,hb as I,ib as Je,jc as u,la as X,lc as S,na as ve,oc as Ve,pb as we,pc as Ue,qb as ze,qc as Ke,sb as g,tb as p,ub as w,wb as z,xb as V,xc as K,yb as E,yc as $,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var un=()=>[Q,import("./chunk-ZWLAV6HO.js").then(e=>e.NgTemplateOutlet),Z,Y,qe,nn,en,import("./chunk-UNLX3IVU.js").then(e=>e.DurationFormatPipe),import("./chunk-G4IFZKMI.js").then(e=>e.BytesPipe),import("./chunk-XIYAYCFU.js").then(e=>e.RelativeTimePipe)],Fn=()=>["/add-backup"],Cn=()=>["/restore"],sn=e=>({$implicit:e}),Tn=()=>["/backup/new"],En=e=>["/backup",e],dn=e=>["/restore",e],gn=e=>["/backup",e,"export"],pn=e=>["/backup",e,"delete"],Sn=e=>["/backup",e,"database"],On=e=>["/backup",e,"commandline"],mn=e=>["/backup",e,"log"];function Nn(e,t){e&1&&T(0,11,1)}function Mn(e,t){e&1&&T(0,11,2)}function In(e,t){if(e&1&&T(0,11,3),e&2){let n=r(2);L(n.timeType()),H(0)}}function Pn(e,t){if(e&1){let n=A();o(0,"button",56),D("click",function(){let F=N(n).$implicit,d=r(3);return M(d.sortByColumn.set(F.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=r(3);R("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function fn(e,t){if(e&1&&(o(0,"sh-menu",57)(1,"button",58),c(2,14),C(3,"strong")(4,"sh-icon"),s(),i(),O(5,59),z(6,Pn,2,3,"button",60,w),m(),i()),e&2){let n=r(2);a(4),L(n.orderBy()),H(2),a(2),V(n.sortOrderOptions())}}function Dn(e,t){if(e&1){let n=A();o(0,"div",54)(1,"sh-button-group",55)(2,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("list"))}),c(3,9),C(4,"sh-icon"),s(),i(),o(5,"button",56),D("click",function(){N(n);let F=r();return M(F.viewMode.set("details"))}),c(6,10),C(7,"sh-icon"),s(),i()(),o(8,"sh-menu",57)(9,"button",58),c(10,11),o(11,"strong"),g(12,Nn,1,0)(13,Mn,1,0)(14,In,1,1),i(),C(15,"sh-icon"),s(),i(),O(16,59),o(17,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("relative"))}),T(18,12),i(),o(19,"button",56),D("click",function(){N(n);let F=r();return M(F.setTimeType("actual"))}),T(20,13),i(),m(),i(),g(21,fn,8,1,"sh-menu",57),i()}if(e&2){let n=r();a(2),R("active",n.viewMode()==="list"),a(3),R("active",n.viewMode()==="details"),a(7),p(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),p(n.viewMode()==="list"?21:-1)}}function $n(e,t){if(e&1){let n=A();o(0,"div",65)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()()(),o(7,"div",68)(8,"sh-chip",69),T(9,16),i()(),o(10,"div",54)(11,"button",70),D("click",function(){N(n);let F=r().$implicit,d=r(4);return M(d.openInConsole(F))}),c(12,17),C(13,"sh-icon"),s(),i()()()}if(e&2){let n=r().$implicit,_=r(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," ")}}function Rn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),u(3),P(4,"relativeTime"),i()),e&2){let n=r(2).$implicit,_=r(4);a(3),S(" ",h(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function hn(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r(2).$implicit,_=r(4);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function An(e,t){e&1&&(O(0),u(1,"-"),m())}function Ln(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Hn(e,t){e&1&&(O(0),u(1,"-"),m())}function xn(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r(2).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Gn(e,t){e&1&&(O(0),u(1,"-"),m())}function kn(e,t){e&1&&(o(0,"sh-chip",69),T(1,24),i())}function yn(e,t){e&1&&f(0)}function Bn(e,t){if(e&1&&(o(0,"div",66)(1,"div",50)(2,"h3"),u(3),o(4,"sh-chip"),C(5,"img",67),u(6),i()(),o(7,"p")(8,"span"),T(9,18),i(),u(10),P(11,"relativeTime"),i(),g(12,Rn,5,4,"p"),o(13,"p")(14,"span"),T(15,19),i(),g(16,hn,2,4)(17,An,2,0,"ng-container"),i(),o(18,"p")(19,"span"),T(20,20),i(),g(21,Ln,2,3)(22,Hn,2,0,"ng-container"),i(),o(23,"p")(24,"span"),T(25,21),i(),g(26,xn,2,3)(27,Gn,2,0,"ng-container"),i()(),o(28,"div",68)(29,"sh-chip",71),T(30,22),i(),g(31,kn,2,0,"sh-chip",69),i(),o(32,"div",54),I(33,yn,1,0,"ng-container",72),i()()),e&2){let n=r().$implicit,_=r(4),F=U(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",h(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(16,sn,n))}}function bn(e,t){if(e&1&&g(0,$n,14,3,"div",65)(1,Bn,34,18,"div",66),e&2){let n=t.$implicit;p(n.Backup.ExternalID?0:1)}}function vn(e,t){if(e&1&&z(0,bn,2,1,null,null,w),e&2){let n=r(3);V(n.backups())}}function Xn(e,t){e&1&&(o(0,"div",64),c(1,25),o(2,"button",73),C(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),E("routerLink",K(1,Tn)))}function Jn(e,t){if(e&1&&(o(0,"div",63),g(1,vn,2,0)(2,Xn,4,2,"div",64),i()),e&2){let n=r(2);R("fallback",n.backups().length===0),a(),p(n.backups().length?1:2)}}function wn(e,t){e&1&&(c(0,26,1),f(1),s())}function zn(e,t){e&1&&(c(0,27,1),f(1),s())}function Vn(e,t){e&1&&(c(0,28,1),f(1),s())}function Un(e,t){e&1&&(c(0,29,1),f(1),s())}function Kn(e,t){e&1&&(c(0,30,1),f(1),s())}function jn(e,t){e&1&&(c(0,31,1),f(1),s())}function Wn(e,t){e&1&&(c(0,32,1),f(1),s())}function qn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Qn(e,t){e&1&&(O(0),u(1,"-"),m())}function Yn(e,t){if(e&1&&(u(0),P(1,"relativeTime")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Zn(e,t){e&1&&(O(0),u(1,"-"),m())}function et(e,t){if(e&1&&(u(0),P(1,"durationFormat")),e&2){let n=r().$implicit,_=r(3);S(" ",h(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function nt(e,t){e&1&&(O(0),u(1,"-"),m())}function tt(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function it(e,t){e&1&&(O(0),u(1,"-"),m())}function ot(e,t){if(e&1&&(u(0),P(1,"bytes")),e&2){let n=r().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function _t(e,t){e&1&&(O(0),u(1,"-"),m())}function at(e,t){e&1&&f(0)}function lt(e,t){if(e&1&&(o(0,"tr")(1,"td"),u(2),i(),o(3,"td")(4,"sh-chip",84),C(5,"img",67),u(6),i()(),o(7,"td"),g(8,qn,2,4)(9,Qn,2,0,"ng-container"),i(),o(10,"td"),g(11,Yn,2,4)(12,Zn,2,0,"ng-container"),i(),o(13,"td"),g(14,et,2,4)(15,nt,2,0,"ng-container"),i(),o(16,"td"),g(17,tt,2,3)(18,it,2,0,"ng-container"),i(),o(19,"td"),g(20,ot,2,3)(21,_t,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),I(26,at,1,0,"ng-container",72),i()()),e&2){let n=t.$implicit,_=r(3),F=U(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let d=_.getBackupVersionCount(n);a(4),L(d)(d),H(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",$(12,sn,n))}}function rt(e,t){if(e&1){let n=A();o(0,"sh-table",74),Ke("sortByColumnChange",function(F){N(n);let d=r(2);return Ue(d.sortByColumn,F)||(d.sortByColumn=F),M(F)}),o(1,"tr",75)(2,"th",76),c(3,26),I(4,wn,2,0,"ng-container",77),s(),i(),o(5,"th",78),c(6,27),I(7,zn,2,0,"ng-container",77),s(),i(),o(8,"th",79),c(9,28),I(10,Vn,2,0,"ng-container",77),s(),i(),o(11,"th",80),c(12,29),I(13,Un,2,0,"ng-container",77),s(),i(),o(14,"th",81),c(15,30),I(16,Kn,2,0,"ng-container",77),s(),i(),o(17,"th",82),c(18,31),I(19,jn,2,0,"ng-container",77),s(),i(),o(20,"th",83),c(21,32),I(22,Wn,2,0,"ng-container",77),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),z(27,lt,27,14,"tr",null,w),i()}if(e&2){let n=r(2),_=U(35);E("data",n.backups())("loading",n.backupsLoading()),Ve("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),V(n.backups())}}function ct(e,t){if(e&1&&g(0,Jn,3,3,"div",61)(1,rt,29,10,"sh-table",62),e&2){let n=r();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function st(e,t){e&1&&(o(0,"div",85),C(1,"sh-progress-bar",86),o(2,"div",50)(3,"h3"),T(4,36),i()()())}function ut(e,t){e&1&&T(0,37,1)}function Ft(e,t){e&1&&(o(0,"sh-icon"),u(1,"check"),i())}function Ct(e,t){e&1&&(o(0,"sh-icon"),u(1,"dots-three-vertical"),i())}function Tt(e,t){if(e&1){let n=A();o(0,"button",87),D("click",function(){let F=N(n).$implicit,d=r();return M(d.startBackup(F.Backup.ID))}),c(1,37),C(2,"sh-icon"),g(3,ut,1,0),s(),i(),o(4,"button",88)(5,"sh-icon"),u(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",51),g(9,Ft,2,0,"sh-icon")(10,Ct,2,0,"sh-icon"),i(),O(11,59),o(12,"h3",89),u(13,"Operations"),i(),o(14,"button",90),c(15,38),C(16,"sh-icon"),s(),i(),o(17,"button",90),c(18,39),C(19,"sh-icon"),s(),i(),o(20,"button",90),c(21,40),C(22,"sh-icon"),s(),i(),C(23,"sh-divider"),o(24,"h3",89),T(25,41),i(),o(26,"button",90),c(27,42),C(28,"sh-icon"),s(),i(),o(29,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.verifyFiles(F.Backup.ID))}),c(30,43),C(31,"sh-icon"),s(),i(),o(32,"button",56),D("click",function(){let F=N(n).$implicit,d=r();return M(d.compressBackup(F.Backup.ID))}),c(33,44),C(34,"sh-icon"),s(),i(),o(35,"button",90),c(36,45),C(37,"sh-icon"),s(),i(),C(38,"sh-divider"),o(39,"h3",89),T(40,46),i(),o(41,"button",90),c(42,47),C(43,"sh-icon"),s(),i(),m(),i()}if(e&2){let n=t.$implicit,_=r();R("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,En,n.Backup.ID)),a(4),R("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,dn,n.Backup.ID)),a(3),E("routerLink",$(19,gn,n.Backup.ID)),a(3),E("routerLink",$(21,pn,n.Backup.ID)),a(6),E("routerLink",$(23,Sn,n.Backup.ID)),a(9),E("routerLink",$(25,On,n.Backup.ID)),a(6),E("routerLink",$(27,mn,n.Backup.ID))}}function Et(e,t){e&1&&(o(0,"sh-icon",91),u(1,"funnel-simple"),i(),o(2,"sh-icon",92),u(3,"sort-ascending"),i(),o(4,"sh-icon",93),u(5,"sort-descending"),i())}var dt={file:{Display:$localize`Local`,Icon:null}},ne=class e{#n=x(tn);#t=x(an);#e=x(_n);#i=x(ln);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=on("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#i.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){return t?ee(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=ee(t);if(!n)return"";let _=dt[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let F="http://null?"+t.split("?")[1],k=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[y,B]of Object.entries(rn))if(k.endsWith(y))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(j(()=>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=Xe({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 F;F=$localize`Restores`;let d;d=$localize`Recover your files from any backup set.`;let k;k=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let te;te=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ie;ie=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Relative time`;let _e;_e=$localize`Actual time`;let ae;ae=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let le;le=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let re;re=$localize`Externally managed`;let ce;ce=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let se;se=$localize`Last successful backup:`;let ue;ue=$localize`Duration:`;let Fe;Fe=$localize`Source:`;let Ce;Ce=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Te;Te=$localize` ${b}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Next scheduled run:`;let de;de=$localize`Externally managed`;let ge;ge=$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 pe;pe=$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 Se;Se=$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 Oe;Oe=$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 me;me=$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 Ne;Ne=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$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 Pe;Pe=$localize`Version`;let fe;fe=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let De;De=$localize` ${v}:ICU@@3521773141017690117: `;let $e;$e=$localize`Loading backups...`;let Re;Re=$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 he;he=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Ae;Ae=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Le;Le=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let He;He=$localize`Advanced`;let xe;xe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ge;Ge=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ke;ke=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ye;ye=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Be;Be=$localize`Reporting`;let be;return be=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,F,d,k,y,B,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Ie,Pe,fe,De,$e,Re,he,Ae,Le,He,xe,Ge,ke,ye,Be,be,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[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"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",48),C(4,"img",49),o(5,"div",50)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",51),c(11,4),C(12,"sh-icon"),s(),i()(),o(13,"sh-card",48),C(14,"img",52),o(15,"div",50)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",51),c(21,7),C(22,"sh-icon"),s(),i()()(),o(23,"div",53)(24,"h2"),O(25),T(26,8),m(),g(27,Dn,22,6,"div",54),i(),Je(28,ct,2,1)(29,st,5,0),we(30,28,un,null,29),i()(),I(32,Tt,44,29,"ng-template",null,0,q)(34,Et,6,0,"ng-template",null,1,q)),n&2&&(a(3),E("routerLink",K(4,Fn)),a(10),E("routerLink",K(5,Cn)),a(14),p(_.backups().length>0?27:-1),a(3),ze(!_.backupsLoading()))},dependencies:[Q,cn,We,Z,Y,Qe,Ye,Ze,je],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ne as default};
@@ -1 +1 @@
1
- import{g as pe}from"./chunk-4I55TVYE.js";import"./chunk-TXFTUL4R.js";import{i as de,j as Se,k as ue,l as Ee,p as Ce}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import{b as Te,c as ge}from"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as M}from"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,u as oe,w as re,y as ae,z as se}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{b as j,d as q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as l,Ab as a,Bb as O,Fb as V,Gb as W,Ib as u,Mc as $,Pa as T,Pb as E,Qb as C,Rb as I,Sc as w,Ub as z,Vb as d,W as m,Xb as c,aa as _,cb as B,cc as J,da as v,dc as X,jc as P,la as N,oc as f,pc as R,qc as h,rc as A,sb as p,sc as y,tb as F,tc as L,wc as H,xc as K,yb as D,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c(2);return _(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){c();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){l(e);let t=c();return _(t.removeDestination())}),I(2,8),a()()}if(o&2){c();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){l(e);let s=c();return _(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){l(e);let s=c();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),_(t)}),a()}if(o&2){let e=c();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){l(e);let s=c();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),_(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){l(e);let s=c();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),_(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=c();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ce])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return l(t),_(n.next())}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return l(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),_(g)})("testSignalChange",function(g){return l(t),R(n.testSignal,g)||(n.testSignal=g),_(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return l(t),_(n.goBack())}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[ue,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
1
+ import{g as pe}from"./chunk-GJKZESBX.js";import"./chunk-MLNK7NFW.js";import{i as de,j as Se,k as ue,l as Ee,p as Ce}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import{b as Te,c as ge}from"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as M}from"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,u as oe,w as re,y as ae,z as se}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{b as j,d as q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as l,Ab as a,Bb as O,Fb as V,Gb as W,Ib as u,Mc as $,Pa as T,Pb as E,Qb as C,Rb as I,Sc as w,Ub as z,Vb as d,W as m,Xb as c,aa as _,cb as B,cc as J,da as v,dc as X,jc as P,la as N,oc as f,pc as R,qc as h,rc as A,sb as p,sc as y,tb as F,tc as L,wc as H,xc as K,yb as D,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){l(e);let t=c(2);return _(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){l(e);let t=c();return _(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){c();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){l(e);let t=c();return _(t.removeDestination())}),I(2,8),a()()}if(o&2){c();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){l(e);let s=c();return _(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){l(e);let s=c();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),_(t)}),a()}if(o&2){let e=c();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){l(e);let s=c();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),_(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){l(e);let s=c();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),_(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){l(e);let t=c();return _(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=c();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ce])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return l(t),_(n.next())}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return l(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),_(g)})("testSignalChange",function(g){return l(t),R(n.testSignal,g)||(n.testSignal=g),_(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return l(t),_(n.goBack())}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[ue,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,Ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-OIYIWMS7.js")},{path:"destination",loadComponent:()=>import("./chunk-H4LQO7G2.js")},{path:"source-data",loadComponent:()=>import("./chunk-F3JL4GJQ.js")},{path:"schedule",loadComponent:()=>import("./chunk-5QWAH3QX.js")},{path:"options",loadComponent:()=>import("./chunk-4RYK5OOO.js")}];export{o as default};
@@ -1 +1 @@
1
- import{n as a,o as b}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
1
+ import{n as a,o as b}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-UNMDSCAN.js";import{c as J}from"./chunk-CFNARBNK.js";import{d as O,e as M}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
1
+ import{a as K}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-UNMDSCAN.js";import{c as J}from"./chunk-CFNARBNK.js";import{d as O,e as M}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
@@ -0,0 +1 @@
1
+ import{a as Ze}from"./chunk-MLNK7NFW.js";import{h as Ke,m as Qe}from"./chunk-LXSHDO5C.js";import{d as re}from"./chunk-K34VOGDF.js";import{a as je}from"./chunk-SZUNW4JO.js";import{a as D}from"./chunk-HSHF5HR7.js";import{b as _e}from"./chunk-VDSX2M4H.js";import{b as qe}from"./chunk-ZU6T3TW3.js";import{a as K}from"./chunk-HUZXJWCG.js";import{B as j,H as ze,L as Je,M as Xe,P as Ue,V as Ye,W as He,b as we,c as B,e as V,f as W,i as Be,j as z,l as Ve,p as J,q as X,r as U,s as We,t as Y,u as H,z as se}from"./chunk-UNMDSCAN.js";import{c as q}from"./chunk-CFNARBNK.js";import{b as M,d as L}from"./chunk-I27PVH6D.js";import{fa as ne}from"./chunk-7AVOHYTE.js";import{$ as P,Ab as a,Bb as p,C as Q,Cc as le,Dc as ke,E as R,Ec as xe,Fb as b,Gb as v,H as Pe,Ib as A,K as Ie,L as ee,Mc as O,Pa as d,Pb as m,Qb as T,R as Me,Rb as f,Sb as De,Tb as ye,Vb as N,W as c,Xb as C,aa as I,cb as w,g as Ce,gc as $e,hb as Le,jc as G,la as _,lc as be,m as Ne,mc as ve,na as x,oc as te,pc as ie,qc as oe,sb as g,tb as F,v as ae,w as he,wc as Ae,xc as Ge,yb as E,z as Re,zb as r}from"./chunk-26Z7TPJB.js";function rt(s,t){s&1&&(r(0,"p"),f(1,3),a())}function at(s,t){s&1&&(r(0,"sh-form-field")(1,"label",11),f(2,4),a(),p(3,"input",12),a())}var et=new U,ot=()=>et.group({passphrase:et.control("")}),ce=class s{#e=c(q);#t=c(y);#n=c(L);#o=c(M);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=_(!1);settings=_([]);hasEncryptedBackup=O(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=_(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,i=[];e?i.push({Name:"--passphrase",Value:e}):i.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),i.push({Name:n,Value:o.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:i}},temporary:!0}).pipe(R(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#n.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#t.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#o.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,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 i;i=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`The backup does not contain encrypted files.`;let n;n=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,i,o,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",n,"formControlName","passphrase"]]},template:function(e,i){e&1&&(r(0,"form",5),N("submit",function(){return i.next()}),g(1,rt,2,0,"p"),g(2,at,4,0,"sh-form-field"),r(3,"sh-toggle-card"),b(4,6),f(5,0),v(),r(6,"app-options-list",7),oe("optionsChange",function(n){return ie(i.settings,n)||(i.settings=n),n}),a()(),r(7,"div",8)(8,"button",9),N("click",function(){return i.back()}),m(9,1),p(10,"sh-icon"),T(),a(),r(11,"button",10),m(12,2),p(13,"sh-icon"),T(),a()()()),e&2&&(E("formGroup",i.encryptionForm),d(),F(i.hasEncryptedBackup()?-1:1),d(),F(i.hasEncryptedBackup()||i.showEncryptionField()?2:-1),d(4),te("options",i.settings),E("hasFreeTextSettings",!0))},dependencies:[Y,z,B,V,W,X,J,ze,H,j,Ye,Ze],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}"],changeDetection:0})};var lt=()=>({standalone:!0});function _t(s,t){s&1&&p(0,"sh-progress-bar",8)}function ct(s,t){if(s&1&&(G(0),le(1,"bytes")),s&2){let e=C().$implicit;be(" (",ke(1,1,e.FileSizes),") ")}}function pt(s,t){s&1&&(r(0,"span",16),f(1,4),a())}function ut(s,t){if(s&1&&(r(0,"div",15),G(1),le(2,"date"),g(3,ct,2,3),g(4,pt,2,0,"span",16),a()),s&2){let e=t.$implicit;d(),ve(" ",e.Version,": ",xe(2,4,e.Time,"medium")," "),d(2),F(e.FileSizes?3:-1),d(),F(e.IsFullBackup===!1?4:-1)}}function dt(s,t){s&1&&p(0,"sh-progress-bar",8)}function mt(s,t){if(s&1){let e=A();r(0,"app-file-tree",17),N("hasExtendedData",function(o){P(e);let n=C(2);return I(n.extendedDataType.set(o))}),r(1,"label",18),f(2,5),a(),p(3,"input",19),a()}if(s&2){let e=C(2);E("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)}}function Tt(s,t){if(s&1){let e=A();r(0,"sh-select",12),N("cleared",function(){P(e);let o=C();return I(o.abortLoading())}),r(1,"input",13),oe("ngModelChange",function(o){P(e);let n=C();return ie(n.selectOption,o)||(n.selectOption=o),I(o)}),a(),Le(2,ut,5,7,"ng-template"),a(),g(3,dt,1,0,"sh-progress-bar",8),g(4,mt,4,6,"app-file-tree",14)}if(s&2){let e=C();E("options",e.versionOptions())("isClearable",!1),d(),te("ngModel",e.selectOption),E("ngModelOptions",Ge(6,lt)),d(2),F(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),F(e.showFileTree()?4:-1)}}var ue=new U,nt=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class s{#e=c(q);#t=c(y);#n=c(qe);#o=c(K);#i=c(L);#s=c(M);#a=c(ne);#l=null;#_=null;#r=_([]);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=O(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);initialNodes=_([]);loadingRootPath=_(!1);isRepairing=O(()=>this.#r().length>0);loadedVersions=_({});loadingEffect=x(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let i=e[0].Version;this.selectOption.set(i.toString())}});backupSettingsEffect=x(()=>{let t=this.backupId(),e=this.selectOption(),i=this.isRepairing(),o=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(Z=>Z.Version===parseInt(e))?.Time??null;if(!l)return;let u=`${t}+${l}`,h=o[u];if(this.needsDatabaseRepair()&&(!h||i))return;let $={id:t+"",time:l};this.backupSettings.set($),this.getRootPath($)});repairEffect=x(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let i=e.find(l=>l.Version===parseInt(t));if(i===void 0)return;let o=this.backupId(),n=`${o}+${i.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(l=>[...l,n]),this.#e.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:i.Time}}).pipe(ee(this.abortLoading$),R(()=>{this.#_=null})).subscribe(l=>{let u=l.ID;this.#n.waitForTaskToComplete(u).pipe(Q(1)).subscribe(()=>{this.#r.update(h=>h.filter($=>$!==n)),this.loadedVersions.update(h=>(h[n]=!0,h))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},i=t.id+"";this.isRepairing()||this.#l===i||(this.#l=i,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0}}).pipe(ee(this.abortLoading$),R(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:o=>{let n=(o.Data??[]).map(l=>l.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ee(this.abortLoading$),R(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(l=>l.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Ce;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let i=t?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return i?`${i.Version}: ${this.#a.transform(i.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-select-files"]],features:[Ae([ne])],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 i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let l;return l=$localize`Path`,[["formRef",""],t,e,i,n,l,[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",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,i){if(e&1){let o=A();r(0,"form",6,0),N("submit",function(){return P(o),I(i.next())}),r(2,"h3",7),f(3,1),a(),g(4,_t,1,0,"sh-progress-bar",8)(5,Tt,5,7),r(6,"div",9)(7,"button",10),N("click",function(){return P(o),I(i.back())}),m(8,2),p(9,"sh-icon"),T(),a(),r(10,"button",11),m(11,3),p(12,"sh-icon"),T(),a()()()}e&2&&(E("formGroup",i.selectFilesForm),d(4),F(i.versionOptionsLoading()?4:5),d(5),De(i.isFileRestore()?"Back":"Exit"),ye(8))},dependencies:[We,z,B,V,W,Be,Y,X,J,re,j,H,Ue,Je,ne,je],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}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var y=class s{#e=c(L);#t=c(M);#n=c(K);#o=c(se);#i=c(q);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);destinationTestSignal=_(null);selectFilesForm=nt();optionsForm=st();encryptionForm=ot();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);extendedDataType=_(null);alternateRestorePath=_(null);init(t,e=!1){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){this.alternateRestorePath.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:i=>{this.#s(i.ID??"")},error:i=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${i.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#o.open(D,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,i=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(l=>l.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:i.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:i.passphrase??null,time:n?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#o.open(D,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Re(i=>{let o=i?.error?.body?.StatusCode??i?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?Ne(()=>i):he(1e3).pipe(Ie(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?ae([this.#i.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Q(1),R(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,i])=>{if(i.Error)throw new Error(i.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#o.open(D,{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:n=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((i.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let i=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=i==="EncryptedStorageNoPassphrase",n=i==="FolderMissing",l=i==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),l&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#o.open(D,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:h=>{this.#e.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ae([this.#i.getApiV1BackupById({id:t}),this.#i.getApiV1BackupByIdFilesets({id:t}).pipe(Pe(3))]).pipe(Q(1),R(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,i])=>{this.versionOptions.set(i.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Me({token:s,factory:s.\u0275fac,providedIn:"root"})};function St(s,t){if(s&1&&(r(0,"app-file-tree",29)(1,"label",31),G(2,"Path"),a(),p(3,"input",32),a()),s&2){let e,i=C(2);E("disabled",((e=i.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Et(s,t){if(s&1&&(r(0,"app-file-tree",30)(1,"label",31),G(2,"Path"),a(),p(3,"input",32),a()),s&2){let e=C(2);E("office365Mode",!0)("backupId",e.backupId())("sourcePrefix",e.office365SourcePrefix())("destinationUrl",e.office365destinationUrl())}}function gt(s,t){if(s&1){let e=A();r(0,"sh-radio",25),m(1,5),p(2,"input",26),T(),a(),r(3,"sh-radio",25),m(4,6),r(5,"input",27),N("click",function(){P(e);let o=C();return I(o.chooseOfficeTenant())}),a(),T(),a(),r(6,"sh-radio",25),m(7,7),p(8,"input",28),T(),a(),g(9,St,4,2,"app-file-tree",29),g(10,Et,4,4,"app-file-tree",30)}if(s&2){let e,i=C();d(9),F(((e=i.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?9:-1),d(),F(i.showOffice365RestoreTree()?10:-1)}}function Ft(s,t){if(s&1&&(r(0,"sh-radio",25),m(1,8),p(2,"input",33),T(),a(),r(3,"sh-radio",25),m(4,9),p(5,"input",28),T(),a(),r(6,"app-file-tree",29)(7,"label",31),G(8,"Path"),a(),p(9,"input",32),a()),s&2){let e,i=C();d(6),E("disabled",((e=i.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function ft(s,t){s&1&&(r(0,"app-toggle-card",20),b(1,21),f(2,10),v(),r(3,"sh-toggle",25),m(4,11),p(5,"input",34),T(),a()()),s&2&&E("disallowToggle",!0)}function Ot(s,t){s&1&&(r(0,"app-toggle-card",20),b(1,21),f(2,12),v(),r(3,"sh-radio",25),m(4,13),p(5,"input",35),T(),a(),r(6,"sh-radio",25),m(7,14),p(8,"input",36),T(),a()(),r(9,"app-toggle-card"),b(10,21),f(11,15),v(),r(12,"sh-toggle",37),m(13,16),p(14,"input",38),T(),a(),r(15,"sh-toggle",37),m(16,17),p(17,"input",39),T(),a()()),s&2&&E("disallowToggle",!0)}var k=new U,st=()=>k.group({restoreFrom:k.control("original"),restoreFromPath:k.control(""),handleExisting:k.control("saveTimestamp"),permissions:k.control(!1),includeMetadata:k.control(!0),officeIgnoreExisting:k.control(!1)}),me=class s{#e=c(y);#t=c(L);#n=c(M);#o=c(K);#i=c(se);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;office365CustomTargetUrl=_(null);backupId=O(()=>this.#e.backup()?.Backup?.ID??null);hasOffice365Data=O(()=>this.extendedData()==="o365");office365SourceEntry=O(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&t.includes("|office365"))[0]??null);office365SourceUrl=O(()=>this.office365SourceEntry()?.split("|")[1]??null);office365SourcePrefix=O(()=>this.office365SourceEntry()?.split("|")[0]??null);office365destinationUrl=O(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.hasOffice365Data();return t==="same-o365"&&e?this.office365SourceUrl():t==="other-o365"&&e?this.office365CustomTargetUrl():null});showOffice365RestoreTree=O(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-o365"&&this.office365destinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-o365"&&this.office365destinationUrl()));isOffice365Restore=O(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-o365"||t==="other-o365"});chooseOfficeTenant(){return this.#i.open(Qe,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.office365CustomTargetUrl()||this.office365SourceUrl()||"office365://",moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.office365SourcePrefix()}}).closed.subscribe(e=>{e&&(this.office365CustomTargetUrl.set(e),this.optionsForm.controls.restoreFrom.setValue("other-o365"))}),!1}#s=x(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.hasOffice365Data()&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),!this.hasOffice365Data()&&(t==="same-o365"||t==="other-o365")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#o.systemInfo()?.DirectorySeparator){this.#i.open(D,{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:o=>{o&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-o365"||this.optionsFormSignal()?.restoreFrom==="other-o365"){let i=this.optionsFormSignal()?.restoreFromPath;if(i&&i.startsWith("/")&&(i=i.substring(1)),!i||i.trim()===""){this.#i.open(D,{data:{title:$localize`No path specified`,message:$localize`Please choose a path to restore to in the Office 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let o=this.optionsFormSignal()?.officeIgnoreExisting,n=this.office365destinationUrl()?.substring(this.office365destinationUrl().indexOf("?")),l=`@office365://${i}${n}&office365-ignore-existing=${o?"true":"false"}`;this.#e.setAlternateRestorePath(l),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null);this.#e.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,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 i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let n;n=$localize` Same Office 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Different Office 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Local file system ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize`Restore settings`;let Te;Te=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Se;Se=$localize`How do you want to handle existing files?`;let Ee;Ee=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize`Metadata settings`;let fe;fe=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let Oe;return Oe=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,i,o,n,l,u,h,$,Z,Te,Se,Ee,ge,Fe,fe,Oe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","same-o365","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-o365","formControlName","restoreFrom",3,"click"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],[3,"office365Mode","backupId","sourcePrefix","destinationUrl"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","officeIgnoreExisting"],["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,i){if(e&1){let o=A();r(0,"form",18,0),N("submit",function(){return P(o),I(i.submit())}),r(2,"h3",19),f(3,1),a(),r(4,"app-toggle-card",20),b(5,21),f(6,2),v(),g(7,gt,11,2)(8,Ft,10,2),a(),g(9,ft,6,1,"app-toggle-card",20)(10,Ot,18,1),r(11,"div",22)(12,"button",23),N("click",function(){return P(o),I(i.goBack())}),m(13,3),p(14,"sh-icon"),T(),a(),r(15,"button",24),m(16,4),p(17,"sh-icon"),T(),a()()()}e&2&&(E("formGroup",i.optionsForm),d(4),E("disallowToggle",!0),d(3),F(i.hasOffice365Data()?7:8),d(2),F(i.isOffice365Restore()?9:10),d(6),$e("loader",i.isSubmitting()))},dependencies:[Y,z,B,we,Ve,V,W,X,J,Ke,re,He,Xe,j,H],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}"],changeDetection:0})};export{st as a,me as b,ot as c,ce as d,nt as e,de as f,y as g};
@@ -1 +1 @@
1
- import{i as pe,j as Ce,k as Se,l as me,p as Ne}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import{b as ue,c as Te}from"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as A}from"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as ce,H as ge,K as de,c as Y,e as Z,f as ee,g as te,i as ne,j as ie,r as oe,s as ae,u as re,w as se,y as le,z as _e}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{b as q,d as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as l,Ab as s,Bb as p,Fb as V,Gb as K,Ib as C,Mc as R,Pa as g,Pb as N,Qb as E,Rb as D,Sc as w,Vb as T,W as I,Xb as c,aa as _,cb as v,cc as z,da as B,dc as J,gc as X,jc as y,la as O,oc as F,pc as f,qc as P,rc as W,sb as S,sc as H,tb as m,tc as U,xc as j,yb as h,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Ee=["formRef"],Ie=["testUrl"],he=()=>({maxWidth:"700px",width:"100%"});function De(o,i){if(o&1){let e=C();r(0,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(1,6),p(2,"sh-icon"),E(),s()}}function fe(o,i){if(o&1){let e=C();r(0,"button",27),T("click",function(){l(e);let n=c(2);return _(n.copyTargetUrl())}),N(1,8),p(2,"sh-icon"),E(),s()}}function Oe(o,i){if(o&1){let e=C();r(0,"sh-menu")(1,"button",19)(2,"sh-icon"),y(3,"dots-three-vertical"),s()(),V(4,28),r(5,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(6,7),p(7,"sh-icon"),E(),s(),S(8,fe,3,0,"button",19),K(),s()}if(o&2){c();let e=U(0);g(8),m(e?8:-1)}}function Fe(o,i){if(o&1){let e=C();r(0,"app-destination-list",29),T("setDestination",function(n){l(e);let a=c();return _(a.setDestination(n))}),s()}}function Pe(o,i){if(o&1){let e=C();r(0,"app-single-destination",30),P("targetUrlChange",function(n){l(e);let a=c();return f(a.targetUrlModel,n)||(a.targetUrlModel=n),_(n)}),s()}if(o&2){let e=c();F("targetUrl",e.targetUrlModel),h("useBackupState",!0)}}function Ae(o,i){o&1&&(r(0,"h2"),D(1,11),s())}function Me(o,i){o&1&&(r(0,"h2"),D(1,12),s())}function ye(o,i){if(o&1){let e=C();r(0,"sh-dialog",31),P("isOpenChange",function(n){l(e);let a=c();return f(a.targetUrlDialogOpen,n)||(a.targetUrlDialogOpen=n),_(n)}),r(1,"header",32)(2,"div",33),S(3,Ae,2,0,"h2")(4,Me,2,0,"h2"),r(5,"sh-alert",34),D(6,9),s()()(),r(7,"div",35)(8,"sh-form-field")(9,"textarea",36),P("ngModelChange",function(n){l(e);let a=c();return f(a.targetUrlCtrl,n)||(a.targetUrlCtrl=n),_(n)}),s()()(),r(10,"footer",37)(11,"button",22),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!1))}),y(12,"Cancel"),s(),r(13,"button",38),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!0))}),N(14,10),p(15,"sh-icon"),E(),s()()()}if(o&2){let e=c(),t=U(0);F("isOpen",e.targetUrlDialogOpen),h("options",j(4,he)),g(3),m(t?4:3),g(6),F("ngModel",e.targetUrlCtrl)}}var M=new oe,je=(o={destinations:[]})=>M.group({destinations:M.array(o.destinations)}),qe=({key:o,customGroup:i,dynamicGroup:e,advancedGroup:t})=>M.group({destinationType:M.control(o),custom:i,dynamic:e,advanced:t}),$=class o{#i=I(Q);#o=I(q);#e=I(Ne);#n=I(_e);injector=I(B);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.targetUrlTestSignal;targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);isNew=this.#e.isNew;backupId=this.#e.backupId;selectedDestinationType=R(()=>{let i=this.targetUrlModel();return i?ue(i)??null:null});selectedDestinationTypeOption=R(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let i=this.targetUrlModel();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),t=this.targetUrlInitial();!i||e===t||!e||this.#e.setTargetUrl(e)}setDestination(i){let e=Te(i??"");if(e){if(e.mapper.default){let t=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(t,!0);return}this.#e.setTargetUrl(`${i}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.#e.isNew(),e=this.testSignal();if(!i){this.#t();return}if(e===null){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(a=>{a.action==="success"&&!a.containsBackup&&!a.anyFilesFound?this.#t():this.#n.open(A,{data:{title:$localize`Test did not succeed`,message:a.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let t=typeof e=="string"?null:e;if(t?.action!=="success"||t.containsBackup||t.anyFilesFound){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#t()}});return}this.#t()}#t(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=v({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&z(t.formRef,Ee,5)(t.testUrlComponent,Ie,5),e&2&&J(2)},decls:28,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`Change`;let t;t=$localize`${"\uFFFD#23\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let d;d=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let x;x=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let L;L=$localize`Be careful, this will overwrite everything you have in your destination.`;let G;G=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let b;b=$localize`Set target URL`;let k;return k=$localize`Edit target URL`,[["formRef",""],["testUrl",""],i,e,t,n,a,d,x,L,G,b,k,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"targetUrl"],["shButton","","type","button",3,"click"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let n=C();W(0),r(1,"form",13,0),T("submit",function(){return l(n),_(t.next())}),r(3,"div",14),p(4,"input",15)(5,"input",16),s(),r(6,"header")(7,"h3",17)(8,"span"),D(9,2),s(),r(10,"div",18),S(11,De,3,0,"button",19)(12,Oe,9,1,"sh-menu"),s()(),r(13,"app-test-url",20,1),P("targetUrlChange",function(d){return l(n),f(t.targetUrlModel,d)||(t.targetUrlModel=d),_(d)})("testSignalChange",function(d){return l(n),f(t.testSignal,d)||(t.testSignal=d),_(d)}),s(),r(15,"app-destination-list-item",21)(16,"button",22),T("click",function(){return l(n),_(t.removeDestination())}),D(17,3),s()()(),S(18,Fe,1,0,"app-destination-list"),S(19,Pe,1,2,"app-single-destination",23),r(20,"div",24)(21,"button",22),T("click",function(){return l(n),_(t.goBack())}),N(22,4),p(23,"sh-icon"),E(),s(),r(24,"button",25),N(25,5),p(26,"sh-icon"),E(),s()()(),S(27,ye,16,5,"sh-dialog",26)}if(e&2){let n=H(!!t.targetUrlModel());g(11),m(n?12:11),g(2),F("targetUrl",t.targetUrlModel)("testSignal",t.testSignal),h("backupId",t.backupId())("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",t.isNew()?"destinationEmpty":"any")("moduleType","Backend"),g(2),h("targetUrl",t.targetUrlModel()),g(3),m(n?-1:18),g(),m(n?19:-1),g(5),X("loading",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing"||!n),g(3),m(t.targetUrlDialogOpen()?27:-1)}},dependencies:[Se,Ce,pe,me,ae,ie,Y,Z,ee,ne,te,ce,ge,de,re,le,se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{je as createDestinationForm,qe as createDestinationFormGroup,$ as default};
1
+ import{i as pe,j as Ce,k as Se,l as me,p as Ne}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import{b as ue,c as Te}from"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as A}from"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as ce,H as ge,K as de,c as Y,e as Z,f as ee,g as te,i as ne,j as ie,r as oe,s as ae,u as re,w as se,y as le,z as _e}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{b as q,d as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as l,Ab as s,Bb as p,Fb as V,Gb as K,Ib as C,Mc as R,Pa as g,Pb as N,Qb as E,Rb as D,Sc as w,Vb as T,W as I,Xb as c,aa as _,cb as v,cc as z,da as B,dc as J,gc as X,jc as y,la as O,oc as F,pc as f,qc as P,rc as W,sb as S,sc as H,tb as m,tc as U,xc as j,yb as h,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Ee=["formRef"],Ie=["testUrl"],he=()=>({maxWidth:"700px",width:"100%"});function De(o,i){if(o&1){let e=C();r(0,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(1,6),p(2,"sh-icon"),E(),s()}}function fe(o,i){if(o&1){let e=C();r(0,"button",27),T("click",function(){l(e);let n=c(2);return _(n.copyTargetUrl())}),N(1,8),p(2,"sh-icon"),E(),s()}}function Oe(o,i){if(o&1){let e=C();r(0,"sh-menu")(1,"button",19)(2,"sh-icon"),y(3,"dots-three-vertical"),s()(),V(4,28),r(5,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(6,7),p(7,"sh-icon"),E(),s(),S(8,fe,3,0,"button",19),K(),s()}if(o&2){c();let e=U(0);g(8),m(e?8:-1)}}function Fe(o,i){if(o&1){let e=C();r(0,"app-destination-list",29),T("setDestination",function(n){l(e);let a=c();return _(a.setDestination(n))}),s()}}function Pe(o,i){if(o&1){let e=C();r(0,"app-single-destination",30),P("targetUrlChange",function(n){l(e);let a=c();return f(a.targetUrlModel,n)||(a.targetUrlModel=n),_(n)}),s()}if(o&2){let e=c();F("targetUrl",e.targetUrlModel),h("useBackupState",!0)}}function Ae(o,i){o&1&&(r(0,"h2"),D(1,11),s())}function Me(o,i){o&1&&(r(0,"h2"),D(1,12),s())}function ye(o,i){if(o&1){let e=C();r(0,"sh-dialog",31),P("isOpenChange",function(n){l(e);let a=c();return f(a.targetUrlDialogOpen,n)||(a.targetUrlDialogOpen=n),_(n)}),r(1,"header",32)(2,"div",33),S(3,Ae,2,0,"h2")(4,Me,2,0,"h2"),r(5,"sh-alert",34),D(6,9),s()()(),r(7,"div",35)(8,"sh-form-field")(9,"textarea",36),P("ngModelChange",function(n){l(e);let a=c();return f(a.targetUrlCtrl,n)||(a.targetUrlCtrl=n),_(n)}),s()()(),r(10,"footer",37)(11,"button",22),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!1))}),y(12,"Cancel"),s(),r(13,"button",38),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!0))}),N(14,10),p(15,"sh-icon"),E(),s()()()}if(o&2){let e=c(),t=U(0);F("isOpen",e.targetUrlDialogOpen),h("options",j(4,he)),g(3),m(t?4:3),g(6),F("ngModel",e.targetUrlCtrl)}}var M=new oe,je=(o={destinations:[]})=>M.group({destinations:M.array(o.destinations)}),qe=({key:o,customGroup:i,dynamicGroup:e,advancedGroup:t})=>M.group({destinationType:M.control(o),custom:i,dynamic:e,advanced:t}),$=class o{#i=I(Q);#o=I(q);#e=I(Ne);#n=I(_e);injector=I(B);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.targetUrlTestSignal;targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);isNew=this.#e.isNew;backupId=this.#e.backupId;selectedDestinationType=R(()=>{let i=this.targetUrlModel();return i?ue(i)??null:null});selectedDestinationTypeOption=R(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let i=this.targetUrlModel();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),t=this.targetUrlInitial();!i||e===t||!e||this.#e.setTargetUrl(e)}setDestination(i){let e=Te(i??"");if(e){if(e.mapper.default){let t=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(t,!0);return}this.#e.setTargetUrl(`${i}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.#e.isNew(),e=this.testSignal();if(!i){this.#t();return}if(e===null){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(a=>{a.action==="success"&&!a.containsBackup&&!a.anyFilesFound?this.#t():this.#n.open(A,{data:{title:$localize`Test did not succeed`,message:a.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let t=typeof e=="string"?null:e;if(t?.action!=="success"||t.containsBackup||t.anyFilesFound){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#t()}});return}this.#t()}#t(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=v({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&z(t.formRef,Ee,5)(t.testUrlComponent,Ie,5),e&2&&J(2)},decls:28,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`Change`;let t;t=$localize`${"\uFFFD#23\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let d;d=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let x;x=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let L;L=$localize`Be careful, this will overwrite everything you have in your destination.`;let G;G=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let b;b=$localize`Set target URL`;let k;return k=$localize`Edit target URL`,[["formRef",""],["testUrl",""],i,e,t,n,a,d,x,L,G,b,k,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"targetUrl"],["shButton","","type","button",3,"click"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let n=C();W(0),r(1,"form",13,0),T("submit",function(){return l(n),_(t.next())}),r(3,"div",14),p(4,"input",15)(5,"input",16),s(),r(6,"header")(7,"h3",17)(8,"span"),D(9,2),s(),r(10,"div",18),S(11,De,3,0,"button",19)(12,Oe,9,1,"sh-menu"),s()(),r(13,"app-test-url",20,1),P("targetUrlChange",function(d){return l(n),f(t.targetUrlModel,d)||(t.targetUrlModel=d),_(d)})("testSignalChange",function(d){return l(n),f(t.testSignal,d)||(t.testSignal=d),_(d)}),s(),r(15,"app-destination-list-item",21)(16,"button",22),T("click",function(){return l(n),_(t.removeDestination())}),D(17,3),s()()(),S(18,Fe,1,0,"app-destination-list"),S(19,Pe,1,2,"app-single-destination",23),r(20,"div",24)(21,"button",22),T("click",function(){return l(n),_(t.goBack())}),N(22,4),p(23,"sh-icon"),E(),s(),r(24,"button",25),N(25,5),p(26,"sh-icon"),E(),s()()(),S(27,ye,16,5,"sh-dialog",26)}if(e&2){let n=H(!!t.targetUrlModel());g(11),m(n?12:11),g(2),F("targetUrl",t.targetUrlModel)("testSignal",t.testSignal),h("backupId",t.backupId())("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",t.isNew()?"destinationEmpty":"any")("moduleType","Backend"),g(2),h("targetUrl",t.targetUrlModel()),g(3),m(n?-1:18),g(),m(n?19:-1),g(5),X("loading",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing"||!n),g(3),m(t.targetUrlDialogOpen()?27:-1)}},dependencies:[Se,Ce,pe,me,ae,ie,Y,Z,ee,ne,te,ce,ge,de,re,le,se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{je as createDestinationForm,qe as createDestinationFormGroup,$ as default};
@@ -1 +1 @@
1
- import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-UNMDSCAN.js";import{c as X}from"./chunk-CFNARBNK.js";import{d as I,e as A}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as i,Bb as p,E as g,K as T,Pa as F,Pb as E,Qb as C,Rb as f,Ub as O,Vb as m,W as u,cb as R,gc as h,jc as N,la as c,sb as S,tb as D,xc as M,yb as _,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,P,$,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
1
+ import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-UNMDSCAN.js";import{c as X}from"./chunk-CFNARBNK.js";import{d as I,e as A}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as i,Bb as p,E as g,K as T,Pa as F,Pb as E,Qb as C,Rb as d,Ub as O,Vb as m,W as u,cb as R,gc as h,jc as N,la as c,sb as S,tb as D,xc as M,yb as _,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),d(2,2),i(),p(3,"input",12),i())}var a=new v,f=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),d(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,P,$,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-4I55TVYE.js";import"./chunk-TXFTUL4R.js";import"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
1
+ import{a,b}from"./chunk-GJKZESBX.js";import"./chunk-MLNK7NFW.js";import"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-4I55TVYE.js";import"./chunk-TXFTUL4R.js";import"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-GJKZESBX.js";import"./chunk-MLNK7NFW.js";import"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{g as C}from"./chunk-4I55TVYE.js";import"./chunk-TXFTUL4R.js";import{a as k}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as w}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as u}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{M as W,R as y}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
1
+ import{g as C}from"./chunk-GJKZESBX.js";import"./chunk-MLNK7NFW.js";import{a as k}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as w}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as u}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{M as W,R as y}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};