@duplicati/ngclient 0.0.131 → 0.0.132

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 (113) hide show
  1. package/{chunk-XOZRQBBW.js → chunk-2ASDVUFT.js} +1 -1
  2. package/chunk-2W4JV5JL.js +1 -0
  3. package/{chunk-FPLBURO5.js → chunk-2YHX57UE.js} +1 -1
  4. package/{chunk-CYLI6ZJ3.js → chunk-33FTKAPW.js} +1 -1
  5. package/{chunk-KU6D4KVX.js → chunk-3NGXNVFE.js} +1 -1
  6. package/{chunk-JWFYA3TO.js → chunk-3Q5JEF3K.js} +1 -1
  7. package/{chunk-KA4H3PM5.js → chunk-3TKRL3US.js} +1 -1
  8. package/{chunk-MXNLMTFY.js → chunk-3UMUFU7J.js} +1 -1
  9. package/chunk-4IODEYNF.js +1 -0
  10. package/{chunk-WIJ3HW7I.js → chunk-4JHY2ZIQ.js} +1 -1
  11. package/{chunk-CPQOWCF6.js → chunk-52WBX72O.js} +1 -1
  12. package/chunk-53F47EOA.js +1 -0
  13. package/{chunk-ZE5QAS4M.js → chunk-5CUMYXCI.js} +1 -1
  14. package/{chunk-KQAO2YHR.js → chunk-5CYNJ3KI.js} +1 -1
  15. package/{chunk-MHALSLG3.js → chunk-5ER6KMMG.js} +1 -1
  16. package/{chunk-K5AQUIEE.js → chunk-5RPDEEQ3.js} +1 -1
  17. package/{chunk-WY2KPAVB.js → chunk-67XQIEG5.js} +1 -1
  18. package/{chunk-K6EZTPNQ.js → chunk-67YRCRMI.js} +6 -6
  19. package/chunk-6FOROLCM.js +3 -0
  20. package/{chunk-E4Z6XEMU.js → chunk-6HRKFGKD.js} +1 -1
  21. package/{chunk-EKZRKTLM.js → chunk-6XD3ZTV3.js} +1 -1
  22. package/{chunk-GU7U3EFF.js → chunk-AKQVOUES.js} +1 -1
  23. package/chunk-AUWIW323.js +1 -0
  24. package/{chunk-P4ZYFRD3.js → chunk-BSRYIN2F.js} +1 -1
  25. package/{chunk-B5FKLIHW.js → chunk-BTTHW7KA.js} +1 -1
  26. package/{chunk-TUOSYDUU.js → chunk-D4QBTQXT.js} +1 -1
  27. package/{chunk-LQ2PCH6Q.js → chunk-DLVU5GHR.js} +1 -1
  28. package/{chunk-7LEXBIXG.js → chunk-DQM3ATT4.js} +1 -1
  29. package/chunk-DSRTEY6R.js +1 -0
  30. package/chunk-DXX4SHGM.js +1 -0
  31. package/chunk-DXY7PV4P.js +1 -0
  32. package/{chunk-Z2VKXGKY.js → chunk-EKL346XU.js} +1 -1
  33. package/{chunk-BISTLAYK.js → chunk-ENGSZPK6.js} +1 -1
  34. package/{chunk-UHRBTTCA.js → chunk-EW3XN62R.js} +1 -1
  35. package/{chunk-Q5QHAGHB.js → chunk-F47NJAFQ.js} +1 -1
  36. package/{chunk-4D2NUH5S.js → chunk-FBULENUD.js} +1 -1
  37. package/{chunk-3PYBMCOB.js → chunk-FC45TEB6.js} +1 -1
  38. package/{chunk-Q3ILJYED.js → chunk-FJ2TDPI3.js} +1 -1
  39. package/chunk-FQAHXSGY.js +1 -0
  40. package/chunk-FX2XKS5C.js +1 -0
  41. package/{chunk-VKD4Y3YQ.js → chunk-GP2W7XZF.js} +1 -1
  42. package/chunk-GXCMYX2K.js +1 -0
  43. package/chunk-HJQBTK5I.js +1 -0
  44. package/{chunk-KV7SEZ24.js → chunk-HPZ6HLJE.js} +1 -1
  45. package/{chunk-HWCTRSCV.js → chunk-IVP5ZHDB.js} +1 -1
  46. package/{chunk-Z24H5QI5.js → chunk-J64ETWKB.js} +1 -1
  47. package/{chunk-D6CQCWWK.js → chunk-JADCKIQ4.js} +1 -1
  48. package/{chunk-K5P3KNHL.js → chunk-L6BZ6TEU.js} +1 -1
  49. package/chunk-LGC2UEAO.js +1 -0
  50. package/chunk-LLV2UR7Z.js +1 -0
  51. package/chunk-M65WTTXI.js +1 -0
  52. package/{chunk-YFRT24NZ.js → chunk-MAHKEFZE.js} +1 -1
  53. package/chunk-NKYXZEX2.js +1 -0
  54. package/{chunk-P45GAY6A.js → chunk-NPPD4I4N.js} +1 -1
  55. package/chunk-NQVDTTCD.js +6 -0
  56. package/chunk-NVMLEB3O.js +1 -0
  57. package/{chunk-WWHML7QK.js → chunk-O4HSW7GI.js} +1 -1
  58. package/{chunk-UVLJAD66.js → chunk-OQHMS5HM.js} +1 -1
  59. package/{chunk-ABF3SFY5.js → chunk-PL2MNRTA.js} +1 -1
  60. package/chunk-PTDOM6EA.js +1 -0
  61. package/{chunk-U4OAPG74.js → chunk-Q6YWYUN4.js} +1 -1
  62. package/chunk-QB3BX6FC.js +1 -0
  63. package/{chunk-R43ZLOB3.js → chunk-RIMBSV7X.js} +1 -1
  64. package/chunk-RNYYB7Z7.js +1 -0
  65. package/{chunk-XD26KCAE.js → chunk-T3KWCIYP.js} +1 -1
  66. package/{chunk-FWZV4DTQ.js → chunk-TKOD3RB3.js} +1 -1
  67. package/chunk-TQPOMS6Q.js +1 -0
  68. package/{chunk-76QLZQIX.js → chunk-U44OBOIE.js} +1 -1
  69. package/{chunk-DDV32SDB.js → chunk-UEX6XU6A.js} +1 -1
  70. package/{chunk-LZGUK3CQ.js → chunk-ULGBY3HN.js} +1 -1
  71. package/{chunk-RFBJR3ZC.js → chunk-UXQ6EH3H.js} +1 -1
  72. package/{chunk-VNYGRDVP.js → chunk-WYY5FAMC.js} +1 -1
  73. package/{chunk-F74MXVWD.js → chunk-WZIEF5KL.js} +1 -1
  74. package/chunk-X7GQQCVS.js +1 -0
  75. package/{chunk-FWVOVJCG.js → chunk-XD6MBGQY.js} +1 -1
  76. package/chunk-XH2AUUSU.js +1 -0
  77. package/chunk-XLVTJGQW.js +1 -0
  78. package/chunk-ZCT7SRIM.js +1 -0
  79. package/chunk-ZF3UEKWP.js +1 -0
  80. package/chunk-ZJQCMD5B.js +1 -0
  81. package/{chunk-W2XSKJJ5.js → chunk-ZXT5JBAK.js} +1 -1
  82. package/index.html +2 -2
  83. package/{main-JMFOP3Z7.js → main-MG43J5KN.js} +1 -1
  84. package/package.json +1 -1
  85. package/styles-YRN2WTKF.css +1 -0
  86. package/chunk-3IRKJXHE.js +0 -6
  87. package/chunk-3KIPRGE2.js +0 -1
  88. package/chunk-5PEBIF7G.js +0 -1
  89. package/chunk-5ZODA7EN.js +0 -1
  90. package/chunk-AGU2PEL5.js +0 -1
  91. package/chunk-CTRHZCKS.js +0 -1
  92. package/chunk-DM2VSIZA.js +0 -1
  93. package/chunk-FLMFEFKM.js +0 -1
  94. package/chunk-FO4W6SOP.js +0 -1
  95. package/chunk-GGT3NXAX.js +0 -1
  96. package/chunk-GW37Y5Z7.js +0 -1
  97. package/chunk-IAE5MH6W.js +0 -1
  98. package/chunk-LPSXYSH2.js +0 -1
  99. package/chunk-LXOONGVP.js +0 -1
  100. package/chunk-N334RUEQ.js +0 -1
  101. package/chunk-OMZ3W4RW.js +0 -1
  102. package/chunk-R3TWV35H.js +0 -4
  103. package/chunk-RVLLX2SW.js +0 -1
  104. package/chunk-RZWJA6W3.js +0 -3
  105. package/chunk-TOP2X7ZJ.js +0 -1
  106. package/chunk-UFZFKKK7.js +0 -1
  107. package/chunk-UIC4BWTY.js +0 -1
  108. package/chunk-UUG7G5LZ.js +0 -1
  109. package/chunk-UYWLCW5G.js +0 -1
  110. package/chunk-XHQO75TB.js +0 -1
  111. package/chunk-YBFTPRR5.js +0 -1
  112. package/chunk-YXIITZFM.js +0 -1
  113. package/styles-ORRIWQJ5.css +0 -1
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-Q3ILJYED.js";import{a as te}from"./chunk-WY2KPAVB.js";import"./chunk-4D2NUH5S.js";import{a as Q}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import{c as Y,e as Z,h as x,s as ee}from"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{b as z,e as q}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as H,g as W,l as j}from"./chunk-MHALSLG3.js";import{h as J}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{E as g,F as d,Gc as k,Hb as r,Hc as h,Ib as p,Jb as F,Kb as K,Lb as L,N as E,Nb as u,Oa as s,X as D,_a as y,_b as P,ac as U,bc as C,gc as w,hc as X,ic as V,la as c,pb as v,qb as G,r as O,ub as A,vb as i,wb as a,xb as l}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe(()=>this.lastValidatedPath.set(""))}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),K((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),L(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),U(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),G(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
1
+ import{a as ae}from"./chunk-FJ2TDPI3.js";import{a as te}from"./chunk-67XQIEG5.js";import"./chunk-FBULENUD.js";import{a as Q}from"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import{c as Y,e as Z,i as x,s as ee}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as z,e as q}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as H,g as W,l as j}from"./chunk-5ER6KMMG.js";import{h as J}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{E as g,F as d,Fc as k,Gc as h,Hb as r,Ib as p,Jb as F,Kb as K,Lb as L,N as E,Nb as u,Oa as s,X as D,_a as y,_b as P,ac as U,bc as C,gc as w,hc as X,ic as V,la as c,pb as v,qb as G,r as O,ub as A,vb as i,wb as a,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe(()=>this.lastValidatedPath.set(""))}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),K((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),L(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),U(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),G(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ULGBY3HN.js";import"./chunk-U44OBOIE.js";import"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as default};
@@ -1 +1 @@
1
- import{h as c}from"./chunk-FWVOVJCG.js";import{F as a,Gc as i,P as p,S as u,X as l,la as o}from"./chunk-K6EZTPNQ.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{h as c}from"./chunk-XD6MBGQY.js";import{F as a,Fc as i,P as p,S as u,X as l,la as o}from"./chunk-67YRCRMI.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-Q3ILJYED.js";import{a as R}from"./chunk-WY2KPAVB.js";import"./chunk-4D2NUH5S.js";import"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{b as A,e as N}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as k,g as B}from"./chunk-MHALSLG3.js";import{h as O}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Gc as M,Hb as c,Ib as d,Jb as l,Mb as g,Nb as I,Oa as i,X as C,_a as p,bc as E,dc as L,la as r,pb as s,qb as u,rb as f,sb as S,tb as T,vb as F,wb as a,xb as _}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function b(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function h(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=C(O);#e=C(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=p({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=g(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&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"spk-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,b,1,0),s(12,P,1,0),s(13,h,1,0),s(14,v,1,0),d(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,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-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
1
+ import{a as $}from"./chunk-FJ2TDPI3.js";import{a as R}from"./chunk-67XQIEG5.js";import"./chunk-FBULENUD.js";import"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as A,e as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as k,g as B}from"./chunk-5ER6KMMG.js";import{h as O}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Fc as M,Hb as c,Ib as d,Jb as l,Mb as g,Nb as I,Oa as i,X as C,_a as p,bc as E,dc as L,la as r,pb as s,qb as u,rb as f,sb as S,tb as T,vb as F,wb as a,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function b(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function h(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=C(O);#e=C(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=p({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=g(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&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"spk-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,b,1,0),s(12,P,1,0),s(13,h,1,0),s(14,v,1,0),d(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,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-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{b as re}from"./chunk-WY2KPAVB.js";import{a as ne}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import{a as ie}from"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import{a as te}from"./chunk-JWFYA3TO.js";import{b as oe,e as ae,h as le,s as _e}from"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{d as q,e as H}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-MHALSLG3.js";import{h as ee}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Gc as B,Jb as c,Kb as D,Lb as S,Mb as F,Mc as j,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,r as K,rc as v,sc as z,ub as A,vb as i,vc as V,wb as o,yc as W}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
1
+ import{b as re}from"./chunk-67XQIEG5.js";import{a as ne}from"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import{a as ie}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{a as te}from"./chunk-3Q5JEF3K.js";import{b as oe,e as ae,i as le,s as _e}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as q,e as H}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-5ER6KMMG.js";import{h as ee}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Fc as B,Jb as c,Kb as D,Lb as S,Lc as j,Mb as F,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,qc as v,r as K,rc as z,ub as A,uc as V,vb as i,wb as o,xc as W}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
@@ -1 +1 @@
1
- import{qa as l}from"./chunk-VKD4Y3YQ.js";import{X as p,bb as f}from"./chunk-K6EZTPNQ.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
1
+ import{qa as l}from"./chunk-GP2W7XZF.js";import{X as p,bb as f}from"./chunk-67YRCRMI.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
@@ -1 +1 @@
1
- import{a as O,c as P,e as E,h as v,j as N,s as I}from"./chunk-3KIPRGE2.js";import{l as y,o as X,t as Y}from"./chunk-MHALSLG3.js";import{Bb as x,Gc as m,Hc as h,Jb as F,Kb as A,Lb as D,Mc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,qc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-K6EZTPNQ.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e)});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
1
+ import{a as O,c as P,e as E,i as v,k as N,s as I}from"./chunk-ZCT7SRIM.js";import{l as y,o as X,t as Y}from"./chunk-5ER6KMMG.js";import{Bb as x,Fc as m,Gc as h,Jb as F,Kb as A,Lb as D,Lc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,pc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-67YRCRMI.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e.replace("--",""))});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-WY2KPAVB.js";import{a as R}from"./chunk-KQAO2YHR.js";import"./chunk-FPLBURO5.js";import"./chunk-UVLJAD66.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as F,g as U,p as w}from"./chunk-MHALSLG3.js";import{h as L}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as S,F as d,Gc as O,Jb as E,Kb as x,La as T,Lb as M,Nb as k,Oa as l,Ob as _,X as m,_a as G,_b as P,ba as u,bc as s,ca as g,cc as b,la as C,pb as p,qb as c,r as A,ub as N,vb as a,wb as o,xb as f}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=_(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),p(2,V,4,1,"a",6)}if(n&2){let e,t=_();P("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(L);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(p(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),p(7,$,3,3)(8,I,2,0,"button",4),p(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;c(t.isLoading()?0:-1),l(5),x(t.duplicatiVersion()),M(5),l(2),c(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),c(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[w,U,F],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
1
+ import{a as D}from"./chunk-67XQIEG5.js";import{a as R}from"./chunk-5CYNJ3KI.js";import"./chunk-2YHX57UE.js";import"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as F,g as U,p as w}from"./chunk-5ER6KMMG.js";import{h as L}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as S,F as d,Fc as O,Jb as E,Kb as x,La as T,Lb as M,Nb as k,Oa as l,Ob as _,X as m,_a as G,_b as P,ba as u,bc as s,ca as g,cc as b,la as C,pb as p,qb as c,r as A,ub as N,vb as a,wb as o,xb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=_(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),p(2,V,4,1,"a",6)}if(n&2){let e,t=_();P("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(L);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(p(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),p(7,$,3,3)(8,I,2,0,"button",4),p(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;c(t.isLoading()?0:-1),l(5),x(t.duplicatiVersion()),M(5),l(2),c(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),c(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[w,U,F],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
@@ -0,0 +1 @@
1
+ import{f as a,g as b}from"./chunk-53F47EOA.js";import"./chunk-XLVTJGQW.js";import"./chunk-4JHY2ZIQ.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-MHALSLG3.js";import{Mc as h,Nb as m,Oa as r,Pb as f,Pc as _,Qb as a,_a as g,_b as C,bc as s,pb as d,qb as p,vb as o,wb as n}from"./chunk-K6EZTPNQ.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var l=class e{isActive=_(!1);disallowToggle=h(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&C("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),d(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
1
+ import{a as u}from"./chunk-5ER6KMMG.js";import{Lc as h,Nb as m,Oa as r,Oc as _,Pb as f,Qb as a,_a as g,_b as C,bc as s,pb as d,qb as p,vb as o,wb as n}from"./chunk-67YRCRMI.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var l=class e{isActive=_(!1);disallowToggle=h(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&C("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),d(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
@@ -1,2 +1,2 @@
1
- import{a as q}from"./chunk-WY2KPAVB.js";import{a as W,d as X,g as z}from"./chunk-MHALSLG3.js";import{h as J}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as f,Hb as A,Hc as G,Ib as D,Jb as y,La as k,Nb as C,Oa as r,Ob as S,X as h,_a as F,ba as d,bc as s,ca as _,cc as I,dc as L,ec as w,gc as N,hc as $,ic as B,la as m,mc as V,pb as v,qb as M,r as E,rb as P,rc as U,sb as R,tb as x,ub as g,vb as o,wb as a,xb as u}from"./chunk-K6EZTPNQ.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{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 q}from"./chunk-67XQIEG5.js";import{a as W,d as X,g as z}from"./chunk-5ER6KMMG.js";import{h as J}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as f,Gc as G,Hb as A,Ib as D,Jb as y,La as k,Nb as C,Oa as r,Ob as S,X as h,_a as F,ba as d,bc as s,ca as _,cc as I,dc as L,ec as w,gc as N,hc as $,ic as B,la as m,mc as V,pb as v,qb as M,qc as U,r as E,rb as P,sb as R,tb as x,ub as g,vb as o,wb as a,xb as u}from"./chunk-67YRCRMI.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{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 i=0;i<e.length;i++)n+=`<li>${e[i]}</li>`;return n}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=F({type:l,selectors:[["app-libraries"]],decls:14,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 i=f();o(0,"h3"),y(1,0),a(),R(2,H,13,5,"div",2,P),o(4,"spk-dialog",3),B("isOpenChange",function(p){return d(i),$(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),o(5,"header",4)(6,"h3"),s(7),a()(),o(8,"div",5)(9,"div",6),s(10),a()(),o(11,"footer",7)(12,"button",8),C("click",function(){return d(i),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),s(13,"Close"),a()()()}if(e&2){let i,c;r(2),x(n.licenses()),r(2),N("isOpen",n.dialogIsOpen),g("options",U(4,K)),r(3),I((i=n.dialogLicense())==null?null:i.Title);let p=((c=n.dialogLicense())==null?null:c.License)??"";r(3),L(" ",p," ")}},dependencies:[W,z,X],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-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);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-4)}"],changeDetection:0})};export{b as default};
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-XLVTJGQW.js";import{a as Re}from"./chunk-4JHY2ZIQ.js";import{a as rt,b as Ve,c as _t}from"./chunk-5RPDEEQ3.js";import{a as ae}from"./chunk-67XQIEG5.js";import{a as ot}from"./chunk-FC45TEB6.js";import{a as Ee}from"./chunk-2YHX57UE.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as lt,i as oe,j as he,k as Pe,n as at,o as Ne,p as st,q as De,r as Me,s as le,t as ye}from"./chunk-ZCT7SRIM.js";import{b as ne,d as H}from"./chunk-DQM3ATT4.js";import{A as Se,C as nt,a as j,b as Je,e as et,g as ie,l as q,p as tt,t as Y}from"./chunk-5ER6KMMG.js";import{h as it}from"./chunk-XD6MBGQY.js";import{Bb as x,F as we,Fc as R,Gc as me,Hb as g,Ib as C,Jb as T,Kc as ve,Lc as Be,Mb as Ue,Mc as Fe,Nb as F,Oa as r,Ob as u,S as pe,Wb as de,X as D,Xb as ge,Yb as Ge,_a as z,_b as Ce,ba as c,bc as I,ca as p,cc as xe,db as Ye,dc as Ze,gc as O,hc as $,ic as w,la as m,ob as Qe,pb as M,qb as y,qc as be,rb as ke,sb as Le,tb as Ie,ub as E,vb as a,wb as s,xb as d,yb as v,zb as B}from"./chunk-67YRCRMI.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var Oe=class l{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};function Ct(l,t){if(l&1){let e=x();a(0,"div",24)(1,"spk-form-field")(2,"label",25),T(3,7),s(),a(4,"input",26,0),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),F("focus",function(){c(e);let i=Ge(5);return p(i.showPicker())}),s(),a(6,"spk-icon",27),I(7,"clock"),s()(),a(8,"spk-form-field"),d(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),F("focus",function(){c(e);let i=Ge(11);return p(i.showPicker())}),s(),a(12,"spk-icon",27),I(13,"calendar"),s()()(),a(14,"div",24)(15,"spk-form-field")(16,"label",30),T(17,8),s(),a(18,"input",31),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),s()(),a(19,"spk-select",32)(20,"input",33),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),s()()(),a(21,"app-toggle-card",34),v(22,35),T(23,9),B(),a(24,"div",36)(25,"spk-toggle",19),g(26,10),a(27,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),s(),C(),s(),a(28,"spk-toggle",19),g(29,11),a(30,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),s(),C(),s(),a(31,"spk-toggle",19),g(32,12),a(33,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),s(),C(),s(),a(34,"spk-toggle",19),g(35,13),a(36,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),s(),C(),s(),a(37,"spk-toggle",19),g(38,14),a(39,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),s(),C(),s(),a(40,"spk-toggle",19),g(41,15),a(42,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),s(),C(),s(),a(43,"spk-toggle",19),g(44,16),a(45,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),s(),C(),s()()()}if(l&2){let e=u();r(4),O("ngModel",e.scheduleFields.nextTime().time),r(6),O("ngModel",e.scheduleFields.nextTime().date),r(8),O("ngModel",e.scheduleFields.runAgain().repeatValue),r(),E("options",e.unitOptions)("isClearable",!1),r(),O("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),E("disallowToggle",!0),r(6),O("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],te={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class l{#e=D(J);#t=D(H);#i=D(ne);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let S;S=$localize`Run again every`;let A;A=$localize`Allowed days`;let k;k=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,_,S,A,k,U,h,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),T(1,2),s(),a(2,"div",18)(3,"spk-toggle",19),g(4,3),a(5,"input",20),w("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),s(),C(),s(),a(6,"p"),T(7,4),s()(),M(8,Ct,46,14),a(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),g(11,5),d(12,"spk-icon"),C(),s(),a(13,"button",23),F("click",function(){return n.next()}),g(14,6),d(15,"spk-icon"),C(),s()()),e&2&&(r(5),O("ngModel",n.scheduleFields.autoRun),r(3),y(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Pe,Te,Z,oe,q,Se,j,ie,Y,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(l,t){if(l&1&&(v(0,4),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(l,t){if(l&1&&(v(0,5),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class l{path=Be.required();osType=Be();pathChange=ve();remove=ve();internalPath=m("");pathType=m("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=me(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(a(0,"spk-select",0)(1,"input",1),w("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s()(),a(2,"spk-form-field",2)(3,"input",3),w("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s(),M(4,Ft,2,1,"ng-container",4),M(5,St,2,1,"ng-container",5),s(),a(6,"div",6),F("click",function(){return n.removeFilter()}),a(7,"spk-icon",7),I(8,"x-circle"),s()()),e&2){let i,o;E("options",n.expressionOptions())("isClearable",!1),r(),O("ngModel",n.pathType),r(2),O("ngModel",n.internalPath),r(),y(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),r(),y(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,oe,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(l,t){if(l&1){let e=x();a(0,"spk-form-field",42)(1,"input",43),w("ngModelChange",function(i){c(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),s()(),a(2,"button",44),F("click",function(){c(e);let i=u(2);return p(i.updatePath())}),a(3,"spk-icon"),I(4,"floppy-disk"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"spk-icon"),I(7,"x-bold"),s()()}if(l&2){let e=u(2);r(),O("ngModel",e.editingPath),E("ngModelOptions",be(2,ct))}}function At(l,t){if(l&1){let e=x();a(0,"spk-form-field",42),d(1,"input",45),s(),a(2,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"spk-icon"),I(4,"pen"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"spk-icon"),I(7,"trash-simple"),s()()}if(l&2){let e=u().$implicit;Qe("readonly",!0),r(),E("ngModel",e)("ngModelOptions",be(3,ct))}}function ht(l,t){if(l&1&&(a(0,"div",30),M(1,ft,8,3)(2,At,8,4),s()),l&2){let e=t.$implicit,n=u();r(),y(n.oldPath()===e?1:2)}}function Pt(l,t){if(l&1){let e=x();a(0,"app-new-filter",47),F("pathChange",function(i){let o=c(e).$index,_=u(2);return p(_.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),s()}if(l&2){let e=t.$implicit,n=u(2);E("path",e)("osType",n.osType()??"")}}function Nt(l,t){if(l&1&&Le(0,Pt,1,2,"app-new-filter",46,ke),l&2){let e=u();Ie(e.pathArray())}}function Dt(l,t){if(l&1&&(a(0,"div",41)(1,"spk-form-field"),d(2,"input",48),s(),a(3,"spk-select",49),d(4,"input",50),s()()),l&2){let e=u();r(3),E("options",e.sizeOptions())("isClearable",!1)}}var V=new Me,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(l={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(l.path),excludes:V.group({hidden:V.control(l.excludes.hidden),system:V.control(l.excludes.system),temporary:V.control(l.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class l{#e=D(J);#t=D(H);#i=D(ne);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new lt("");filesLargerThan=R(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=m(Mt);osType=this.#e.osType;pathSignal=ae(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=m(null);editingPath=m(null);addingNewPath=m(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),o=this.pathArray().map((_,S)=>S===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&de(n.formRef,Tt,5),e&2&&ge()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let _;_=$localize`Source Data`;let S;S=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let k;k=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let U;U=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let re;re=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let f;f=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],_,S,A,k,U,h,L,K,b,X,N,ee,re,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),F("submit",function(){return c(i),p(n.next())}),a(2,"div",17)(3,"h3",18),T(4,1),s(),a(5,"app-file-tree",19)(6,"label",20),T(7,2),s(),d(8,"input",21),s(),a(9,"div",22)(10,"button",23),F("click",function(){return c(i),p(n.goBack())}),g(11,3),d(12,"spk-icon"),C(),s(),a(13,"button",24),g(14,4),d(15,"spk-icon"),C(),s()()(),a(16,"div",25)(17,"app-toggle-card",26),v(18,27),T(19,5),B(),a(20,"p",28),T(21,6),s(),a(22,"div",29),Le(23,ht,3,1,"div",30,ke),a(25,"div",31)(26,"spk-form-field"),d(27,"input",32),s(),a(28,"button",33),F("click",function(){return c(i),p(n.addNewPath())}),a(29,"spk-icon"),I(30,"plus"),s()()()()(),a(31,"app-toggle-card",26),v(32,27),T(33,7),B(),a(34,"p",28),T(35,8),s(),a(36,"button",34),F("click",function(){return c(i),p(n.addFilter())}),T(37,9),s(),M(38,Nt,2,0),s(),a(39,"app-toggle-card",35),v(40,27),T(41,10),B(),a(42,"p",28),T(43,11),s(),a(44,"spk-toggle",36),g(45,12),d(46,"input",37),C(),s(),a(47,"spk-toggle",36),g(48,13),d(49,"input",38),C(),s(),a(50,"spk-toggle",36),g(51,14),d(52,"input",39),C(),s(),a(53,"spk-toggle",40),F("click",function(){return c(i),p(n.toggleFilesLargerThan())}),T(54,15),s(),M(55,Dt,5,2,"div",41),s()()()}if(e&2){let i;E("formGroup",n.sourceDataForm),r(5),E("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),E("disallowToggle",!0),r(6),Ie(n.nonFilterPaths()),r(4),E("formControl",n.newPathCtrl),r(4),E("disallowToggle",!0),r(7),y((i=n.pathSignal())!=null&&i.length?38:-1),r(),E("disallowToggle",!0),r(14),Ce("active",n.filesLargerThan()),r(2),y(n.filesLargerThan()?55:-1)}},dependencies:[le,he,Q,Pe,Te,Z,Ae,oe,ye,at,Ne,De,st,q,j,ie,Se,Y,$e,ut,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class l{#e=D(H);#t=D(Ee);#i=D(et);#n=D(it);#o=D(Oe);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:m(te.autoRun),nextTime:m(te.nextTime),runAgain:m(te.runAgain)};settings=m([]);optionsFields={remoteVolumeSize:m("50MB"),backupRetention:m("all"),backupRetentionTime:m(""),backupRetentionVersions:m(0),backupRetentionCustom:m("")};targetUrlModel=m(null);oauthServiceLink=R(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=R(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=m(!1);backupId=m(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=m(!1);finishedLoading=m(!1);backupDefaults=m(null);applicationOptions=m(null);isNew=R(()=>this.backupId()==="new");osType=R(()=>this.#t.systemInfo()?.OSType);selectedOptions=m([]);sourceDataFormSignal=ae(this.sourceDataForm.valueChanges);generalFormSignal=ae(this.generalForm.valueChanges);encryptionFieldSignal=ae(this.generalForm.controls.encryption.valueChanges);destinationOptions=R(()=>this.#t.backendModules()??[]);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#l)??[]);#l(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[He,...t]});nonSelectedOptions=R(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#s(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#a(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#a(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(S=>`${S.Include?"":"-"}${S.Expression}`)??[],i=t.Settings?.find(S=>S.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(S=>S.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",o={name:t.Name??"",description:t.Description??""};i&&i!==""&&(o.encryption=i),n&&n!==""&&(o.password=n,o.repeatPassword=n),this.generalForm.patchValue(o)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#r(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var o="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(o)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#s(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let _=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,L])=>L).map(([h,L])=>h):[],S=n.path?.split("\0")??[],A=this.mapFormsToSettings(),k=Object.entries(n.excludes??{}).filter(([h,L])=>L&&h!=="filesLargerThan").map(([h])=>h),U=n.excludes?.filesLargerThan;return k.length&&A.push({Name:"--exclude-files-attributes",Value:k.join(",")}),U&&U.size!==null&&U.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${U.size}${U.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:S.filter(h=>!h.startsWith("-")),Settings:A,Filters:S.filter(h=>h.startsWith("-")).map((h,L)=>({Order:L,Include:!1,Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:_}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":o.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":o.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":o.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":o.push({Name:"retention-policy",Value:dt});break}let _=[...t,...n],S=this.settings().filter(A=>!_.includes(A.Name)).map(A=>{let k=A.Value;return typeof A.Value=="number"&&(k=A.Value.toString()),typeof A.Value=="boolean"&&(k=A.Value?"True":"False"),{Name:A.Name,Value:k}});return[...i,...o,...S]}#r(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#a(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(l,t){l&1&&(a(0,"spk-alert",17),g(1,5),d(2,"spk-icon",26),C(),s())}function Ot(l,t){if(l&1&&I(0),l&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(l,t){if(l&1&&d(0,"spk-progress-bar",40),l&2){let e=u(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),E("value",e.calculatePasswordStrength()*(100/5))}}function wt(l,t){l&1&&(a(0,"span",35),T(1,10),s())}function kt(l,t){l&1&&(g(0,8,1),d(1,"spk-icon"),C())}function Lt(l,t){l&1&&(g(0,8,2),d(1,"spk-icon"),C())}function It(l,t){l&1&&(g(0,11,1),d(1,"spk-icon",42),C())}function Ut(l,t){l&1&&(g(0,11,2),d(1,"spk-icon"),C())}function Gt(l,t){if(l&1){let e=x();a(0,"button",41),F("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),g(1,11),M(2,It,2,0)(3,Ut,2,0),C(),s()}if(l&2){let e=u(3);r(2),y(e.copiedPassword()?2:3)}}function xt(l,t){l&1&&(a(0,"spk-alert",39),T(1,12),s())}function bt(l,t){if(l&1){let e=x();a(0,"div",30)(1,"spk-form-field")(2,"label",31),g(3,7),d(4,"sup"),C(),s(),d(5,"input",32),s(),M(6,$t,1,9,"spk-progress-bar",33),a(7,"spk-form-field"),d(8,"input",34),M(9,wt,2,0,"span",35),s(),a(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),g(12,8),M(13,kt,2,0)(14,Lt,2,0),C(),s(),a(15,"button",37),F("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),g(16,9),d(17,"spk-icon"),C(),s(),M(18,Gt,4,1,"button",38),s(),M(19,xt,2,0,"spk-alert",39),s()}if(l&2){let e=u(2);r(5),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.password?6:-1),r(2),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),y(e.showPassword()?13:14),r(5),y(e.showCopyPassword()?18:-1),r(),y(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function vt(l,t){if(l&1&&(a(0,"spk-select",27)(1,"label",28),T(2,6),s(),d(3,"input",29),Ye(4,Ot,1,1,"ng-template"),s(),M(5,bt,20,7,"div",30)),l&2){let e=u();E("options",e.encryptionOptions())("isClearable",!1),r(5),y(e.encryptionFieldSignal()!==""?5:-1)}}function Bt(l,t){if(l&1&&(a(0,"button",24),g(1,13),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(l,t){if(l&1&&(a(0,"button",25),g(1,14),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var se=new Me,gt=(l={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>se.group({name:se.control(l.name,[fe.required]),description:se.control(l.description),encryption:se.control(l.encryption,[_t()]),password:se.control(l.password,[Ve(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:se.control(l.repeatPassword,[Ve(t=>t?.value.encryption!=="",[fe.required])])}),He={Key:"",DisplayName:"None"},je=class l{#e=D(H);#t=D(ne);#i=D(rt);#n=D(J);#o=D(Ee);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=m(!1);copiedPassword=m(!1);showCopyPassword=m(!1);encryptionEffect=me(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#l(t??""),this.copiedPassword.set(!0)}async#l(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[He,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&de(n.formRef,yt,5),e&2&&ge()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let S;S=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let U;U=$localize`Encryption`;let h;h=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ue(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let N;N=$localize`Passwords do not match`;let ee;ee=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ee=Ue(ee);let re;re=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,_,S,A,U,K,b,X,N,ee,re,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),F("submit",function(){return c(i),p(n.next())}),a(2,"h3",16),T(3,1),s(),M(4,Rt,3,0,"spk-alert",17),a(5,"spk-form-field")(6,"label",18),g(7,2),d(8,"sup"),C(),s(),d(9,"input",19),s(),a(10,"spk-form-field")(11,"label",20),T(12,3),s(),d(13,"textarea",21),s(),M(14,vt,6,3),a(15,"div",22)(16,"button",23),F("click",function(){return c(i),p(n.exit())}),g(17,4),d(18,"spk-icon"),C(),s(),M(19,Bt,3,1,"button",24)(20,Vt,3,1,"button",25),s()()}if(e&2){let i;E("formGroup",n.generalForm),r(4),y(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),y(n.isNew()?14:-1),r(5),y(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[ye,he,Q,Z,Ae,Ne,De,q,Y,ie,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,He as b,je as c,te as d,Ke as e,pt as f,ze as g,J as h};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-K5P3KNHL.js";import"./chunk-WY2KPAVB.js";import"./chunk-FWVOVJCG.js";import{oa as _}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Jb as p,Oa as a,X as o,_a as S,bc as c,cc as g,vb as n,vc as l,wb as i,wc as m}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var r=class s{#e=o(d);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||s)};static \u0275cmp=S({type:s,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,f){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),l(5,"json"),i()()),e&2&&(a(4),g(m(5,1,f.serverSettings())))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{r as default};
1
+ import{a as d}from"./chunk-L6BZ6TEU.js";import"./chunk-67XQIEG5.js";import"./chunk-XD6MBGQY.js";import{oa as _}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Jb as p,Oa as a,X as o,_a as S,bc as c,cc as g,uc as l,vb as n,vc as m,wb as i}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var r=class s{#e=o(d);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||s)};static \u0275cmp=S({type:s,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,f){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),l(5,"json"),i()()),e&2&&(a(4),g(m(5,1,f.serverSettings())))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{r as default};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-FPLBURO5.js";import{b as P,d as $}from"./chunk-UVLJAD66.js";import{e as g}from"./chunk-MHALSLG3.js";import{h as W}from"./chunk-FWVOVJCG.js";import{qa as M}from"./chunk-VKD4Y3YQ.js";import{Gc as h,Hb as O,Hc as w,Ib as R,Jb as N,Kb as _,Lb as I,O as k,Oa as T,S as d,X as r,_a as C,i as m,la as n,vb as D,vc as A,wb as v,xb as E,xc as F}from"./chunk-K6EZTPNQ.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=C({type:s,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};
1
+ import{a as G}from"./chunk-2YHX57UE.js";import{b as P,d as $}from"./chunk-OQHMS5HM.js";import{e as g}from"./chunk-5ER6KMMG.js";import{h as W}from"./chunk-XD6MBGQY.js";import{qa as M}from"./chunk-GP2W7XZF.js";import{Fc as h,Gc as w,Hb as O,Ib as R,Jb as N,Kb as _,Lb as I,O as k,Oa as T,S as d,X as r,_a as C,i as m,la as n,uc as A,vb as D,wb as v,wc as F,xb as E}from"./chunk-67YRCRMI.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=C({type:s,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};