@duplicati/ngclient 0.0.164 → 0.0.166

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 (116) hide show
  1. package/chunk-25QJ7OWU.js +1 -0
  2. package/{chunk-2QT6CZNW.js → chunk-2HQTO4LT.js} +1 -1
  3. package/{chunk-NXROYR6L.js → chunk-3ADKRLYD.js} +1 -1
  4. package/{chunk-VEON764K.js → chunk-3O255C2R.js} +1 -1
  5. package/{chunk-K6IL54XE.js → chunk-3VHQLGKM.js} +1 -1
  6. package/{chunk-SVQCV5AE.js → chunk-4IAJY6E3.js} +1 -1
  7. package/chunk-4N7O6OWH.js +1 -0
  8. package/{chunk-JPRQYGHQ.js → chunk-53GUCO6P.js} +1 -1
  9. package/{chunk-VCLWADQK.js → chunk-53V6KV3I.js} +1 -1
  10. package/{chunk-E5E5ASXG.js → chunk-5RCKMVGY.js} +1 -1
  11. package/{chunk-4GY6ZWN5.js → chunk-7WATCQLK.js} +1 -1
  12. package/chunk-A4HSV37F.js +1 -0
  13. package/{chunk-7XXYLQEN.js → chunk-AROXMP46.js} +1 -1
  14. package/{chunk-HVB6ARTT.js → chunk-AUMCM45B.js} +1 -1
  15. package/{chunk-NME5JWZN.js → chunk-AY4BUZJQ.js} +1 -1
  16. package/{chunk-X5BOJXMC.js → chunk-BRPGUJ77.js} +1 -1
  17. package/{chunk-URAI6X74.js → chunk-CMFSS355.js} +1 -1
  18. package/{chunk-CZRQ3GX6.js → chunk-CMMGGY2S.js} +1 -1
  19. package/{chunk-35KH4G7Y.js → chunk-CO4VU5IU.js} +1 -1
  20. package/chunk-DPQEDR6U.js +1 -0
  21. package/{chunk-XTFTWEJS.js → chunk-E4KSSC6K.js} +1 -1
  22. package/chunk-EEXKY2IJ.js +1 -0
  23. package/chunk-EYFKXXER.js +1 -0
  24. package/chunk-FUPYLAQ6.js +1 -0
  25. package/chunk-G4Z3JAJB.js +1 -0
  26. package/{chunk-H3W2UQY2.js → chunk-GGNFAVSC.js} +1 -1
  27. package/{chunk-QMHLXETS.js → chunk-GHJ4MU3O.js} +1 -1
  28. package/{chunk-WJDMMKWE.js → chunk-GRPEAINE.js} +1 -1
  29. package/{chunk-RPJFKWMV.js → chunk-HEST3B3S.js} +1 -1
  30. package/chunk-HJSCQF6V.js +1 -0
  31. package/{chunk-465L4ZG5.js → chunk-HKYSIIV5.js} +1 -1
  32. package/{chunk-AT6BXXSP.js → chunk-HW7A5ZWV.js} +1 -1
  33. package/{chunk-ISCGGOPN.js → chunk-ILGMXHEE.js} +1 -1
  34. package/chunk-IMF5BUVN.js +1 -0
  35. package/{chunk-2CWLIRUP.js → chunk-IQ52IXSC.js} +1 -1
  36. package/{chunk-2DP4QU4T.js → chunk-J64OAILA.js} +1 -1
  37. package/{chunk-OHP7HLY2.js → chunk-JGXPFEYZ.js} +1 -1
  38. package/{chunk-D3LEV6WL.js → chunk-JXLBFHEH.js} +1 -1
  39. package/chunk-KKLVMIFL.js +1 -0
  40. package/{chunk-H4H72SDD.js → chunk-KUP2T6AG.js} +1 -1
  41. package/{chunk-NFIJYWQI.js → chunk-L7WPKNLR.js} +1 -1
  42. package/{chunk-TBTQMBCJ.js → chunk-LHOHOKP5.js} +1 -1
  43. package/{chunk-NZDZUPC5.js → chunk-M2BAPEJT.js} +1 -1
  44. package/{chunk-IKPQDSQK.js → chunk-NA6MTRHY.js} +2 -2
  45. package/{chunk-Z5W4ULWF.js → chunk-NDZU2O2Q.js} +1 -1
  46. package/chunk-NLXY47SY.js +1 -0
  47. package/{chunk-RNWKZDZM.js → chunk-NXJQU7IR.js} +1 -1
  48. package/{chunk-POJT4MSX.js → chunk-NY63VRAY.js} +1 -1
  49. package/{chunk-E3KF5SRU.js → chunk-O2M7MRKP.js} +1 -1
  50. package/{chunk-AWXWGD4T.js → chunk-OQ2HMOSQ.js} +1 -1
  51. package/{chunk-SXFSAK5L.js → chunk-OVLLX4US.js} +1 -1
  52. package/{chunk-TC7HZO7D.js → chunk-P7OKMMNZ.js} +1 -1
  53. package/chunk-POAVE42X.js +1 -0
  54. package/{chunk-PKK4MIRQ.js → chunk-Q4I4JXKZ.js} +1 -1
  55. package/chunk-QAY6UFT6.js +1 -0
  56. package/chunk-QE4NBN5H.js +2 -0
  57. package/{chunk-QBHHGHBJ.js → chunk-QLUEDPL4.js} +1 -1
  58. package/{chunk-E6DCTQ34.js → chunk-QOQI2ALM.js} +1 -1
  59. package/{chunk-5KMPTDRJ.js → chunk-R2N5UWYB.js} +1 -1
  60. package/chunk-R3F6GIHW.js +1 -0
  61. package/{chunk-CENUQU54.js → chunk-RRM5OZPV.js} +2 -2
  62. package/{chunk-ZLLXHZQV.js → chunk-SFSDLKTN.js} +1 -1
  63. package/{chunk-DY4NXNVS.js → chunk-SHNCRKXQ.js} +1 -1
  64. package/chunk-SKFITJZT.js +1 -0
  65. package/{chunk-O5W6EGCB.js → chunk-SNVT3M5C.js} +1 -1
  66. package/chunk-TPYX7QC7.js +1 -0
  67. package/{chunk-75C77QFK.js → chunk-ULR2EPP5.js} +1 -1
  68. package/{chunk-MSASOFXF.js → chunk-V5B247QH.js} +1 -1
  69. package/{chunk-W2SSWLYM.js → chunk-V7OQKE2Z.js} +1 -1
  70. package/{chunk-4Z72AON4.js → chunk-VXJJGZ5F.js} +1 -1
  71. package/{chunk-DQAT6VCF.js → chunk-W7NX3PWJ.js} +1 -1
  72. package/chunk-WJEUX75A.js +1 -0
  73. package/{chunk-DF6VTK4B.js → chunk-WKA7CSGA.js} +1 -1
  74. package/{chunk-D7OP5FPA.js → chunk-WNHQELMC.js} +1 -1
  75. package/{chunk-J34TTKLN.js → chunk-WPIVIZS6.js} +1 -1
  76. package/{chunk-4VZNWPWO.js → chunk-X6SJVQXW.js} +1 -1
  77. package/{chunk-MPQNBRD5.js → chunk-X7XIFHAV.js} +1 -1
  78. package/{chunk-ATGKEH5N.js → chunk-XUQ74HFK.js} +1 -1
  79. package/{chunk-2VOU6SHS.js → chunk-Y2LISX47.js} +1 -1
  80. package/chunk-Y7PHGRGB.js +4 -0
  81. package/{chunk-Y4GDUNWN.js → chunk-YU5AMM6C.js} +1 -1
  82. package/{chunk-35ZUPRX7.js → chunk-YWZRYOES.js} +1 -1
  83. package/{chunk-AE7T2DAH.js → chunk-ZQ56M63S.js} +1 -1
  84. package/chunk-ZSEZR472.js +1 -0
  85. package/{chunk-EUVXYJ2O.js → chunk-ZXEF3CNK.js} +1 -1
  86. package/{chunk-GNJTDWT4.js → chunk-ZZBUNZZO.js} +1 -1
  87. package/{chunk-GOFRTODH.js → chunk-ZZBZEHXF.js} +1 -1
  88. package/index.html +2 -2
  89. package/locale/messages.en.json +3 -0
  90. package/locale/messages.json +3 -0
  91. package/main-L5HX5P6R.js +1 -0
  92. package/package.json +1 -1
  93. package/styles-5QAJP4BI.css +1 -0
  94. package/chunk-5RQDJUIT.js +0 -1
  95. package/chunk-732GPC5D.js +0 -1
  96. package/chunk-ACZQPL4M.js +0 -1
  97. package/chunk-EOKEY2WO.js +0 -1
  98. package/chunk-EVJEPFC6.js +0 -1
  99. package/chunk-IFCA5KWR.js +0 -1
  100. package/chunk-LH6XLRJU.js +0 -1
  101. package/chunk-MCOUCF6F.js +0 -1
  102. package/chunk-PIMTQKQK.js +0 -1
  103. package/chunk-RIX6H2ZX.js +0 -1
  104. package/chunk-TGNUULAU.js +0 -1
  105. package/chunk-VNGJCKGG.js +0 -1
  106. package/chunk-W4KOKNGU.js +0 -1
  107. package/chunk-WZAZENJC.js +0 -1
  108. package/chunk-X4KK6R3X.js +0 -1
  109. package/chunk-XKKT2NP5.js +0 -1
  110. package/chunk-XRI2BFC2.js +0 -2
  111. package/chunk-XUN5TTJC.js +0 -1
  112. package/chunk-Z34TVTJN.js +0 -1
  113. package/chunk-Z4MDYLVI.js +0 -1
  114. package/chunk-ZBK64QS2.js +0 -4
  115. package/main-75X3EGHT.js +0 -1
  116. package/styles-JSM72RCO.css +0 -1
