@duplicati/ngclient 0.0.111 → 0.0.114

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 (83) hide show
  1. package/{chunk-WQLN5T4T.js → chunk-37GXHTIP.js} +1 -1
  2. package/{chunk-MHO7INGX.js → chunk-3IIFLG6J.js} +1 -1
  3. package/{chunk-TJS6O6KD.js → chunk-554T66WI.js} +1 -1
  4. package/chunk-5G5PH7FG.js +1 -0
  5. package/{chunk-RQSBT3TK.js → chunk-66Q4TXVX.js} +1 -1
  6. package/{chunk-YJSWEW6C.js → chunk-6FFPXENZ.js} +1 -1
  7. package/{chunk-2ZVLF3KW.js → chunk-7LU4D3GR.js} +1 -1
  8. package/{chunk-T33TACR6.js → chunk-7WFWZORV.js} +1 -1
  9. package/{chunk-4RGZG24K.js → chunk-CD3DB23J.js} +1 -1
  10. package/chunk-CFVPLY5R.js +1 -0
  11. package/{chunk-QKA2VJWD.js → chunk-CPPV6EJP.js} +1 -1
  12. package/{chunk-65OCE2TY.js → chunk-CTGMG44P.js} +1 -1
  13. package/chunk-DDMQ6BLY.js +1 -0
  14. package/{chunk-KEAH5JAH.js → chunk-E2UB3K6K.js} +1 -1
  15. package/{chunk-PFE36372.js → chunk-EKIPEIC4.js} +1 -1
  16. package/{chunk-6OKAWH4X.js → chunk-EXJKKQZX.js} +1 -1
  17. package/{chunk-CHRKPWRG.js → chunk-F4EEOSGJ.js} +1 -1
  18. package/chunk-F7HHSM2V.js +1 -0
  19. package/chunk-FKJJQJD5.js +1 -0
  20. package/{chunk-URU2SLPX.js → chunk-GJROCOAD.js} +1 -1
  21. package/chunk-HVT5TILQ.js +1 -0
  22. package/{chunk-QP4QZQOW.js → chunk-HXP5ZXIT.js} +1 -1
  23. package/{chunk-NP4VUDPK.js → chunk-IEH3LYA4.js} +1 -1
  24. package/{chunk-JIPJYOH5.js → chunk-JES5INM4.js} +1 -1
  25. package/{chunk-BOBAN442.js → chunk-JLDOA36R.js} +1 -1
  26. package/{chunk-4AECHE4W.js → chunk-JSGFZ2GA.js} +1 -1
  27. package/{chunk-YJNKW5ES.js → chunk-KIGBGT77.js} +1 -1
  28. package/chunk-L76NC2T6.js +1 -0
  29. package/chunk-LVUQRMAC.js +1 -0
  30. package/chunk-N3L3HC4J.js +1 -0
  31. package/{chunk-XJAEXNPS.js → chunk-NDU4DSOM.js} +1 -1
  32. package/{chunk-DDM4R5FN.js → chunk-NE2V7X4C.js} +1 -1
  33. package/{chunk-Z4MV4ZSL.js → chunk-NHQOHNI2.js} +1 -1
  34. package/chunk-NMXJMVL5.js +1 -0
  35. package/{chunk-GDHVQU56.js → chunk-OTLEEXAA.js} +1 -1
  36. package/{chunk-WEQQEKIH.js → chunk-PAS4EMZF.js} +1 -1
  37. package/chunk-PFWSXI4B.js +1 -0
  38. package/{chunk-CR4OKZPA.js → chunk-PPP3I2ZR.js} +1 -1
  39. package/{chunk-2MCIQSK2.js → chunk-PQVEQNEN.js} +1 -1
  40. package/{chunk-45RYC5NZ.js → chunk-Q2HZC6ZI.js} +1 -1
  41. package/{chunk-HLHNKLWF.js → chunk-QBFBFWG2.js} +1 -1
  42. package/chunk-QDH6LNFG.js +1 -0
  43. package/{chunk-3M3M4YXP.js → chunk-R6GGQ2GT.js} +1 -1
  44. package/chunk-R7CDA4HX.js +1 -0
  45. package/chunk-RCU74ULS.js +1 -0
  46. package/{chunk-LQ5ORNDI.js → chunk-RGVPD4PJ.js} +1 -1
  47. package/{chunk-XTWVXTYP.js → chunk-RJ4U6XAH.js} +1 -1
  48. package/chunk-RN7NMYKV.js +8 -0
  49. package/chunk-RZN7GZTZ.js +1 -0
  50. package/chunk-S3S677ZR.js +1 -0
  51. package/{chunk-2KUDLHPP.js → chunk-S47LQILW.js} +1 -1
  52. package/{chunk-VN7JM6M3.js → chunk-SPHWZHBB.js} +1 -1
  53. package/chunk-TZUFH3TN.js +1 -0
  54. package/{chunk-IIB7YCLW.js → chunk-UTVV2FB5.js} +1 -1
  55. package/chunk-V3LXB3BU.js +1 -0
  56. package/{chunk-UMP4YQXB.js → chunk-VSSZRSCG.js} +1 -1
  57. package/{chunk-SKJ6XSV3.js → chunk-W6OH3HBG.js} +1 -1
  58. package/{chunk-6DH6O5YE.js → chunk-Z2NFEFOH.js} +1 -1
  59. package/{chunk-ZMDK6XIQ.js → chunk-ZCC3C2X4.js} +1 -1
  60. package/index.html +2 -2
  61. package/{main-S6Q4T2BU.js → main-EVBG63XG.js} +1 -1
  62. package/package.json +1 -1
  63. package/styles-UL5PH77J.css +1 -0
  64. package/chunk-25ZZFR2F.js +0 -1
  65. package/chunk-3KSBRC3X.js +0 -1
  66. package/chunk-7S5SYCMV.js +0 -1
  67. package/chunk-AADIFDNE.js +0 -1
  68. package/chunk-D3I33UIQ.js +0 -1
  69. package/chunk-HPGYPP74.js +0 -1
  70. package/chunk-JD54W4UA.js +0 -8
  71. package/chunk-JV6DGJII.js +0 -1
  72. package/chunk-LZUCVLMF.js +0 -1
  73. package/chunk-MHHVE6AV.js +0 -1
  74. package/chunk-P5SS3OV3.js +0 -1
  75. package/chunk-PN73DZ2H.js +0 -1
  76. package/chunk-QJILVQSS.js +0 -1
  77. package/chunk-VLIGMNJX.js +0 -1
  78. package/chunk-W577IVOD.js +0 -1
  79. package/chunk-WX7L7V6J.js +0 -1
  80. package/chunk-X4SAPDOB.js +0 -1
  81. package/chunk-X5YRWKCW.js +0 -1
  82. package/chunk-YD7PS7OS.js +0 -1
  83. package/styles-V3SS5M3J.css +0 -1