@@ -1 +1 @@
1
- import{a as _e}from"./chunk-ACZQPL4M.js";import"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as se}from"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import{a as le,b as m}from"./chunk-WJDMMKWE.js";import{a as b}from"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as oe}from"./chunk-TC7HZO7D.js";import{B as ae,G as ie,X as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-TGNUULAU.js";import{b as q,e as j}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as d,D as G,Db as n,Eb as i,F as g,Fb as c,G as L,H as p,Rc as E,Sa as _,Sc as P,Tb as u,Ub as h,Vb as A,Wb as H,Xb as J,Zb as T,_ as F,cb as V,kc as C,mc as K,nc as D,pa as s,r as y,sc as X,tc as z,uc as W,xb as w,yb as U}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
1
+ import{a as _e}from"./chunk-EEXKY2IJ.js";import"./chunk-X7XIFHAV.js";import"./chunk-ZZBUNZZO.js";import"./chunk-HW7A5ZWV.js";import{a as se}from"./chunk-ULR2EPP5.js";import"./chunk-VXJJGZ5F.js";import"./chunk-6Q6SSTBK.js";import"./chunk-AUMCM45B.js";import"./chunk-QOQI2ALM.js";import{a as le,b as m}from"./chunk-GRPEAINE.js";import{a as b}from"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-E4KSSC6K.js";import"./chunk-4IAJY6E3.js";import{b as oe}from"./chunk-P7OKMMNZ.js";import{B as ae,G as ie,X as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-HJSCQF6V.js";import{b as q,e as j}from"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Bb as d,Cb as n,D as G,Db as i,Eb as c,F as g,G as L,H as p,Qc as E,Ra as _,Rc as P,Sb as u,Tb as h,Ub as A,Vb as H,Wb as J,Yb as T,_ as F,bb as V,jc as C,lc as K,mc as D,oa as s,r as y,rc as X,sc as z,tc as W,wb as w,xb as U}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -1 +1 @@
1
- import{b as X}from"./chunk-TC7HZO7D.js";import{B as V,G as x,W as J,c as B,e as G,f as y,j as b,o as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-TGNUULAU.js";import{d as I,e as A}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as M,Cb as _,Db as r,Eb as i,Fb as p,H as g,P as T,Sa as F,Tb as E,Ub as C,Vb as f,Yb as O,Zb as m,_ as u,cb as R,kc as h,nc as N,pa as c,xb as S,yb as D}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,$,P,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
1
+ import{b as X}from"./chunk-P7OKMMNZ.js";import{B as V,G as x,W as J,c as B,e as G,f as y,j as b,o as $,q as P,r as v,t as L,u as k,x as w}from"./chunk-HJSCQF6V.js";import{d as I,e as A}from"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ac as M,Bb as _,Cb as r,Db as i,Eb as p,H as g,P as T,Ra as F,Sb as E,Tb as C,Ub as f,Xb as O,Yb as m,_ as u,bb as R,jc as h,mc as N,oa as c,wb as S,xb as D}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),f(2,2),i(),p(3,"input",12),i())}var a=new v,d=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),f(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loader",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,$,P,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
@@ -1,2 +1,2 @@
1
- import{b as J}from"./chunk-TC7HZO7D.js";import{B as U,S as z,u as w}from"./chunk-TGNUULAU.js";import"./chunk-ATGKEH5N.js";import{la as y}from"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Ab as C,Bb as f,Cb as L,Db as i,Eb as a,Fb as h,Gc as x,H as F,Ic as A,Mb as M,Sa as _,Sc as k,Tb as $,Ub as B,Vb as r,Zb as N,_ as G,cb as b,ea as S,fa as u,jc as I,kc as v,nc as d,oc as m,pa as l,xb as O,yb as T,zb as E}from"./chunk-ZBK64QS2.js";import{a as P,b as D}from"./chunk-EUDKD2JW.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;_(),m(t)}}function V(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),C(4,X,2,1,"li",null,E),a()()()()),o&2){let t=g().$implicit,n=g();_(),I("grid-column","1 / -1")("height","auto"),_(3),f(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),N("click",function(){let s=S(t).$index,c=g();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),O(12,V,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=g();_(2),m(t.Timestamp?A(3,6,t.Timestamp*1e3,"medium"):"-"),_(3),m(t.BackupID>=0?t.BackupID:"-"),_(2),m(t.Message),_(2),v("rotated-icon",n===s.openRowIndex()),_(3),T(n===s.openRowIndex()?12:-1)}}function K(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],R=class o{#e=G(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=k(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(F(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
- `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>D(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=b({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["table-header",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"sh-table",5)(1,"tr",6)(2,"th"),r(3,0),a(),i(4,"th"),r(5,1),a(),i(6,"th"),r(7,2),a(),h(8,"th"),a(),C(9,j,13,9,null,null,E),i(11,"div",7),r(12,3),a()(),i(13,"footer")(14,"button",8),N("click",function(){return S(s),u(n.loadMore())}),$(15,4),O(16,K,1,0)(17,q,1,0),B(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),_(9),f(s),_(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),_(2),T(n.noMoreItems()?16:17)}},dependencies:[z,w,U,y],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) 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}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{R as default};
1
+ import{b as J}from"./chunk-P7OKMMNZ.js";import{B as U,S as z,u as w}from"./chunk-HJSCQF6V.js";import"./chunk-XUQ74HFK.js";import{la as y}from"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ab as f,Bb as L,Cb as i,Db as a,Eb as h,Fc as x,H as F,Hc as A,Lb as M,Ra as _,Rc as k,Sb as $,Tb as B,Ub as r,Yb as N,_ as G,_b as g,bb as b,da as S,ea as u,ic as I,jc as v,mc as d,nc as m,oa as l,wb as O,xb as T,yb as E,zb as C}from"./chunk-Y7PHGRGB.js";import{a as P,b as D}from"./chunk-EUDKD2JW.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;_(),m(t)}}function V(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),C(4,X,2,1,"li",null,E),a()()()()),o&2){let t=g().$implicit,n=g();_(),I("grid-column","1 / -1")("height","auto"),_(3),f(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),N("click",function(){let s=S(t).$index,c=g();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),O(12,V,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=g();_(2),m(t.Timestamp?A(3,6,t.Timestamp*1e3,"medium"):"-"),_(3),m(t.BackupID>=0?t.BackupID:"-"),_(2),m(t.Message),_(2),v("rotated-icon",n===s.openRowIndex()),_(3),T(n===s.openRowIndex()?12:-1)}}function K(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],R=class o{#e=G(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=k(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(F(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
+ `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>D(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=b({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["thead",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"sh-table",5)(1,"tr",6)(2,"th"),r(3,0),a(),i(4,"th"),r(5,1),a(),i(6,"th"),r(7,2),a(),h(8,"th"),a(),C(9,j,13,9,null,null,E),i(11,"div",7),r(12,3),a()(),i(13,"footer")(14,"button",8),N("click",function(){return S(s),u(n.loadMore())}),$(15,4),O(16,K,1,0)(17,q,1,0),B(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),_(9),f(s),_(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),_(2),T(n.noMoreItems()?16:17)}},dependencies:[z,w,U,y],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) 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}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{R as default};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-RIX6H2ZX.js";import{a as W}from"./chunk-XTFTWEJS.js";import{d as U}from"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import{B as j,D as B,G as Q,b as $,c as A,d as v,e as k,f as x,j as J,o as X,q as V,r as q,t as z,u as H,w as K}from"./chunk-TGNUULAU.js";import{d as R}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as h,Db as o,Eb as i,Fb as r,H as S,Mb as E,Sa as l,Sc as D,Tb as g,Ub as d,Vb as M,Yc as y,Zb as C,_ as p,cb as T,ea as F,fa as f,gc as O,hc as P,kc as w,nc as b,oc as G,pa as a,xb as L,yb as I}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Z=["passwordInput"];function ee(m,t){m&1&&(o(0,"sh-alert",6),M(1,4),i())}var _=new q,N=class m{#e=p(R);#n=p(U);rememberMe=W("rememberMe",!1,!0);failedLogin=a(!1);successLogin=a(!1);isLoading=a(!1);loginForm=_.group({user:_.control(""),pass:_.control("",v.required),rememberMe:_.control(this.rememberMe())});showPassword=a(!1);passwordInput=y("passwordInput");passwordEffect=D(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(t=>this.rememberMe.set(t??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let t=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&t&&(this.isLoading.set(!0),this.#n.login(t,this.rememberMe()).pipe(S(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||m)};static \u0275cmp=T({type:m,selectors:[["app-login"]],viewQuery:function(n,e){n&1&&O(e.passwordInput,Z,5),n&2&&P()},decls:24,vars:6,consts:()=>{let t;t=$localize`Enter your password`;let n;n=$localize` Password ${"\uFFFD#10\uFFFD"}:START_LINK:${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#10\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize` Keep me logged in ${"\uFFFD#21\uFFFD\uFFFD/#21\uFFFD"}:TAG_INPUT:`;let c;return c=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],n,e,s,c,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",t,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,e){if(n&1){let s=E();o(0,"form",5),C("submit",function(){return F(s),f(e.submit())}),L(1,ee,2,0,"sh-alert",6),o(2,"div",7),r(3,"app-logo"),i(),o(4,"div",8)(5,"div",9),r(6,"input",10),o(7,"sh-form-field")(8,"label",11),g(9,1),o(10,"a",12),r(11,"sh-icon"),i(),d(),i(),r(12,"input",13,0),o(14,"sh-icon",14),C("click",function(){return F(s),f(e.showPassword.set(!e.showPassword()))}),b(15),i()(),o(16,"button",15),g(17,2),r(18,"sh-icon"),d(),i()(),o(19,"sh-checkbox",16),g(20,3),r(21,"input",17),d(),i(),o(22,"div",18),r(23,"label",19),i()()()}n&2&&(h("formGroup",e.loginForm),l(),I(e.failedLogin()&&!e.successLogin()?1:-1),l(11),h("type",e.showPassword()?"text":"password"),l(3),G(e.showPassword()?"eye":"eye-slash"),l(),w("loader",e.isLoading()))},dependencies:[z,J,A,$,k,x,X,V,Y,Q,H,j,K,B],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{N as default};
1
+ import{a as Y}from"./chunk-EYFKXXER.js";import{a as W}from"./chunk-E4KSSC6K.js";import{d as U}from"./chunk-4IAJY6E3.js";import"./chunk-P7OKMMNZ.js";import{B as j,D as B,G as Q,b as $,c as A,d as v,e as k,f as x,j as J,o as X,q as V,r as q,t as z,u as H,w as K}from"./chunk-HJSCQF6V.js";import{d as R}from"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Bb as h,Cb as o,Db as i,Eb as r,H as S,Lb as E,Ra as l,Rc as D,Sb as g,Tb as d,Ub as M,Xc as y,Yb as C,_ as p,bb as T,da as F,ea as f,fc as O,gc as P,jc as w,mc as b,nc as G,oa as a,wb as L,xb as I}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";var Z=["passwordInput"];function ee(m,t){m&1&&(o(0,"sh-alert",6),M(1,4),i())}var _=new q,N=class m{#e=p(R);#n=p(U);rememberMe=W("rememberMe",!1,!0);failedLogin=a(!1);successLogin=a(!1);isLoading=a(!1);loginForm=_.group({user:_.control(""),pass:_.control("",v.required),rememberMe:_.control(this.rememberMe())});showPassword=a(!1);passwordInput=y("passwordInput");passwordEffect=D(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(t=>this.rememberMe.set(t??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let t=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&t&&(this.isLoading.set(!0),this.#n.login(t,this.rememberMe()).pipe(S(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||m)};static \u0275cmp=T({type:m,selectors:[["app-login"]],viewQuery:function(n,e){n&1&&O(e.passwordInput,Z,5),n&2&&P()},decls:24,vars:6,consts:()=>{let t;t=$localize`Enter your password`;let n;n=$localize` Password ${"\uFFFD#10\uFFFD"}:START_LINK:${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#10\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize` Keep me logged in ${"\uFFFD#21\uFFFD\uFFFD/#21\uFFFD"}:TAG_INPUT:`;let c;return c=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],n,e,s,c,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",t,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,e){if(n&1){let s=E();o(0,"form",5),C("submit",function(){return F(s),f(e.submit())}),L(1,ee,2,0,"sh-alert",6),o(2,"div",7),r(3,"app-logo"),i(),o(4,"div",8)(5,"div",9),r(6,"input",10),o(7,"sh-form-field")(8,"label",11),g(9,1),o(10,"a",12),r(11,"sh-icon"),i(),d(),i(),r(12,"input",13,0),o(14,"sh-icon",14),C("click",function(){return F(s),f(e.showPassword.set(!e.showPassword()))}),b(15),i()(),o(16,"button",15),g(17,2),r(18,"sh-icon"),d(),i()(),o(19,"sh-checkbox",16),g(20,3),r(21,"input",17),d(),i(),o(22,"div",18),r(23,"label",19),i()()()}n&2&&(h("formGroup",e.loginForm),l(),I(e.failedLogin()&&!e.successLogin()?1:-1),l(11),h("type",e.showPassword()?"text":"password"),l(3),G(e.showPassword()?"eye":"eye-slash"),l(),w("loader",e.isLoading()))},dependencies:[z,J,A,$,k,x,X,V,Y,Q,H,j,K,B],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-RRM5OZPV.js";import"./chunk-W7NX3PWJ.js";import"./chunk-P7OKMMNZ.js";import"./chunk-HJSCQF6V.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{a as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as J}from"./chunk-TC7HZO7D.js";import{B as U,G as x,H as V,V as j,b as E,c as A,e as R,f as b,j as y,o as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-TGNUULAU.js";import{d as O,e as M}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as N,Cb as p,Db as a,Eb as i,Fb as u,H as g,Sa as l,Tb as D,Ub as h,Vb as _,Yb as I,Zb as d,_ as s,cb as f,kc as P,pa as c,xb as C,yb as S}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,B,$,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
1
+ import{a as K}from"./chunk-ULR2EPP5.js";import"./chunk-VXJJGZ5F.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-E4KSSC6K.js";import"./chunk-4IAJY6E3.js";import{b as J}from"./chunk-P7OKMMNZ.js";import{B as U,G as x,H as V,V as j,b as E,c as A,e as R,f as b,j as y,o as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-HJSCQF6V.js";import{d as O,e as M}from"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ac as N,Bb as p,Cb as a,Db as i,Eb as u,H as g,Ra as l,Sb as D,Tb as h,Ub as _,Xb as I,Yb as d,_ as s,bb as f,jc as P,oa as c,wb as C,xb as S}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,B,$,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{b as g}from"./chunk-WJDMMKWE.js";import{b as o}from"./chunk-TC7HZO7D.js";import{Rc as n,V as r,_ as i,pa as s}from"./chunk-ZBK64QS2.js";var a=class e{#e=i(o);#r=g(this.#e.getApiV1Serversettings());#t=s(void 0);serverSettings=n(()=>this.#t()||this.#r());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:t=>{this.#t.set(t)}})}static \u0275fac=function(p){return new(p||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})};export{a};
1
+ import{b as g}from"./chunk-GRPEAINE.js";import{b as o}from"./chunk-P7OKMMNZ.js";import{Qc as n,V as r,_ as i,oa as s}from"./chunk-Y7PHGRGB.js";var a=class e{#e=i(o);#r=g(this.#e.getApiV1Serversettings());#t=s(void 0);serverSettings=n(()=>this.#t()||this.#r());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:t=>{this.#t.set(t)}})}static \u0275fac=function(p){return new(p||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})};export{a};
@@ -1,2 +1,2 @@
1
- import{b as j}from"./chunk-WJDMMKWE.js";import{b as z}from"./chunk-TC7HZO7D.js";import{B as X,u as U,y as W}from"./chunk-TGNUULAU.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as f,Ab as P,Bb as D,Bc as V,Cb as m,Db as o,Eb as r,Fb as u,Mb as C,Pa as F,Sa as a,Sc as J,Tb as x,Ub as A,Vb as y,Zb as S,_ as b,cb as R,ea as p,fa as _,nc as s,oc as I,pa as g,pc as h,qc as w,r as E,sc as B,tc as $,uc as k,xb as v,yb as M,yc as G,zb as N}from"./chunk-ZBK64QS2.js";import{a as T,b as O}from"./chunk-EUDKD2JW.js";var q=()=>({maxWidth:"700px",width:"100%"});function H(l,t){if(l&1&&(o(0,"a",9)(1,"sh-icon"),s(2,"link"),r()()),l&2){let e=f().$implicit;m("href",G(e.Url),F)}}function K(l,t){if(l&1){let e=C();o(0,"div",2)(1,"h4"),s(2),v(3,H,3,2,"a",9),r(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),r()(),o(9,"div",10)(10,"button",11),S("click",function(){let n=p(e).$implicit,c=f();return _(c.openLicense(n))}),x(11,1),u(12,"sh-icon"),A(),r()()()}if(l&2){let e=t.$implicit;a(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),a(),M(e.Url?3:-1),a(2),h(" ",e.data==null?null:e.data.description," "),a(3),I(e.data==null?null:e.data.notes)}}var L=class l{#e=b(z);licenses=j(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>O(T({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=g(!1);dialogLicense=g(null);#t=J(()=>{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{b as j}from"./chunk-GRPEAINE.js";import{b as z}from"./chunk-P7OKMMNZ.js";import{B as X,u as U,y as W}from"./chunk-HJSCQF6V.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ab as D,Ac as V,Bb as m,Cb as o,Db as r,Eb as u,Lb as C,Oa as F,Ra as a,Rc as J,Sb as x,Tb as A,Ub as y,Yb as S,_ as b,_b as f,bb as R,da as p,ea as _,mc as s,nc as I,oa as g,oc as h,pc as w,r as E,rc as B,sc as $,tc as k,wb as v,xb as M,xc as G,yb as N,zb as P}from"./chunk-Y7PHGRGB.js";import{a as T,b as O}from"./chunk-EUDKD2JW.js";var q=()=>({maxWidth:"700px",width:"100%"});function H(l,t){if(l&1&&(o(0,"a",9)(1,"sh-icon"),s(2,"link"),r()()),l&2){let e=f().$implicit;m("href",G(e.Url),F)}}function K(l,t){if(l&1){let e=C();o(0,"div",2)(1,"h4"),s(2),v(3,H,3,2,"a",9),r(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),r()(),o(9,"div",10)(10,"button",11),S("click",function(){let n=p(e).$implicit,c=f();return _(c.openLicense(n))}),x(11,1),u(12,"sh-icon"),A(),r()()()}if(l&2){let e=t.$implicit;a(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),a(),M(e.Url?3:-1),a(2),h(" ",e.data==null?null:e.data.description," "),a(3),I(e.data==null?null:e.data.notes)}}var L=class l{#e=b(z);licenses=j(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>O(T({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=g(!1);dialogLicense=g(null);#t=J(()=>{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
  `),i="";for(let n=0;n<e.length;n++)i+=`<li>${e[n]}</li>`;return i}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=R({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_SH_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["shButton","","type","button",3,"click"],[3,"href"],[1,"actions"],["shButton","",3,"click"]]},template:function(e,i){if(e&1){let n=C();o(0,"h3"),y(1,0),r(),P(2,K,13,5,"div",2,N),o(4,"sh-dialog",3),k("isOpenChange",function(d){return p(n),$(i.dialogIsOpen,d)||(i.dialogIsOpen=d),_(d)}),o(5,"header",4)(6,"h3"),s(7),r()(),o(8,"div",5)(9,"div",6),s(10),r()(),o(11,"footer",7)(12,"button",8),S("click",function(){return p(n),i.dialogLicense.set(null),_(i.dialogIsOpen.set(!1))}),s(13,"Close"),r()()()}if(e&2){let n,c;a(2),D(i.licenses()),a(2),B("isOpen",i.dialogIsOpen),m("options",V(4,q)),a(3),I((n=i.dialogLicense())==null?null:n.Title);let d=((c=i.dialogLicense())==null?null:c.License)??"";a(3),h(" ",d," ")}},dependencies:[U,X,W],styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}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{L as default};
@@ -1 +1 @@
1
- import{b as s}from"./chunk-6Q6SSTBK.js";import{V as c}from"./chunk-ZBK64QS2.js";import{a as i}from"./chunk-EUDKD2JW.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
1
+ import{b as s}from"./chunk-6Q6SSTBK.js";import{V as c}from"./chunk-Y7PHGRGB.js";import{a as i}from"./chunk-EUDKD2JW.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
@@ -1 +1 @@
1
- import{a as Ue}from"./chunk-XRI2BFC2.js";import{a as Ye}from"./chunk-5KMPTDRJ.js";import{d as se}from"./chunk-2DP4QU4T.js";import{a as Xe}from"./chunk-4Z72AON4.js";import{a as Je}from"./chunk-HVB6ARTT.js";import{b as _e}from"./chunk-WJDMMKWE.js";import{a as L}from"./chunk-QBHHGHBJ.js";import{a as U}from"./chunk-AE7T2DAH.js";import{b as Y}from"./chunk-TC7HZO7D.js";import{B as X,G as we,K as Be,L as xe,O as Ve,U as We,V as ze,b as ve,c as G,e as k,f as w,i as Ae,j as B,l as Ge,o as x,q as V,r as W,s as ke,t as z,u as J,z as ne}from"./chunk-TGNUULAU.js";import{b as h,d as R}from"./chunk-XUN5TTJC.js";import{la as oe}from"./chunk-NXROYR6L.js";import{$b as v,Ac as ye,B as Oe,Bc as be,Cb as T,Db as r,Eb as l,F as j,Fb as c,Gc as ae,H as O,Hc as $e,Ic as De,Jb as $,Kb as D,L as Ce,Mb as q,P as Ne,Q as Z,Rc as le,Sa as d,Sc as A,Tb as S,Ub as g,V as fe,Vb as E,Wb as Re,Xb as Pe,Zb as C,_,cb as M,ea as N,fa as f,hb as he,i as Ee,kc as Ie,nc as K,o as me,pa as p,pc as Le,qc as Me,sc as ee,tc as te,uc as ie,x as re,xb as y,y as Fe,yb as b}from"./chunk-ZBK64QS2.js";var He=new W,Ke=()=>He.group({passphrase:He.control("")}),pe=class a{#t=_(Y);#e=_(P);#n=_(R);#o=_(h);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#n.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#o.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),E(3,0),l(),c(4,"input",6),l(),r(5,"sh-toggle-card"),$(6,7),E(7,1),D(),r(8,"app-options-list",8),ie("optionsChange",function(n){return te(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),g(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),g(),l()()()),e&2&&(T("formGroup",t.encryptionForm),d(8),ee("options",t.settings),T("hasFreeTextSettings",!0))},dependencies:[z,B,G,k,w,x,V,we,J,X,We,Ue],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var et=()=>({standalone:!0});function tt(a,i){a&1&&c(0,"sh-progress-bar",8)}function it(a,i){if(a&1&&(K(0),ae(1,"bytes")),a&2){let e=v().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function ot(a,i){a&1&&(r(0,"span",16),E(1,4),l())}function nt(a,i){if(a&1&&(r(0,"div",15),K(1),ae(2,"date"),y(3,it,2,3),y(4,ot,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),b(e.FileSizes?3:-1),d(),b(e.IsFullBackup===!1?4:-1)}}function st(a,i){a&1&&c(0,"sh-progress-bar",8)}function rt(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),E(2,5),l(),c(3,"input",18),l()),a&2){let e=v(2);T("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function at(a,i){if(a&1){let e=q();r(0,"sh-select",12),C("cleared",function(){N(e);let o=v();return f(o.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(o){N(e);let n=v();return te(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),he(2,nt,5,7,"ng-template"),l(),y(3,st,1,0,"sh-progress-bar",8),y(4,rt,4,5,"app-file-tree",14)}if(a&2){let e=v();T("options",e.versionOptions())("isClearable",!1),d(),ee("ngModel",e.selectOption),T("ngModelOptions",be(6,et)),d(2),b(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),b(e.showFileTree()?4:-1)}}var ue=new W,Qe=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(Y);#e=_(P);#n=_(Xe);#o=_(U);#i=_(R);#s=_(h);#l=_(oe);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=A(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=A(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(Q=>Q.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=A(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Z(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#n.waitForTaskToComplete(u).pipe(j(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Ee;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-select-files"]],features:[ye([oe])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),E(3,1),l(),y(4,tt,1,0,"sh-progress-bar",8)(5,at,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),g(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),g(),l()()()}e&2&&(T("formGroup",t.selectFilesForm),d(4),b(t.versionOptionsLoading()?4:5),d(5),Re(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,B,G,k,w,Ae,z,x,V,se,X,J,Ve,Be,oe,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(R);#e=_(h);#n=_(U);#o=_(ne);#i=_(Y);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Qe();optionsForm=Ze();encryptionForm=Ke();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=A(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup()}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#o.open(L,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#o.open(L,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode??t?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?me(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(){let i=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:i}),this.loadFilesetsWithRetryv2(i)]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{if(t.Error)throw new Error(t.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#o.open(L,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#t.navigate(["/backup",i,"database"])}});return}this.versionOptions.set((t.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let t=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=t==="EncryptedStorageNoPassphrase",n=t==="FolderMissing",s=t==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#o.open(L,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:i}),this.#i.getApiV1BackupByIdFilesets({id:i}).pipe(Ce(3))]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{this.versionOptions.set(t.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0}))),this.backup.set(e)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var H=new W,Ze=()=>H.group({restoreFrom:H.control("original"),restoreFromPath:H.control(""),handleExisting:H.control("overwrite"),permissions:H.control(!1),includeMetadata:H.control(!0)}),Se=class a{#t=_(P);#e=_(R);#n=_(h);#o=_(U);#i=_(ne);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let i=this.#t.selectFilesFormSignal()?.filesToRestore??[];if(i.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(i[0].includes("/")?"/":"\\")!==this.#o.systemInfo()?.DirectorySeparator){this.#i.open(L,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#t.submit()}});return}this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let Te;return Te=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,Q,ge,Te,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),E(3,1),l(),r(4,"app-toggle-card",15),$(5,16),E(6,2),D(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),g(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),g(),l(),r(13,"app-file-tree",20)(14,"label",21),K(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),$(18,16),E(19,5),D(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),g(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),g(),l()(),r(26,"app-toggle-card"),$(27,16),E(28,8),D(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),g(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),g(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),g(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),g(),l()()()}if(e&2){let o;T("formGroup",t.optionsForm),d(4),T("disallowToggle",!0),d(9),T("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),T("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[z,B,G,ve,Ge,k,w,x,V,Ye,se,ze,xe,X,J],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ze as a,Se as b,Ke as c,pe as d,Qe as e,de as f,P as g};
1
+ import{a as Ue}from"./chunk-QE4NBN5H.js";import{a as Ye}from"./chunk-R2N5UWYB.js";import{d as se}from"./chunk-J64OAILA.js";import{a as Xe}from"./chunk-VXJJGZ5F.js";import{a as Je}from"./chunk-AUMCM45B.js";import{b as _e}from"./chunk-GRPEAINE.js";import{a as L}from"./chunk-QLUEDPL4.js";import{a as U}from"./chunk-ZQ56M63S.js";import{b as Y}from"./chunk-P7OKMMNZ.js";import{B as X,G as we,K as Be,L as xe,O as Ve,U as We,V as ze,b as ve,c as G,e as k,f as w,i as Ae,j as B,l as Ge,o as x,q as V,r as W,s as ke,t as z,u as J,z as ne}from"./chunk-HJSCQF6V.js";import{b as h,d as R}from"./chunk-G4Z3JAJB.js";import{la as oe}from"./chunk-3ADKRLYD.js";import{Ac as be,B as Oe,Bb as T,Cb as r,Db as l,Eb as c,F as j,Fc as ae,Gc as $e,H as O,Hc as De,Ib as $,Jb as D,L as Ce,Lb as q,P as Ne,Q as Z,Qc as le,Ra as d,Rc as A,Sb as S,Tb as g,Ub as E,V as fe,Vb as Re,Wb as Pe,Yb as C,_,_b as v,bb as M,da as N,ea as f,gb as he,i as Ee,jc as Ie,mc as K,o as me,oa as p,oc as Le,pc as Me,rc as ee,sc as te,tc as ie,wb as y,x as re,xb as b,y as Fe,zc as ye}from"./chunk-Y7PHGRGB.js";var He=new W,Ke=()=>He.group({passphrase:He.control("")}),pe=class a{#t=_(Y);#e=_(P);#n=_(R);#o=_(h);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#n.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#o.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),E(3,0),l(),c(4,"input",6),l(),r(5,"sh-toggle-card"),$(6,7),E(7,1),D(),r(8,"app-options-list",8),ie("optionsChange",function(n){return te(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),g(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),g(),l()()()),e&2&&(T("formGroup",t.encryptionForm),d(8),ee("options",t.settings),T("hasFreeTextSettings",!0))},dependencies:[z,B,G,k,w,x,V,we,J,X,We,Ue],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var et=()=>({standalone:!0});function tt(a,i){a&1&&c(0,"sh-progress-bar",8)}function it(a,i){if(a&1&&(K(0),ae(1,"bytes")),a&2){let e=v().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function ot(a,i){a&1&&(r(0,"span",16),E(1,4),l())}function nt(a,i){if(a&1&&(r(0,"div",15),K(1),ae(2,"date"),y(3,it,2,3),y(4,ot,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),b(e.FileSizes?3:-1),d(),b(e.IsFullBackup===!1?4:-1)}}function st(a,i){a&1&&c(0,"sh-progress-bar",8)}function rt(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),E(2,5),l(),c(3,"input",18),l()),a&2){let e=v(2);T("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function at(a,i){if(a&1){let e=q();r(0,"sh-select",12),C("cleared",function(){N(e);let o=v();return f(o.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(o){N(e);let n=v();return te(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),he(2,nt,5,7,"ng-template"),l(),y(3,st,1,0,"sh-progress-bar",8),y(4,rt,4,5,"app-file-tree",14)}if(a&2){let e=v();T("options",e.versionOptions())("isClearable",!1),d(),ee("ngModel",e.selectOption),T("ngModelOptions",be(6,et)),d(2),b(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),b(e.showFileTree()?4:-1)}}var ue=new W,Qe=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(Y);#e=_(P);#n=_(Xe);#o=_(U);#i=_(R);#s=_(h);#l=_(oe);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=A(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=A(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(Q=>Q.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=A(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Z(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#n.waitForTaskToComplete(u).pipe(j(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Z(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Ee;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-select-files"]],features:[ye([oe])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),E(3,1),l(),y(4,tt,1,0,"sh-progress-bar",8)(5,at,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),g(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),g(),l()()()}e&2&&(T("formGroup",t.selectFilesForm),d(4),b(t.versionOptionsLoading()?4:5),d(5),Re(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,B,G,k,w,Ae,z,x,V,se,X,J,Ve,Be,oe,Je],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(R);#e=_(h);#n=_(U);#o=_(ne);#i=_(Y);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Qe();optionsForm=Ze();encryptionForm=Ke();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=A(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup()}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#o.open(L,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#o.open(L,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode??t?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?me(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(){let i=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:i}),this.loadFilesetsWithRetryv2(i)]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{if(t.Error)throw new Error(t.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#o.open(L,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#t.navigate(["/backup",i,"database"])}});return}this.versionOptions.set((t.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let t=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=t==="EncryptedStorageNoPassphrase",n=t==="FolderMissing",s=t==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#o.open(L,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:i}),this.#i.getApiV1BackupByIdFilesets({id:i}).pipe(Ce(3))]).pipe(j(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,t])=>{this.versionOptions.set(t.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0}))),this.backup.set(e)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var H=new W,Ze=()=>H.group({restoreFrom:H.control("original"),restoreFromPath:H.control(""),handleExisting:H.control("overwrite"),permissions:H.control(!1),includeMetadata:H.control(!0)}),Se=class a{#t=_(P);#e=_(R);#n=_(h);#o=_(U);#i=_(ne);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let i=this.#t.selectFilesFormSignal()?.filesToRestore??[];if(i.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(i[0].includes("/")?"/":"\\")!==this.#o.systemInfo()?.DirectorySeparator){this.#i.open(L,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#t.submit()}});return}this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=M({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let Te;return Te=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,Q,ge,Te,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=q();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),E(3,1),l(),r(4,"app-toggle-card",15),$(5,16),E(6,2),D(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),g(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),g(),l(),r(13,"app-file-tree",20)(14,"label",21),K(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),$(18,16),E(19,5),D(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),g(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),g(),l()(),r(26,"app-toggle-card"),$(27,16),E(28,8),D(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),g(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),g(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),g(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),g(),l()()()}if(e&2){let o;T("formGroup",t.optionsForm),d(4),T("disallowToggle",!0),d(9),T("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),T("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[z,B,G,ve,Ge,k,w,x,V,Ye,se,ze,xe,X,J],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ze as a,Se as b,Ke as c,pe as d,Qe as e,de as f,P as g};
@@ -1 +1 @@
1
- import{a as D,d as b}from"./chunk-ATGKEH5N.js";import{B as k,P,V as y,Z as h,n as I,o as m,r as R,x as O}from"./chunk-ZBK64QS2.js";import{a as l,b as f}from"./chunk-EUDKD2JW.js";var g=class{_fns;constructor(){this._fns=[]}eject(e){let o=this._fns.indexOf(e);o!==-1&&(this._fns=[...this._fns.slice(0,o),...this._fns.slice(o+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new g}};var d=class extends Error{url;status;statusText;body;request;constructor(e,o,r){super(r),this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=e}};var c=p=>typeof p=="string",v=p=>c(p)&&p!=="",T=p=>p instanceof Blob,S=p=>p instanceof FormData,x=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},L=p=>{let e=[],o=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?o(a,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(a,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${a}[${i}]`,u)):o(a,n))};return Object.entries(p).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},w=(p,e)=>{let o=p.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?o(String(e.path[i])):n),a=p.BASE+r;return e.query?a+L(e.query):a},F=p=>{if(p.formData){let e=new FormData,o=(r,a)=>{c(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(p.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>o(r,n)):o(r,a)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,j=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:o,username:r,password:a,additionalHeaders:n})=>{let i=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,A])=>f(l({},u),{[B]:String(A)}),{});if(v(o)&&(i.Authorization=`Bearer ${o}`),v(r)&&v(a)){let u=x(`${r}:${a}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:T(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":c(e.body)?i["Content-Type"]="text/plain":S(e.body)||(i["Content-Type"]="application/json")),new D(i)})),H=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):c(p.body)||T(p.body)||S(p.body)?p.body:JSON.stringify(p.body)},N=(p,e,o,r,a,n,i)=>o.request(e.method,r,{headers:i,body:a??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),U=(p,e)=>{if(e){let o=p.headers.get(e);if(c(o))return o}},M=p=>{if(p.status!==204&&p.body!==null)return p.body},z=(p,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},p.errors)[e.status];if(r)throw new d(p,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(p,e,`Generic Error: status: ${a}; status text: ${n}; body: ${i}`)}},s=(p,e,o)=>{let r=w(p,o),a=F(o),n=H(o);return j(p,o).pipe(P(i=>N(p,o,e,r,n,a,i)),P(async i=>{for(let q of p.interceptors.response._fns)i=await q(i);let u=M(i),B=U(i,o.responseHeader),A=u;return o.responseTransformer&&i.ok&&(A=await o.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:B??A}}),k(i=>i.status?I({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):m(()=>i)),R(i=>(z(o,i),i.body)),k(i=>m(()=>i)))};var G=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})};export{G as a,E as b,C as c};
1
+ import{a as D,d as b}from"./chunk-XUQ74HFK.js";import{B as k,P,V as y,Z as h,n as I,o as m,r as R,x as O}from"./chunk-Y7PHGRGB.js";import{a as l,b as f}from"./chunk-EUDKD2JW.js";var g=class{_fns;constructor(){this._fns=[]}eject(e){let o=this._fns.indexOf(e);o!==-1&&(this._fns=[...this._fns.slice(0,o),...this._fns.slice(o+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new g}};var d=class extends Error{url;status;statusText;body;request;constructor(e,o,r){super(r),this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=e}};var c=p=>typeof p=="string",v=p=>c(p)&&p!=="",T=p=>p instanceof Blob,S=p=>p instanceof FormData,x=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},L=p=>{let e=[],o=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},r=(a,n)=>{n!=null&&(n instanceof Date?o(a,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(a,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${a}[${i}]`,u)):o(a,n))};return Object.entries(p).forEach(([a,n])=>r(a,n)),e.length?`?${e.join("&")}`:""},w=(p,e)=>{let o=p.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?o(String(e.path[i])):n),a=p.BASE+r;return e.query?a+L(e.query):a},F=p=>{if(p.formData){let e=new FormData,o=(r,a)=>{c(a)||T(a)?e.append(r,a):e.append(r,JSON.stringify(a))};return Object.entries(p.formData).filter(([,r])=>r!=null).forEach(([r,a])=>{Array.isArray(a)?a.forEach(n=>o(r,n)):o(r,a)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,j=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:o,username:r,password:a,additionalHeaders:n})=>{let i=Object.entries(l(l({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,A])=>f(l({},u),{[B]:String(A)}),{});if(v(o)&&(i.Authorization=`Bearer ${o}`),v(r)&&v(a)){let u=x(`${r}:${a}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:T(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":c(e.body)?i["Content-Type"]="text/plain":S(e.body)||(i["Content-Type"]="application/json")),new D(i)})),H=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):c(p.body)||T(p.body)||S(p.body)?p.body:JSON.stringify(p.body)},N=(p,e,o,r,a,n,i)=>o.request(e.method,r,{headers:i,body:a??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),U=(p,e)=>{if(e){let o=p.headers.get(e);if(c(o))return o}},M=p=>{if(p.status!==204&&p.body!==null)return p.body},z=(p,e)=>{let r=l({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},p.errors)[e.status];if(r)throw new d(p,e,r);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(p,e,`Generic Error: status: ${a}; status text: ${n}; body: ${i}`)}},s=(p,e,o)=>{let r=w(p,o),a=F(o),n=H(o);return j(p,o).pipe(P(i=>N(p,o,e,r,n,a,i)),P(async i=>{for(let q of p.interceptors.response._fns)i=await q(i);let u=M(i),B=U(i,o.responseHeader),A=u;return o.responseTransformer&&i.ok&&(A=await o.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:B??A}}),k(i=>i.status?I({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):m(()=>i)),R(i=>(z(o,i),i.body)),k(i=>m(()=>i)))};var G=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return s(t,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return s(t,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(o){return new(o||p)(h(b))};static \u0275prov=y({token:p,factory:p.\u0275fac,providedIn:"root"})};export{G as a,E as b,C as c};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-OVLLX4US.js";import"./chunk-QE4NBN5H.js";import"./chunk-KUP2T6AG.js";import"./chunk-WNHQELMC.js";import"./chunk-R2N5UWYB.js";import"./chunk-J64OAILA.js";import"./chunk-VXJJGZ5F.js";import"./chunk-AUMCM45B.js";import"./chunk-GRPEAINE.js";import"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-4IAJY6E3.js";import"./chunk-P7OKMMNZ.js";import"./chunk-HJSCQF6V.js";import"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{$ as ba,A as C,Aa as Ea,B as D,Ba as Fa,C as E,Ca as Ga,D as F,Da as Ha,E as G,Ea as Ia,F as H,Fa as Ja,G as I,Ga as Ka,H as J,Ha as La,I as K,Ia as Ma,J as L,Ja as Na,K as M,Ka as Oa,L as N,La as Pa,M as O,N as P,O as Q,P as R,Q as S,R as T,S as U,T as V,U as W,V as X,W as Y,X as Z,Y as _,Z as $,_ as aa,a as c,aa as ca,b as d,ba as da,c as e,ca as ea,d as f,da as fa,e as g,ea as ga,f as h,fa as ha,g as i,ga as ia,h as j,ha as ja,i as k,ia as ka,j as l,ja as la,k as m,ka as ma,l as n,la as na,m as o,ma as oa,n as p,na as pa,o as q,oa as qa,p as r,pa as ra,q as s,qa as sa,r as t,ra as ta,s as u,sa as ua,t as v,ta as va,u as w,ua as wa,v as x,va as za,w as y,wa as Aa,x as z,xa as Ba,y as A,ya as Ca,z as B,za as Da}from"./chunk-NXROYR6L.js";import{a as xa,b as ya}from"./chunk-FPPZ4BUR.js";import{Ca as b,ka as a}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ia as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Pa as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Fa as VERSION,Ga as ViewportScroller,u as WeekDay,ya as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Da as isPlatformBrowser,Ea as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,Aa as registerLocaleData,e as \u0275DomAdapter,Ha as \u0275NullViewportScroller,Ba as \u0275PLATFORM_BROWSER_ID,Ca as \u0275PLATFORM_SERVER_ID,za as \u0275PlatformNavigation,c as \u0275getDOM,i as \u0275normalizeQueryParams,xa as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
1
+ import{$ as ba,A as C,Aa as Ea,B as D,Ba as Fa,C as E,Ca as Ga,D as F,Da as Ha,E as G,Ea as Ia,F as H,Fa as Ja,G as I,Ga as Ka,H as J,Ha as La,I as K,Ia as Ma,J as L,Ja as Na,K as M,Ka as Oa,L as N,La as Pa,M as O,N as P,O as Q,P as R,Q as S,R as T,S as U,T as V,U as W,V as X,W as Y,X as Z,Y as _,Z as $,_ as aa,a as c,aa as ca,b as d,ba as da,c as e,ca as ea,d as f,da as fa,e as g,ea as ga,f as h,fa as ha,g as i,ga as ia,h as j,ha as ja,i as k,ia as ka,j as l,ja as la,k as m,ka as ma,l as n,la as na,m as o,ma as oa,n as p,na as pa,o as q,oa as qa,p as r,pa as ra,q as s,qa as sa,r as t,ra as ta,s as u,sa as ua,t as v,ta as va,u as w,ua as wa,v as x,va as za,w as y,wa as Aa,x as z,xa as Ba,y as A,ya as Ca,z as B,za as Da}from"./chunk-3ADKRLYD.js";import{a as xa,b as ya}from"./chunk-FPPZ4BUR.js";import{Ba as b,ja as a}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ia as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Pa as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Fa as VERSION,Ga as ViewportScroller,u as WeekDay,ya as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Da as isPlatformBrowser,Ea as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,Aa as registerLocaleData,e as \u0275DomAdapter,Ha as \u0275NullViewportScroller,Ba as \u0275PLATFORM_BROWSER_ID,Ca as \u0275PLATFORM_SERVER_ID,za as \u0275PlatformNavigation,c as \u0275getDOM,i as \u0275normalizeQueryParams,xa as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-QE4NBN5H.js";import"./chunk-KUP2T6AG.js";import"./chunk-WNHQELMC.js";import"./chunk-J64OAILA.js";import"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-P7OKMMNZ.js";import"./chunk-HJSCQF6V.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
@@ -0,0 +1,2 @@
1
+ import{a as ue}from"./chunk-KUP2T6AG.js";import{d as me}from"./chunk-WNHQELMC.js";import{c as de,d as Ce}from"./chunk-J64OAILA.js";import{a as ce}from"./chunk-ZQ56M63S.js";import{B as oe,G as re,J as ae,O as le,U as _e,V as se,X as pe,b as W,c as Y,e as Z,i as ee,k as te,s as ne,u as ie}from"./chunk-HJSCQF6V.js";import{ea as Q}from"./chunk-3ADKRLYD.js";import{Ab as P,Ac as j,Bb as c,Cb as a,Db as l,Eb as I,Ib as v,Jb as V,Jc as R,Kb as S,Lb as g,Qc as k,Ra as s,Sb as b,Tb as $,Ub as J,Wc as G,Yb as u,Zc as q,_ as K,_b as _,bb as H,da as d,ea as C,gb as f,hc as T,jc as B,mc as m,nc as A,oa as N,oc as D,uc as X,vc as z,wb as h,wc as x,xb as O,yb as M,zb as E}from"./chunk-Y7PHGRGB.js";import{a as w,b as L}from"./chunk-EUDKD2JW.js";var ge=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var xe=()=>({updateOn:"blur"});function Se(t,i){if(t&1){let e=g();a(0,"button",13),u("click",function(){d(e);let n=_();return C(n.showTextArea.set(!1))}),b(1,5),I(2,"sh-icon"),$(),l()}}function he(t,i){if(t&1){let e=g();a(0,"button",17,0),u("click",function(){let n=d(e).$implicit,r=_(3);return C(r.addSetting(n))}),a(2,"div",18)(3,"p"),m(4),l(),m(5),l()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),s(4),A(e.shortDescription),s(),D(" ",e.name," ")}}function Oe(t,i){if(t&1&&(a(0,"h3",9),m(1),l(),E(2,he,6,4,"button",16,M)),t&2){let e=i.$implicit;s(),A(e.displayName),s(),P(e.options)}}function Fe(t,i){if(t&1){let e=g();a(0,"sh-menu")(1,"button",19)(2,"sh-icon"),m(3,"dots-three-vertical"),l()(),v(4,15),a(5,"button",13),u("click",function(){d(e);let n=_(2);return C(n.addFreeTextSetting())}),b(6,7),I(7,"sh-icon"),$(),l(),a(8,"button",20),u("click",function(){d(e);let n=_(2);return C(n.showTextArea.set(!0))}),a(9,"sh-icon"),m(10,"link"),l(),m(11," Edit contents as text "),l(),V(),l()}}function we(t,i){if(t&1&&(a(0,"sh-menu",14)(1,"button",11),b(2,6),I(3,"sh-icon"),$(),l(),v(4,15),E(5,Oe,4,1,null,null,M),V(),l(),h(7,Fe,12,0,"sh-menu")),t&2){let e=_();c("searchable",!0),s(5),P(e.nonSelectedOptionsGrouped()),s(2),O(e.hasFreeTextSettings()?7:-1)}}function ye(t,i){if(t&1){let e=g();a(0,"textarea",21),u("ngModelChange",function(n){d(e);let r=_();return C(r.updateSettingsFromText(n))}),l()}if(t&2){let e=_();c("ngModel",e.settingsAsText())("ngModelOptions",j(2,xe))}}function Ie(t,i){t&1&&(a(0,"div",22),m(1,"Add a setting above to get started."),l())}function Ve(t,i){t&1&&(a(0,"sh-icon",30),m(1," warning-octagon "),l())}function Le(t,i){if(t&1&&(a(0,"sh-icon",31),m(1,"archive"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.deprecatedDescription)}}function Ne(t,i){if(t&1&&(a(0,"sh-icon",32),m(1,"question"),l()),t&2){let e=_(2).$implicit;c("shTooltip",e.FormView.longDescription)}}function Me(t,i){if(t&1&&(h(0,Ve,2,0,"sh-icon",30),a(1,"span"),m(2),l(),h(3,Le,2,1,"sh-icon",31)(4,Ne,2,1,"sh-icon",32)),t&2){let e=_().$implicit,o=x(1);O(o?0:-1),s(),B("deprecated",e.FormView.deprecatedDescription),s(),A(e.FormView.shortDescription),s(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Ee(t,i){t&1&&S(0)}function Pe(t,i){if(t&1){let e=g();a(0,"div",24)(1,"label"),f(2,Ee,1,0,"ng-container",33),l(),a(3,"div")(4,"sh-form-field")(5,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateFreeTextSettingName(r,n))}),l(),a(6,"sh-icon",35),m(7,"rectangle-dashed"),l()()(),a(8,"div")(9,"sh-form-field")(10,"input",34),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(11,"sh-icon",35),m(12,"textbox"),l()()()()}if(t&2){let e=_().$implicit,o=T(3);s(2),c("ngTemplateOutlet",o),s(3),c("ngModel",e.Name),s(5),c("ngModel",e.Value())}}function ve(t,i){t&1&&S(0)}function be(t,i){if(t&1){let e=g();a(0,"app-file-tree",25)(1,"label",36),f(2,ve,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function $e(t,i){if(t&1){let e=g();a(0,"app-file-tree",26),I(1,"label",36),a(2,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=x(0);c("startingPath",e.Value()),s(),c("for",o),s(),c("id",o)("ngModel",e.Value())}}function Ae(t,i){t&1&&S(0)}function De(t,i){t&1&&(a(0,"sh-icon",35),m(1,"link"),l())}function Re(t,i){t&1&&(a(0,"sh-icon",35),m(1,"hard-drives"),l())}function ke(t,i){t&1&&(a(0,"sh-icon",35),m(1,"jar"),l())}function Ge(t,i){t&1&&(a(0,"sh-icon",35),m(1,"envelope"),l())}function Be(t,i){t&1&&(a(0,"sh-icon",35),m(1,"textbox"),l())}function ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ae,1,0,"ng-container",33),l(),a(3,"input",38),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),h(4,De,2,0,"sh-icon",35)(5,Re,2,0,"sh-icon",35)(6,ke,2,0,"sh-icon",35)(7,Ge,2,0,"sh-icon",35)(8,Be,2,0,"sh-icon",35),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),s(),O(e.FormView.type==="Path"?4:e.FormView.type==="Hostname"?5:e.FormView.type==="Bucketname"?6:e.FormView.type==="Email"?7:8)}}function Ue(t,i){t&1&&S(0)}function Ke(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),l()}}function He(t,i){if(t&1){let e=g();a(0,"sh-icon",41),u("click",function(){d(e);let n=_(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),l()}}function Je(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ue,1,0,"ng-container",33),l(),a(3,"input",39),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"password"),l(),h(6,Ke,2,0,"sh-icon",40)(7,He,2,0,"sh-icon",40),l()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),s(3),O(e.showPassword?6:7)}}function Xe(t,i){t&1&&S(0)}function je(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;D(" ",e," ")}}function qe(t,i){if(t&1){let e=g();a(0,"sh-select",42)(1,"label",36),f(2,Xe,1,0,"ng-container",33),l(),a(3,"input",37),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,je,1,1,"ng-template",null,2,R)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("id",r)("ngModel",o.Value())}}function Qe(t,i){t&1&&S(0)}function We(t,i){if(t&1){let e=g();a(0,"app-size",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,Qe,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function Ye(t,i){t&1&&S(0)}function Ze(t,i){if(t&1){let e=g();a(0,"sh-form-field")(1,"label",36),f(2,Ye,1,0,"ng-container",33),l(),a(3,"input",44),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l(),a(4,"sh-icon",35),m(5,"numpad"),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function et(t,i){t&1&&S(0)}function tt(t,i){if(t&1){let e=g();a(0,"sh-toggle",28)(1,"label",36),f(2,et,1,0,"ng-container",33),l(),a(3,"input",45),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);s(),c("for",n),s(),c("ngTemplateOutlet",o),s(),c("id",n)("ngModel",e.Value())}}function nt(t,i){t&1&&S(0)}function it(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;D(" ",e," ")}}function ot(t,i){if(t&1){let e=g();a(0,"sh-select",46)(1,"label",36),f(2,nt,1,0,"ng-container",33),l(),a(3,"input",47),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),l()(),f(4,it,1,1,"ng-template",null,3,R)}if(t&2){let e=T(5),o=_().$implicit,n=T(3),r=x(0);c("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),s(),c("for",r),s(),c("ngTemplateOutlet",n),s(),c("ngModel",o.Value())}}function rt(t,i){t&1&&S(0)}function at(t,i){if(t&1){let e=g();a(0,"app-timespan",43),u("ngModelChange",function(n){d(e);let r=_().$implicit,p=_(2);return C(p.updateSettingValue(r,n))}),a(1,"label",36),f(2,rt,1,0,"ng-container",33),l()()}if(t&2){let e=_().$implicit,o=T(3),n=x(0);c("inputType",e.Name)("ngModel",e.Value())("customId",n),s(),c("for",n),s(),c("ngTemplateOutlet",o)}}function lt(t,i){if(t&1){let e=g();X(0)(1),f(2,Me,5,5,"ng-template",null,1,R),a(4,"div",23),h(5,Pe,13,3,"div",24)(6,be,4,9,"app-file-tree",25)(7,$e,3,4,"app-file-tree",26)(8,ze,9,6,"sh-form-field")(9,Je,8,6,"sh-form-field")(10,qe,6,7)(11,We,3,5,"app-size",27)(12,Ze,6,4,"sh-form-field")(13,tt,4,4,"sh-toggle",28)(14,ot,6,6)(15,at,3,5,"app-timespan",27),a(16,"button",29),u("click",function(){let n=d(e).$implicit,r=_(2);return C(r.removeSetting(n))}),a(17,"sh-icon"),m(18,"x-bold"),l()()()}if(t&2){let e=i.$implicit,o=i.$index,n=_(2);z("destination-"+e.Name+o),s(),z(n.inAppOptions(e.Name)),s(4),O(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function _t(t,i){if(t&1&&(h(0,Ie,2,0,"div",22),E(1,lt,19,3,null,null,M)),t&2){let e=_();O(e.selectedSettings().length===0?0:-1),s(),P(e.selectedSettings())}}var fe=class t{#e=K(ce);options=q.required();hiddenOptions=G([]);hasFreeTextSettings=G(!1);applicationOptions=G();showTextArea=N(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=k(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(F=>F.name===n.Name?.replace("--","")),p=n.Value??"";if(r&&i.includes(r.name))return null;if(r){if(r.type==="Boolean"&&(p=this.isTrue(p)),r.type==="Integer"&&(p=parseInt(p)||0),r.type==="Enumeration"&&r.options){let y=p?.trim().toLowerCase(),U=r.options.find(Te=>(Te??"").trim().toLocaleLowerCase()===y);U&&(p=U)}let F=ge.find(y=>y.name===r?.name);return F&&(r=w(w({},r),F)),L(w({},n),{Value:N(p),FormView:r})}else if(this.hasFreeTextSettings())return L(w({},n),{Value:N(p),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=k(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>L(w({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=k(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
+ `));updateSettingsFromText(i){if(typeof i!="string")return;let e=me(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);if(i.FormView.type==="Boolean")return n[r].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[r].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let p=e?.trim().toLowerCase()??"",F=i.FormView.options.find(y=>(y??"").trim().toLocaleLowerCase()===p);if(F)return n[r].Value=F,n}return n[r].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],r=n.findIndex(p=>p.Name===i.Name);return n[r].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=H({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:9,vars:3,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let r;return r=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disallowToggle"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","remove-btn",3,"click"],["shTooltip",r,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&(a(0,"sh-toggle-card",8),v(1,9)(2),J(3,4),V(),a(4,"div",10),h(5,Se,3,0,"button",11)(6,we,8,2),l(),V(),h(7,ye,1,3,"textarea",12)(8,_t,3,1),l()),e&2&&(c("disallowToggle",!0),s(5),O(o.showTextArea()?5:6),s(2),O(o.showTextArea()?7:8))},dependencies:[ne,Y,te,W,Z,ee,Ce,de,ue,Q,_e,re,oe,ae,pe,ie,le,se],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem;position:relative;z-index:1}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{fe as a};
@@ -1 +1 @@
1
- import{B as v}from"./chunk-TGNUULAU.js";import{$b as l,Db as i,Eb as o,Mb as C,Rc as D,Sa as n,Wc as T,Xc as h,Zb as g,cb as x,ea as u,fa as _,nc as r,oc as m,xb as s,yb as d}from"./chunk-ZBK64QS2.js";import{a as f}from"./chunk-EUDKD2JW.js";function y(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function S(e,a){if(e&1){let t=C();i(0,"button",5),g("click",function(){u(t);let p=l();return _(p.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function k(e,a){if(e&1){let t=C();i(0,"button",6),g("click",function(){u(t);let p=l();return _(p.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},b=class e{data=h();_data=D(()=>f(f({},w),this.data()));closed=T();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["shButton","",1,""],["shButton","",1,"raised","primary"],["shButton","",1,"",3,"click"],["shButton","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),s(4,y,2,1,"p"),o(),i(5,"footer",2),s(6,S,2,1,"button",3),s(7,k,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),d(c._data().message?4:-1),n(2),d(c._data().cancelText?6:-1),n(),d(c._data().confirmText?7:-1))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{b as a};
1
+ import{B as v}from"./chunk-HJSCQF6V.js";import{Cb as i,Db as o,Lb as C,Qc as D,Ra as n,Vc as T,Wc as h,Yb as g,_b as l,bb as x,da as u,ea as _,mc as r,nc as m,wb as s,xb as d}from"./chunk-Y7PHGRGB.js";import{a as f}from"./chunk-EUDKD2JW.js";function y(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function S(e,a){if(e&1){let t=C();i(0,"button",5),g("click",function(){u(t);let p=l();return _(p.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function k(e,a){if(e&1){let t=C();i(0,"button",6),g("click",function(){u(t);let p=l();return _(p.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},b=class e{data=h();_data=D(()=>f(f({},w),this.data()));closed=T();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=x({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["shButton","",1,""],["shButton","",1,"raised","primary"],["shButton","",1,"",3,"click"],["shButton","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),s(4,y,2,1,"p"),o(),i(5,"footer",2),s(6,S,2,1,"button",3),s(7,k,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),d(c._data().message?4:-1),n(2),d(c._data().cancelText?6:-1),n(),d(c._data().confirmText?7:-1))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{b as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-QBHHGHBJ.js";import{a as u}from"./chunk-AE7T2DAH.js";import{b as g}from"./chunk-TC7HZO7D.js";import{z as a}from"./chunk-TGNUULAU.js";import{Rc as l,Sc as c,V as n,_ as r,pa as s}from"./chunk-ZBK64QS2.js";var f=class o{#s=r(a);#e=r(g);#r=r(u);repeatRegisterTimer=null;state=s("unknown");claimUrl=s(null);registerUrl=s("");customRegisterUrl=s("");status=l(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),(t==="connecting"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>this.#t(i)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{console.log("next",t),this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#s.open(m,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:i=>e.#t(i),error:i=>e.#i(i)})}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=n({token:o,factory:o.\u0275fac,providedIn:"root"})};export{f as a};
1
+ import{a as m}from"./chunk-QLUEDPL4.js";import{a as u}from"./chunk-ZQ56M63S.js";import{b as g}from"./chunk-P7OKMMNZ.js";import{z as a}from"./chunk-HJSCQF6V.js";import{Qc as l,Rc as c,V as n,_ as r,oa as s}from"./chunk-Y7PHGRGB.js";var f=class o{#s=r(a);#e=r(g);#r=r(u);repeatRegisterTimer=null;state=s("unknown");claimUrl=s(null);registerUrl=s("");customRegisterUrl=s("");status=l(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=c(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),(t==="connecting"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>this.#t(i)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{console.log("next",t),this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#s.open(m,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:i=>e.#t(i),error:i=>e.#i(i)})}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=n({token:o,factory:o.\u0275fac,providedIn:"root"})};export{f as a};
@@ -1 +1 @@
1
- import{u as _}from"./chunk-TGNUULAU.js";import{Db as o,Eb as n,Sa as r,Xc as C,Zb as m,_c as u,ac as f,bc as a,cb as g,kc as h,nc as s,xb as d,yb as p}from"./chunk-ZBK64QS2.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],M=["[title]","[description]","[action]","*"];function P(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"sh-icon"),s(1,"caret-down"),n())}var l=class e{isActive=u(!1);disallowToggle=C(!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&&h("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,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,P,1,0),d(5,T,2,0,"sh-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:[_],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%] sh-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%] sh-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{u as _}from"./chunk-HJSCQF6V.js";import{$b as f,Cb as o,Db as n,Ra as r,Wc as C,Yb as m,Zc as u,ac as a,bb as g,jc as h,mc as s,wb as d,xb as p}from"./chunk-Y7PHGRGB.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],M=["[title]","[description]","[action]","*"];function P(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"sh-icon"),s(1,"caret-down"),n())}var l=class e{isActive=u(!1);disallowToggle=C(!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&&h("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,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,P,1,0),d(5,T,2,0,"sh-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:[_],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%] sh-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%] sh-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};
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-IQ52IXSC.js";import"./chunk-R2N5UWYB.js";import"./chunk-J64OAILA.js";import"./chunk-OQ2HMOSQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-NY63VRAY.js";import"./chunk-GRPEAINE.js";import"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-P7OKMMNZ.js";import"./chunk-HJSCQF6V.js";import"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};