@@ -1 +1 @@
1
- import{a as z}from"./chunk-TJS6O6KD.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import{a as X}from"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{e as E}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as R,g as f,h as k,k as G,p as w}from"./chunk-WX7L7V6J.js";import{h as L}from"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as l,Ab as b,Gb as h,Hb as y,Ib as c,Jb as A,Kb as I,Nb as S,Qa as p,Y as d,ab as O,cc as B,fb as m,kb as M,lb as P,lc as g,mc as v,nb as u,sb as F,tb as N,ub as x,vb as $,wb as e,xb as i,yb as s,zb as D}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,G,R,w,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
1
+ import{a as z}from"./chunk-554T66WI.js";import"./chunk-7LU4D3GR.js";import"./chunk-EXJKKQZX.js";import{a as X}from"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{e as E}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as R,g as f,h as k,k as G,p as w}from"./chunk-NMXJMVL5.js";import{h as L}from"./chunk-JSGFZ2GA.js";import"./chunk-L76NC2T6.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as l,Ab as b,Gb as h,Hb as y,Ib as c,Jb as A,Kb as I,Nb as S,Qa as p,Y as d,ab as O,cc as B,fb as m,kb as M,lb as P,lc as g,mc as v,nb as u,sb as F,tb as N,ub as x,vb as $,wb as e,xb as i,yb as s,zb as D}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,G,R,w,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as RelativeTimePipe};
1
+ import{a}from"./chunk-L76NC2T6.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as RelativeTimePipe};
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-2ZVLF3KW.js";import{c as re,e as pe,h as ue,j as Se,s as y}from"./chunk-T2OUHRUV.js";import{a as Q}from"./chunk-CHRKPWRG.js";import{a as Y,b as ee,e as te,g as ne,i as h,l as ie,p as oe,q as ae,s as se,t as le}from"./chunk-WX7L7V6J.js";import{h as A}from"./chunk-4AECHE4W.js";import{a as ce}from"./chunk-JV6DGJII.js";import{j as J}from"./chunk-CKPICCFH.js";import{$b as T,Ac as U,Cb as V,F as E,Gb as P,Hb as N,Ib as p,Lb as j,Mb as u,Nb as O,Qa as _,Y as d,ab as C,bc as I,cc as B,da as w,ea as z,ec as M,fb as L,fc as D,gc as R,nb as g,ob as X,pb as S,pc as G,qa as k,qc as q,rc as Z,sb as v,tb as H,ua as r,ub as K,vb as W,wb as s,xb as l,yb as f}from"./chunk-W2F756OF.js";function Oe(a,n){if(a&1){let t=V();s(0,"spk-radio",10),u("click",function(){let i=w(t).$implicit,o=O();return z(o.pauseOption.set(i.value))}),T(1),l()}if(a&2){let t=n.$implicit,e=O();S("active",e.pauseOption()===t.value),_(),I(" ",t.label," ")}}var Ae=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class a{#e=d(A);pauseOptions=r(Ae);closed=k();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",5)(1,"h3"),p(2,0),l()(),s(3,"div",6)(4,"div",7),K(5,Oe,2,3,"spk-radio",8,H),l(),s(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),l(),s(10,"spk-alert",11),p(11,2),l()()(),s(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),l(),s(15,"button",14),u("click",function(){return e.submit()}),p(16,4),l()()),t&2&&(_(5),W(e.pauseOptions()),_(3),S("active",e.pauseTransfers()),_(7),S("loader",e.isSubmitting()))},dependencies:[y,ae,h,ee],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var fe=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],$={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},me=Object.entries($).reduce((a,[n,t])=>(a[t]=n,a),{}),F=class a{#e=d(A);closed=k();isSubmitting=r(!1);sizeOptions=r(fe);maxUploadActive=r(!1);maxDownloadActive=r(!1);maxUpload=r(0);maxDownload=r(0);maxUploadUnit=r("MByte/s");maxDownloadUnit=r("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",c=t[2]??"MB",m=e[2]??"MB",Ee=i===""?10:parseInt(i),Ce=o===""?10:parseInt(o);this.maxUploadUnit.set(me[c]+"/s"),this.maxDownloadUnit.set(me[m]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ee),this.maxDownload.set(Ce)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${$[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${$[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let o;o=$localize`Cancel`;let c;return c=$localize` Update settings `,[n,t,e,i,o,c,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",6)(1,"h3"),p(2,0),l()(),s(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),l(),s(8,"spk-form-field")(9,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),R("ngModelChange",function(o){return D(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(o){return D(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(12,"div",9)(13,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(14,2),l(),s(15,"spk-form-field")(16,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),R("ngModelChange",function(o){return D(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(17,"spk-select",12)(18,"input",13),R("ngModelChange",function(o){return D(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),s(19,"p"),p(20,3),l()()(),s(21,"footer",14)(22,"button",15),u("click",function(){return e.closed.emit(!1)}),p(23,4),l(),s(24,"button",16),u("click",function(){return e.submit()}),p(25,5),l()()),t&2&&(_(6),S("active",e.maxUploadActive()),_(3),M("ngModel",e.maxUpload),g("disabled",!e.maxUploadActive()),_(),g("isClearable",!1)("options",e.sizeOptions()),_(),M("ngModel",e.maxUploadUnit),_(2),S("active",e.maxDownloadActive()),_(3),M("ngModel",e.maxDownload),g("disabled",!e.maxDownloadActive()),_(),g("isClearable",!1)("options",e.sizeOptions()),_(),M("ngModel",e.maxDownloadUnit),_(6),S("loader",e.isSubmitting()))},dependencies:[y,re,Se,pe,ue,ie,h,le],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Pe(a,n){if(a&1&&(s(0,"div"),T(1),l(),f(2,"spk-progress-bar",9)),a&2){let t=O();_(),B("",t.statusData().actionText," - ",t.statusData().statusText,""),_(),g("value",t.statusData().progress*100)}}function Ne(a,n){if(a&1&&(s(0,"div",5),T(1),s(2,"spk-icon"),T(3,"clock"),l(),T(4),G(5,"relativeTime"),G(6,"date"),l()),a&2){let t,e=O();_(),I(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - "),_(3),B(" ",q(5,3,e.nextBackup().time)," at ",Z(6,5,e.nextBackup().time,"shortTime")," ")}}function Me(a,n){a&1&&(s(0,"div",5),p(1,1),l())}function De(a,n){a&1&&(s(0,"div",6),P(1,2),f(2,"spk-spinner"),N(),l()),a&2&&(_(2),X("--spinner-size","12px")("--spinner-thickness","2px"))}function Re(a,n){a&1&&(P(0,0,1),f(1,"spk-icon"),N())}function Fe(a,n){a&1&&(P(0,0,2),f(1,"spk-icon"),N())}var ge=new Date,x=class a{#e=d(A);#t=d(_e);#n=d(te);#i=d(Q);minsAgo=ge.setMinutes(ge.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=U(()=>this.serverState()?.ProgramState==="Running");isResuming=r(!1);nextBackup=U(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(F,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=j(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(s(0,"div",3)(1,"div",4),L(2,Pe,3,3)(3,Ne,7,8,"div",5)(4,Me,2,0,"div",5)(5,De,3,4,"div",6),l(),s(6,"div",7)(7,"button",8),u("click",function(){return e.pauseResume()}),P(8,0),L(9,Re,2,0)(10,Fe,2,0),N(),l(),s(11,"button",8),u("click",function(){return e.openThrottleSettingsDialog()}),s(12,"spk-icon"),T(13,"speedometer"),l()()()()),t&2){let i;_(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),_(5),S("loader",e.isResuming()),_(2),v(e.isRunning()?9:10)}},dependencies:[oe,ce,J,Y,ne,se],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{x as a};
1
+ import{a as _e}from"./chunk-7LU4D3GR.js";import{c as re,e as pe,h as ue,j as Se,s as y}from"./chunk-T2OUHRUV.js";import{a as Q}from"./chunk-F4EEOSGJ.js";import{a as Y,b as ee,e as te,g as ne,i as h,l as ie,p as oe,q as ae,s as se,t as le}from"./chunk-NMXJMVL5.js";import{h as A}from"./chunk-JSGFZ2GA.js";import{a as ce}from"./chunk-L76NC2T6.js";import{j as J}from"./chunk-CKPICCFH.js";import{$b as T,Ac as U,Cb as V,F as E,Gb as P,Hb as N,Ib as p,Lb as j,Mb as u,Nb as O,Qa as _,Y as d,ab as C,bc as I,cc as B,da as w,ea as z,ec as M,fb as L,fc as D,gc as R,nb as g,ob as X,pb as S,pc as G,qa as k,qc as q,rc as Z,sb as v,tb as H,ua as r,ub as K,vb as W,wb as s,xb as l,yb as f}from"./chunk-W2F756OF.js";function Oe(a,n){if(a&1){let t=V();s(0,"spk-radio",10),u("click",function(){let i=w(t).$implicit,o=O();return z(o.pauseOption.set(i.value))}),T(1),l()}if(a&2){let t=n.$implicit,e=O();S("active",e.pauseOption()===t.value),_(),I(" ",t.label," ")}}var Ae=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class a{#e=d(A);pauseOptions=r(Ae);closed=k();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",5)(1,"h3"),p(2,0),l()(),s(3,"div",6)(4,"div",7),K(5,Oe,2,3,"spk-radio",8,H),l(),s(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),l(),s(10,"spk-alert",11),p(11,2),l()()(),s(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),l(),s(15,"button",14),u("click",function(){return e.submit()}),p(16,4),l()()),t&2&&(_(5),W(e.pauseOptions()),_(3),S("active",e.pauseTransfers()),_(7),S("loader",e.isSubmitting()))},dependencies:[y,ae,h,ee],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var fe=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],$={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},me=Object.entries($).reduce((a,[n,t])=>(a[t]=n,a),{}),F=class a{#e=d(A);closed=k();isSubmitting=r(!1);sizeOptions=r(fe);maxUploadActive=r(!1);maxDownloadActive=r(!1);maxUpload=r(0);maxDownload=r(0);maxUploadUnit=r("MByte/s");maxDownloadUnit=r("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",c=t[2]??"MB",m=e[2]??"MB",Ee=i===""?10:parseInt(i),Ce=o===""?10:parseInt(o);this.maxUploadUnit.set(me[c]+"/s"),this.maxDownloadUnit.set(me[m]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ee),this.maxDownload.set(Ce)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${$[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${$[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let o;o=$localize`Cancel`;let c;return c=$localize` Update settings `,[n,t,e,i,o,c,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(s(0,"header",6)(1,"h3"),p(2,0),l()(),s(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),l(),s(8,"spk-form-field")(9,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),R("ngModelChange",function(o){return D(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(o){return D(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(12,"div",9)(13,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(14,2),l(),s(15,"spk-form-field")(16,"input",11),u("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),R("ngModelChange",function(o){return D(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(17,"spk-select",12)(18,"input",13),R("ngModelChange",function(o){return D(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),s(19,"p"),p(20,3),l()()(),s(21,"footer",14)(22,"button",15),u("click",function(){return e.closed.emit(!1)}),p(23,4),l(),s(24,"button",16),u("click",function(){return e.submit()}),p(25,5),l()()),t&2&&(_(6),S("active",e.maxUploadActive()),_(3),M("ngModel",e.maxUpload),g("disabled",!e.maxUploadActive()),_(),g("isClearable",!1)("options",e.sizeOptions()),_(),M("ngModel",e.maxUploadUnit),_(2),S("active",e.maxDownloadActive()),_(3),M("ngModel",e.maxDownload),g("disabled",!e.maxDownloadActive()),_(),g("isClearable",!1)("options",e.sizeOptions()),_(),M("ngModel",e.maxDownloadUnit),_(6),S("loader",e.isSubmitting()))},dependencies:[y,re,Se,pe,ue,ie,h,le],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Pe(a,n){if(a&1&&(s(0,"div"),T(1),l(),f(2,"spk-progress-bar",9)),a&2){let t=O();_(),B("",t.statusData().actionText," - ",t.statusData().statusText,""),_(),g("value",t.statusData().progress*100)}}function Ne(a,n){if(a&1&&(s(0,"div",5),T(1),s(2,"spk-icon"),T(3,"clock"),l(),T(4),G(5,"relativeTime"),G(6,"date"),l()),a&2){let t,e=O();_(),I(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - "),_(3),B(" ",q(5,3,e.nextBackup().time)," at ",Z(6,5,e.nextBackup().time,"shortTime")," ")}}function Me(a,n){a&1&&(s(0,"div",5),p(1,1),l())}function De(a,n){a&1&&(s(0,"div",6),P(1,2),f(2,"spk-spinner"),N(),l()),a&2&&(_(2),X("--spinner-size","12px")("--spinner-thickness","2px"))}function Re(a,n){a&1&&(P(0,0,1),f(1,"spk-icon"),N())}function Fe(a,n){a&1&&(P(0,0,2),f(1,"spk-icon"),N())}var ge=new Date,x=class a{#e=d(A);#t=d(_e);#n=d(te);#i=d(Q);minsAgo=ge.setMinutes(ge.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=U(()=>this.serverState()?.ProgramState==="Running");isResuming=r(!1);nextBackup=U(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(F,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=C({type:a,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=j(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(s(0,"div",3)(1,"div",4),L(2,Pe,3,3)(3,Ne,7,8,"div",5)(4,Me,2,0,"div",5)(5,De,3,4,"div",6),l(),s(6,"div",7)(7,"button",8),u("click",function(){return e.pauseResume()}),P(8,0),L(9,Re,2,0)(10,Fe,2,0),N(),l(),s(11,"button",8),u("click",function(){return e.openThrottleSettingsDialog()}),s(12,"spk-icon"),T(13,"speedometer"),l()()()()),t&2){let i;_(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),_(5),S("loader",e.isResuming()),_(2),v(e.isRunning()?9:10)}},dependencies:[oe,ce,J,Y,ne,se],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{x as a};
@@ -0,0 +1 @@
1
+ import{a as le,b as pe}from"./chunk-Z2NFEFOH.js";import{a as re}from"./chunk-6FFPXENZ.js";import{a as Y}from"./chunk-GJROCOAD.js";import{b as Z,c as ee,e as te,h as ie,j as ne,s as oe}from"./chunk-T2OUHRUV.js";import{A as Q,a as K,g as U,l as W,o as X,t as j,y as H,z as J}from"./chunk-NMXJMVL5.js";import{$b as m,Ab as k,Ac as R,Cb as x,Gb as $,Hb as P,Ib as q,Mb as f,Nb as s,Qa as r,Sb as g,Y as B,Za as G,_b as E,ab as z,ac as L,bc as F,da as d,ea as u,ec as v,fb as C,fc as D,gc as b,nb as c,ra as I,sb as S,sc as A,tb as V,ua as h,ub as O,vb as y,wb as l,xb as a,yb as M,zb as N}from"./chunk-W2F756OF.js";import{a as T,b as w}from"./chunk-7CGTOI24.js";function me(n,o){if(n&1){let e=x();l(0,"button",14),f("click",function(){d(e);let t=s();return u(t.addFreeTextSetting())}),$(1,5),M(2,"spk-icon"),P(),a()}}function _e(n,o){if(n&1){let e=x();l(0,"button",16,0),f("click",function(){let t=d(e).$implicit,p=s(2);return u(p.addSetting(t))}),m(2),a()}if(n&2){let e=o.$implicit;r(2),L(e.name)}}function ce(n,o){if(n&1&&(l(0,"h3",7),m(1),a(),O(2,_e,3,1,"button",15,V)),n&2){let e=o.$implicit;r(),L(e.displayName),r(),y(e.options)}}function de(n,o){n&1&&(l(0,"div",12),m(1,"Add a setting above to get started."),a())}function ue(n,o){if(n&1){let e=x();l(0,"div",17)(1,"label"),m(2),a(),l(3,"div",23)(4,"spk-form-field")(5,"input",24),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateFreeTextSettingName(p,t))}),a(),l(6,"spk-icon",25),m(7,"rectangle-dashed"),a()(),l(8,"spk-form-field")(9,"input",24),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a(),l(10,"spk-icon",25),m(11,"textbox"),a()()()()}if(n&2){let e=s().$implicit;r(2),F(" ",e.FormView.shortDescription," "),r(3),c("ngModel",e.Name),r(4),c("ngModel",e.Value())}}function ge(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Ce(n,o){if(n&1){let e=x();l(0,"app-file-tree",18)(1,"label",26),m(2),C(3,ge,3,1,"spk-tooltip",27),a(),l(4,"input",28),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;c("startingPath",i.Value())("accepts",i.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),S(i.FormView.longDescription?3:-1),r(),g("id","destination-",i.Name,"-",t,""),c("ngModel",i.Value())}}function xe(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function fe(n,o){if(n&1){let e=x();l(0,"app-file-tree",19)(1,"label",26),m(2),C(3,xe,3,1,"spk-tooltip",27),a(),l(4,"input",28),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;c("startingPath",i.Value()),r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),S(i.FormView.longDescription?3:-1),r(),g("id","destination-",i.Name,"-",t,""),c("ngModel",i.Value())}}function Se(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Fe(n,o){n&1&&(l(0,"spk-icon",25),m(1,"link"),a())}function Te(n,o){n&1&&(l(0,"spk-icon",25),m(1,"textbox"),a())}function we(n,o){if(n&1){let e=x();l(0,"spk-form-field")(1,"label",26),m(2),C(3,Se,3,1,"spk-tooltip",27),a(),l(4,"input",28),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a(),C(5,Fe,2,0,"spk-icon",25)(6,Te,2,0,"spk-icon",25),a()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),S(i.FormView.longDescription?3:-1),r(),g("id","destination-",i.Name,"-",t,""),c("ngModel",i.Value()),r(),S(i.FormView.type==="Path"?5:6)}}function Ve(n,o){if(n&1){let e=x();l(0,"spk-icon",31),f("click",function(){d(e);let t=s(2).$implicit;return u(t.showPassword=!t.showPassword)}),m(1," eye "),a()}}function Oe(n,o){if(n&1){let e=x();l(0,"spk-icon",31),f("click",function(){d(e);let t=s(2).$implicit;return u(t.showPassword=!t.showPassword)}),m(1," eye-slash "),a()}}function ye(n,o){if(n&1){let e=x();l(0,"spk-form-field")(1,"label",26),m(2),a(),l(3,"input",29),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a(),l(4,"spk-icon",25),m(5,"password"),a(),C(6,Ve,2,0,"spk-icon",30)(7,Oe,2,0,"spk-icon",30),a()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),g("id","destination-",i.Name,"-",t,""),c("type",i.showPassword?"text":"password")("ngModel",i.Value()),r(3),S(i.showPassword?6:7)}}function ke(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Ie(n,o){if(n&1&&m(0),n&2){let e=o.$implicit;F(" ",e," ")}}function he(n,o){if(n&1){let e=x();l(0,"spk-select",32)(1,"label",26),m(2),C(3,ke,3,1,"spk-tooltip",27),a(),l(4,"input",28),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a()(),C(5,Ie,1,1,"ng-template",null,1,A)}if(n&2){let e=E(6),i=s(),t=i.$implicit,p=i.$index;c("options",t.FormView.options)("isClearable",!1)("optionTemplate",e),r(),g("for","destination-",t.Name,"-",p,""),r(),F(" ",t.FormView.shortDescription," "),r(),S(t.FormView.longDescription?3:-1),r(),g("id","destination-",t.Name,"-",p,""),c("ngModel",t.Value())}}function Me(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Ne(n,o){if(n&1){let e=x();l(0,"app-size",33),b("ngModelChange",function(t){d(e);let p=s().$implicit;return D(p.Value,t)||(p.Value=t),u(t)}),l(1,"label",26),m(2),C(3,Me,3,1,"spk-tooltip",27),a()()}if(n&2){let e,i=s(),t=i.$implicit,p=i.$index;c("inputType",t.Name),v("ngModel",t.Value),c("customId","destination-{{ item.Name }}-{{ $index }}"),r(),g("for","destination-",t.Name,"-",p,""),r(),F(" ",(e=t.FormView.shortDescription)!==null&&e!==void 0?e:t.FormView.name," "),r(),S(t.FormView.longDescription?3:-1)}}function $e(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Pe(n,o){if(n&1){let e=x();l(0,"spk-form-field")(1,"label",26),m(2),C(3,$e,3,1,"spk-tooltip",27),a(),l(4,"input",34),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a(),l(5,"spk-icon",25),m(6,"numpad"),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),S(i.FormView.longDescription?3:-1),r(),g("id","destination-",i.Name,"-",t,""),c("ngModel",i.Value())}}function Ee(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Le(n,o){if(n&1){let e=x();l(0,"spk-toggle",21)(1,"label",26),m(2),C(3,Ee,3,1,"spk-tooltip",27),a(),l(4,"input",35),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;r(),g("for","destination-",i.Name,"-",t,""),r(),F(" ",i.FormView.shortDescription," "),r(),S(i.FormView.longDescription?3:-1),r(),g("id","destination-",i.Name,"-",t,""),c("ngModel",i.Value())}}function ve(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function De(n,o){if(n&1&&m(0),n&2){let e=o.$implicit;F(" ",e," ")}}function be(n,o){if(n&1){let e=x();l(0,"spk-select",36)(1,"label",26),m(2),C(3,ve,3,1,"spk-tooltip",27),a(),l(4,"input",37),f("ngModelChange",function(t){d(e);let p=s().$implicit,_=s();return u(_.updateSettingValue(p,t))}),a()(),C(5,De,1,1,"ng-template",null,2,A)}if(n&2){let e=E(6),i=s(),t=i.$implicit,p=i.$index;c("options",t.FormView.options)("selectMultiple",!0)("optionTemplate",e),r(),g("for","destination-",t.Name,"-",p,""),r(),F(" ",t.FormView.shortDescription," "),r(),S(t.FormView.longDescription?3:-1),r(),c("ngModel",t.Value())}}function Ae(n,o){if(n&1&&(l(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;c("message",e.FormView.longDescription)}}function Re(n,o){if(n&1){let e=x();l(0,"app-timespan",33),b("ngModelChange",function(t){d(e);let p=s().$implicit;return D(p.Value,t)||(p.Value=t),u(t)}),l(1,"label",26),m(2),C(3,Ae,3,1,"spk-tooltip",27),a()()}if(n&2){let e,i=s(),t=i.$implicit,p=i.$index;c("inputType",t.Name),v("ngModel",t.Value),c("customId","destination-{{ item.Name }}-{{ $index }}"),r(),g("for","destination-",t.Name,"-",p,""),r(),F(" ",(e=t.FormView.shortDescription)!==null&&e!==void 0?e:t.FormView.name," "),r(),S(t.FormView.longDescription?3:-1)}}function Be(n,o){if(n&1){let e=x();l(0,"div",13),C(1,ue,12,3,"div",17)(2,Ce,5,14,"app-file-tree",18)(3,fe,5,10,"app-file-tree",19)(4,we,7,10,"spk-form-field")(5,ye,8,10,"spk-form-field")(6,he,7,12)(7,Ne,4,8,"app-size",20)(8,Pe,7,9,"spk-form-field")(9,Le,5,9,"spk-toggle",21)(10,be,7,9)(11,Re,4,8,"app-timespan",20),l(12,"button",22),f("click",function(){let t=d(e).$implicit,p=s();return u(p.removeSetting(t))}),l(13,"spk-icon"),m(14,"x-bold"),a()()()}if(n&2){let e=o.$implicit;r(),S(e.FormView.type==="FreeText"?1:e.FormView.type==="FileTree"?2:e.FormView.type==="FolderTree"?3:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?4:e.FormView.type==="Password"?5:e.FormView.type==="Enumeration"?6:e.FormView.type==="Size"?7:e.FormView.type==="Integer"?8:e.FormView.type==="Boolean"?9:e.FormView.type==="Flags"?10:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?11:-1)}}var ae=class n{#e=B(Y);options=G.required();hiddenOptions=I([]);hasFreeTextSettings=I(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=R(()=>{let o=this.hiddenOptions();return this.options().map(t=>{let p=this.allOptions().find(_=>_.name===t.Name?.replace("--",""));if(p&&!o.includes(p.name)){let _=t.Value??"";p.type==="Boolean"&&(_=_&&_.toLowerCase()==="true"||!1),p.type==="Integer"&&(_=parseInt(_)||0);let se=h(_);return w(T({},t),{Value:se,FormView:p})}else if(this.hasFreeTextSettings())return w(T({},t),{Value:h(t.Value),FormView:{name:t.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(t=>t!==null)});nonSelectedOptionsGrouped=R(()=>{let o=this.options().map(i=>i.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>w(T({},i),{options:i.options.filter(t=>!o.includes(t.name)&&!e.includes(t.name))})).filter(i=>i.options.length>0)});addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let t=[...i],p=t.findIndex(_=>_.Name===o.Name);return o.FormView.type==="Boolean"?(t[p].Value=e?"True":"False",t):o.FormView.type==="Integer"?(t[p].Value=e.toString(),t):(t[p].Value=e,t)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let t=[...i],p=t.findIndex(_=>_.Name===o.Name);return t[p].Name=e,t})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;return i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["option",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],[1,"field-row"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button"],["type","button",3,"click"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],[1,"primary",3,"message"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(l(0,"spk-toggle-card",6),N(1,7)(2),q(3,3),k(),l(4,"div",8),C(5,me,3,0,"button",9),l(6,"spk-menu",10)(7,"button",9),$(8,4),M(9,"spk-icon"),P(),a(),N(10,11),O(11,ce,4,1,null,null,V),k(),a()(),k(),C(13,de,2,0,"div",12),O(14,Be,15,1,"div",13,V),a()),e&2&&(c("disallowToggle",!0),r(5),S(i.hasFreeTextSettings()?5:-1),r(),c("searchable",!0),r(5),y(i.nonSelectedOptionsGrouped()),r(2),S(i.selectedSettings().length===0?13:-1),r(),y(i.selectedSettings()))},dependencies:[oe,ee,ne,Z,te,ie,re,H,W,U,X,Q,K,j,J,le,pe],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-level-60R);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}"],changeDetection:0})};export{ae as a};
@@ -1 +1 @@
1
- import{a as Ke}from"./chunk-VN7JM6M3.js";import{a as he,b as se}from"./chunk-HTNYQE2B.js";import{a as pe}from"./chunk-3W6M5IZL.js";import{a as be}from"./chunk-TJS6O6KD.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import{a as Be}from"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import{a as le}from"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{b as Ie,e as ke}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-WX7L7V6J.js";import{h as ae}from"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import{j as w,k as oe}from"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as F,Ab as P,Ac as fe,Cb as K,Gb as N,Hb as M,Ib as _,Jb as s,Kb as d,Lb as U,Mb as y,Nb as m,Qa as o,Y as R,ab as b,ac as x,bc as S,da as D,dc as Re,ea as $,fb as C,hc as De,ic as $e,jc as X,nb as h,pb as f,pc as u,qc as g,r as B,ra as ie,rc as T,sb as E,tb as I,ua as G,ub as k,vb as v,wb as i,xb as t,yb as c,zb as A}from"./chunk-W2F756OF.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.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%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
1
+ import{a as Ke}from"./chunk-SPHWZHBB.js";import{a as he,b as se}from"./chunk-HTNYQE2B.js";import{a as pe}from"./chunk-3W6M5IZL.js";import{a as be}from"./chunk-554T66WI.js";import"./chunk-7LU4D3GR.js";import"./chunk-EXJKKQZX.js";import{a as Be}from"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import{a as le}from"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{b as Ie,e as ke}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-NMXJMVL5.js";import{h as ae}from"./chunk-JSGFZ2GA.js";import"./chunk-L76NC2T6.js";import{j as w,k as oe}from"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as F,Ab as P,Ac as fe,Cb as K,Gb as N,Hb as M,Ib as _,Jb as s,Kb as d,Lb as U,Mb as y,Nb as m,Qa as o,Y as R,ab as b,ac as x,bc as S,da as D,dc as Re,ea as $,fb as C,hc as De,ic as $e,jc as X,nb as h,pb as f,pc as u,qc as g,r as B,ra as ie,rc as T,sb as E,tb as I,ua as G,ub as k,vb as v,wb as i,xb as t,yb as c,zb as A}from"./chunk-W2F756OF.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.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%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
@@ -1 +1 @@
1
- import{a as be}from"./chunk-URU2SLPX.js";import{s as xe}from"./chunk-T2OUHRUV.js";import{a as me,f as Ce,l as Pe,n as Ee,p as ve,z as Te}from"./chunk-WX7L7V6J.js";import{h as ge}from"./chunk-4AECHE4W.js";import{i as fe}from"./chunk-CKPICCFH.js";import{$b as S,Ac as W,B as ne,Bb as z,Bc as A,Cb as B,F as q,Ib as $,Jb as ae,Kb as ce,Mb as R,Nb as u,Ob as de,Pb as D,Qa as m,Xa as K,Y as X,Yb as J,Zb as pe,_b as Y,ab as ie,bc as ue,da as N,ea as k,fb as M,mc as V,n as ee,nb as U,nc as he,ob as se,pb as T,qa as Q,r as L,ra as v,sb as F,sc as _e,ua as O,ub as re,vb as oe,wb as h,x as te,xb as f,yb as le}from"./chunk-W2F756OF.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),T("active",e.pathDiscoveryMethod()==="browse"),m(2),T("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();T("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),T("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();T("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ge);#t=X(be);multiSelect=v(!1);disabled=v(!1);showFiles=v(!1);selectFiles=v(!1);accepts=v(null);startingPath=v(null);rootPaths=v([]);backupSettings=v(null);pathRefreshTrigger=v(!1);showHiddenNodes=v(!1);hideShortcuts=v(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),T("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),T("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,Te,me,Pe,Ee,ve,fe,xe],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
1
+ import{a as be}from"./chunk-GJROCOAD.js";import{s as xe}from"./chunk-T2OUHRUV.js";import{a as me,f as Ce,l as Pe,n as Ee,p as ve,z as Te}from"./chunk-NMXJMVL5.js";import{h as ge}from"./chunk-JSGFZ2GA.js";import{i as fe}from"./chunk-CKPICCFH.js";import{$b as S,Ac as W,B as ne,Bb as z,Bc as A,Cb as B,F as q,Ib as $,Jb as ae,Kb as ce,Mb as R,Nb as u,Ob as de,Pb as D,Qa as m,Xa as K,Y as X,Yb as J,Zb as pe,_b as Y,ab as ie,bc as ue,da as N,ea as k,fb as M,mc as V,n as ee,nb as U,nc as he,ob as se,pb as T,qa as Q,r as L,ra as v,sb as F,sc as _e,ua as O,ub as re,vb as oe,wb as h,x as te,xb as f,yb as le}from"./chunk-W2F756OF.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),T("active",e.pathDiscoveryMethod()==="browse"),m(2),T("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();T("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),T("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();T("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ge);#t=X(be);multiSelect=v(!1);disabled=v(!1);showFiles=v(!1);selectFiles=v(!1);accepts=v(null);startingPath=v(null);rootPaths=v([]);backupSettings=v(null);pathRefreshTrigger=v(!1);showHiddenNodes=v(!1);hideShortcuts=v(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),T("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),T("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,Te,me,Pe,Ee,ve,fe,xe],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-6OKAWH4X.js";import{a as B}from"./chunk-GDHVQU56.js";import{a as h}from"./chunk-O2YN63YI.js";import{h as S}from"./chunk-4AECHE4W.js";import{Ac as P,Bc as n,F as f,N as k,S as d,Y as o,n as g,r as u,ua as s}from"./chunk-W2F756OF.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var R={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},z=class r{#t=o(h);#l=o(S);#i=o(B);#e=o(m);#o=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=P(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(t=>a(l({},t),{backup:t.Item1?this.#i.getBackupById(t.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=n(()=>{this.#e.serverState()?.ActiveTask||this.#i.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#c=n(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}#r(){this.#o.set(!0),this.#l.getApiV1Progressstate().pipe(k(e=>{let t=e.TaskID??null;return t===null?g(e):this.#l.getApiV1TaskByTaskid({taskid:t}).pipe(u(i=>a(l({},e),{task:i??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,i=e.BackupID??null;t!==null&&i!==null&&(e.backup=this.#i.getBackupById(i)),this.#a.set(a(l({},e),{progress:this.#s(e),statusText:this.#n(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let t=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)t=0;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i;t=(e.ProcessedFileSize+i)/e.TotalFileSize,e.ProcessedFileCount===0?t=0:t>=.9&&(t=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?t=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?t=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?t=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?t=1:e.OverallProgress>0&&(t=e.OverallProgress);return t}#n(e){let t="Running \u2026";if(e.task&&e&&(t=e.Phase?R[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)t=`Counting (${e.TotalFileCount} files found, ${this.#t.transform(e.TotalFileSize)})`;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i,_=e.BackendSpeed<0?"":` at ${this.#t.transform(e.BackendSpeed)}/s`;t=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#t.transform(p)}) to go ${_}`}return t}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{z as a};
1
+ import{a as m}from"./chunk-EXJKKQZX.js";import{a as B}from"./chunk-OTLEEXAA.js";import{a as h}from"./chunk-O2YN63YI.js";import{h as S}from"./chunk-JSGFZ2GA.js";import{Ac as P,Bc as n,F as f,N as k,S as d,Y as o,n as g,r as u,ua as s}from"./chunk-W2F756OF.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var R={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},z=class r{#t=o(h);#l=o(S);#i=o(B);#e=o(m);#o=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=P(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(t=>a(l({},t),{backup:t.Item1?this.#i.getBackupById(t.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=n(()=>{this.#e.serverState()?.ActiveTask||this.#i.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#c=n(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}#r(){this.#o.set(!0),this.#l.getApiV1Progressstate().pipe(k(e=>{let t=e.TaskID??null;return t===null?g(e):this.#l.getApiV1TaskByTaskid({taskid:t}).pipe(u(i=>a(l({},e),{task:i??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,i=e.BackupID??null;t!==null&&i!==null&&(e.backup=this.#i.getBackupById(i)),this.#a.set(a(l({},e),{progress:this.#s(e),statusText:this.#n(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let t=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)t=0;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i;t=(e.ProcessedFileSize+i)/e.TotalFileSize,e.ProcessedFileCount===0?t=0:t>=.9&&(t=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?t=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?t=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?t=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?t=1:e.OverallProgress>0&&(t=e.OverallProgress);return t}#n(e){let t="Running \u2026";if(e.task&&e&&(t=e.Phase?R[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)t=`Counting (${e.TotalFileCount} files found, ${this.#t.transform(e.TotalFileSize)})`;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i,_=e.BackendSpeed<0?"":` at ${this.#t.transform(e.BackendSpeed)}/s`;t=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#t.transform(p)}) to go ${_}`}return t}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{z as a};
@@ -1 +1 @@
1
- import{c as P,e as v,f as L,i as w,n as V,q as x,r as X,t as U}from"./chunk-T2OUHRUV.js";import{d as A,e as I}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{B as G,a as b,c as h,g as $,l as B}from"./chunk-WX7L7V6J.js";import{h as y}from"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{$b as N,F as g,Gb as C,Hb as O,Ib as f,Lb as k,Mb as m,N as T,Qa as F,Y as u,ab as R,fb as S,lc as M,nb as c,pb as D,sb as E,ua as p,wb as i,xb as r,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new X,d=class l{#t=u(h);#e=u(y);#o=u(A);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(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.#r(o)})}#r(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_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=k(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),N(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",M(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[U,w,P,v,L,V,x,I,G,B,b,$],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{c as P,e as v,f as L,i as w,n as V,q as x,r as X,t as U}from"./chunk-T2OUHRUV.js";import{d as A,e as I}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{B as G,a as b,c as h,g as $,l as B}from"./chunk-NMXJMVL5.js";import{h as y}from"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{$b as N,F as g,Gb as C,Hb as O,Ib as f,Lb as k,Mb as m,N as T,Qa as F,Y as u,ab as R,fb as S,lc as M,nb as c,pb as D,sb as E,ua as p,wb as i,xb as r,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new X,d=class l{#t=u(h);#e=u(y);#o=u(A);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(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.#r(o)})}#r(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_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=k(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),N(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",M(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[U,w,P,v,L,V,x,I,G,B,b,$],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 +1 @@
1
- import{h as u}from"./chunk-4AECHE4W.js";import{Ac as s,Bc as g,F as r,S as n,Y as o,ua as l}from"./chunk-W2F756OF.js";var c=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],h=class a{#l=o(u);#e=l([]);LOG_LEVELS=c;logLevel=l("Disabled");logLevelByLabel=s(()=>c.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){console.log("updateLogLevel",e),this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{h as a};
1
+ import{h as u}from"./chunk-JSGFZ2GA.js";import{Ac as r,Bc as g,F as s,S as n,Y as o,ua as l}from"./chunk-W2F756OF.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-PFWSXI4B.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-HTNYQE2B.js";import{a as R}from"./chunk-TJS6O6KD.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{b as A,e as N}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as B,g as O}from"./chunk-WX7L7V6J.js";import{h as k}from"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as E,Ac as M,Gb as _,Hb as c,Ib as u,Lb as T,Mb as I,Qa as i,Y as m,ab as C,bc as L,fb as p,sb as s,tb as f,ua as l,ub as S,vb as g,wb as F,xb as a,yb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
1
+ import{a as $}from"./chunk-HTNYQE2B.js";import{a as R}from"./chunk-554T66WI.js";import"./chunk-7LU4D3GR.js";import"./chunk-EXJKKQZX.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{b as A,e as N}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as B,g as O}from"./chunk-NMXJMVL5.js";import{h as k}from"./chunk-JSGFZ2GA.js";import"./chunk-L76NC2T6.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{$b as E,Ac as M,Gb as _,Hb as c,Ib as u,Lb as T,Mb as I,Qa as i,Y as m,ab as C,bc as L,fb as p,sb as s,tb as f,ua as l,ub as S,vb as g,wb as F,xb as a,yb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{g as K}from"./chunk-X5YRWKCW.js";import{a as H}from"./chunk-DDM4R5FN.js";import"./chunk-4RGZG24K.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import{a as j}from"./chunk-SKJ6XSV3.js";import"./chunk-QP4QZQOW.js";import"./chunk-7L42EO7J.js";import{a as B}from"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import{a as b}from"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as w,h as W,p as X,s as z}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import{l as v}from"./chunk-CKPICCFH.js";import{$b as C,Ab as P,Ac as M,Bc as I,Gb as L,Hb as A,Ib as _,Jb as D,Kb as x,Nb as u,Qa as l,Y as T,ab as y,cc as f,fa as $,fb as g,ga as G,nb as O,pc as R,qc as E,sb as d,ua as h,wb as i,xb as s,yb as p,zb as m}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),C(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(C(0),R(1,"number"),R(2,"number")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(C(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=u();l(3),D((t=c.statusData())==null?null:t.statusText),x(2),l(2),O("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),d((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),d((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=I(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),d(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),O("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),O("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,X,z,w,W,j,b,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:100px;height:100px;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
1
+ import{g as K}from"./chunk-PFWSXI4B.js";import{a as H}from"./chunk-NE2V7X4C.js";import"./chunk-CD3DB23J.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import{a as j}from"./chunk-W6OH3HBG.js";import"./chunk-HXP5ZXIT.js";import"./chunk-7L42EO7J.js";import{a as B}from"./chunk-7LU4D3GR.js";import"./chunk-EXJKKQZX.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import{a as b}from"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as w,h as W,p as X,s as z}from"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import{l as v}from"./chunk-CKPICCFH.js";import{$b as C,Ab as P,Ac as M,Bc as I,Gb as L,Hb as A,Ib as _,Jb as D,Kb as x,Nb as u,Qa as l,Y as T,ab as y,cc as f,fa as $,fb as g,ga as G,nb as O,pc as R,qc as E,sb as d,ua as h,wb as i,xb as s,yb as p,zb as m}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),C(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(C(0),R(1,"number"),R(2,"number")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(C(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=u();l(3),D((t=c.statusData())==null?null:t.statusText),x(2),l(2),O("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),d((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),d((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=I(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),d(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),O("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),O("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,X,z,w,W,j,b,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:100px;height:100px;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c}from"./chunk-RN7NMYKV.js";import"./chunk-Z2NFEFOH.js";import"./chunk-6FFPXENZ.js";import"./chunk-SPHWZHBB.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1 +1 @@
1
- import{c as M}from"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{g as h}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{$b as O,Ib as l,Ob as C,Pb as c,Qa as u,Y as m,ab as s,fb as _,sb as f,wb as t,xb as i,yb as g}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
1
+ import{c as M}from"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{g as h}from"./chunk-NMXJMVL5.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{$b as O,Ib as l,Ob as C,Pb as c,Qa as u,Y as m,ab as s,fb as _,sb as f,wb as t,xb as i,yb as g}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
@@ -1,2 +1,2 @@
1
- import{a as K}from"./chunk-HTNYQE2B.js";import{a as z,d as J,g as q}from"./chunk-WX7L7V6J.js";import{h as X}from"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{$b as c,Bc as W,Cb as u,Gb as A,Hb as D,Ib as y,Mb as f,Na as E,Nb as S,Qa as l,Qb as w,Y as v,ab as h,ac as C,bc as I,cc as N,da as d,ea as _,ec as $,fb as k,fc as B,gc as V,hc as U,lc as G,nb as F,r as T,sb as M,tb as P,ua as m,ub as R,vb as x,wb as i,xb as a,yb as g}from"./chunk-W2F756OF.js";import{a as b,b as O}from"./chunk-7CGTOI24.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=S().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),f("click",function(){let o=d(e).$implicit,r=S();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),M(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{a as K}from"./chunk-HTNYQE2B.js";import{a as z,d as J,g as q}from"./chunk-NMXJMVL5.js";import{h as X}from"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{$b as c,Bc as W,Cb as u,Gb as A,Hb as D,Ib as y,Mb as f,Na as E,Nb as S,Qa as l,Qb as w,Y as v,ab as h,ac as C,bc as I,cc as N,da as d,ea as _,ec as $,fb as k,fc as B,gc as V,hc as U,lc as G,nb as F,r as T,sb as M,tb as P,ua as m,ub as R,vb as x,wb as i,xb as a,yb as g}from"./chunk-W2F756OF.js";import{a as b,b as O}from"./chunk-7CGTOI24.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=S().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),f("click",function(){let o=d(e).$implicit,r=S();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),M(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),R(2,Q,13,5,"div",2,P),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),f("click",function(){return d(o),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),x(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[z,q,J],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};