@duplicati/ngclient 0.0.166 → 0.0.169

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 (140) hide show
  1. package/{chunk-CO4VU5IU.js → chunk-33SCK3HX.js} +1 -1
  2. package/{chunk-SFSDLKTN.js → chunk-3CHE2VBA.js} +1 -1
  3. package/{chunk-OVLLX4US.js → chunk-3L2HST7Q.js} +1 -1
  4. package/chunk-3T4NJWLA.js +1 -0
  5. package/chunk-47AUYCMN.js +1 -0
  6. package/{chunk-WNHQELMC.js → chunk-4BGVLUYV.js} +1 -1
  7. package/chunk-4FD362Y4.js +1 -0
  8. package/chunk-4L4YRYBK.js +1 -0
  9. package/{chunk-53V6KV3I.js → chunk-4MEL5WTX.js} +1 -1
  10. package/{chunk-GGNFAVSC.js → chunk-4PMLRVX5.js} +1 -1
  11. package/{chunk-53GUCO6P.js → chunk-5BMTCVLS.js} +1 -1
  12. package/chunk-5H3KA3BL.js +1 -0
  13. package/{chunk-XUQ74HFK.js → chunk-5K64UNNB.js} +1 -1
  14. package/{chunk-SHNCRKXQ.js → chunk-5PLFBSYN.js} +1 -1
  15. package/chunk-646U6U3M.js +1 -0
  16. package/{chunk-JGXPFEYZ.js → chunk-66KMXCBD.js} +1 -1
  17. package/{chunk-3ADKRLYD.js → chunk-6DB3NZXR.js} +1 -1
  18. package/chunk-7KUVROHU.js +1 -0
  19. package/chunk-7WIBNC6L.js +1 -0
  20. package/{chunk-AY4BUZJQ.js → chunk-ABJWT6DQ.js} +1 -1
  21. package/chunk-AFUSUOJX.js +1 -0
  22. package/chunk-AGFUNVOJ.js +1 -0
  23. package/{chunk-OQ2HMOSQ.js → chunk-BTVYI2KD.js} +1 -1
  24. package/{chunk-HEST3B3S.js → chunk-CCM2D4BF.js} +1 -1
  25. package/{chunk-M2BAPEJT.js → chunk-CSY4BFC4.js} +1 -1
  26. package/{chunk-ZZBUNZZO.js → chunk-D2DI6ZER.js} +1 -1
  27. package/{chunk-X7XIFHAV.js → chunk-DU5QSRYH.js} +1 -1
  28. package/chunk-DY7VFO2O.js +1 -0
  29. package/chunk-ES5NR2JV.js +3 -0
  30. package/{chunk-QLUEDPL4.js → chunk-F2QQDU4N.js} +1 -1
  31. package/{chunk-Y7PHGRGB.js → chunk-FAM42SZT.js} +1 -1
  32. package/{chunk-X6SJVQXW.js → chunk-FCZXIW2B.js} +1 -1
  33. package/chunk-FVVMRBPU.js +1 -0
  34. package/{chunk-R2N5UWYB.js → chunk-GS5QK7LF.js} +1 -1
  35. package/{chunk-NA6MTRHY.js → chunk-HFDNVEKY.js} +1 -1
  36. package/chunk-HJ5IWG4Y.js +1 -0
  37. package/{chunk-7WATCQLK.js → chunk-HJRYTTGO.js} +1 -1
  38. package/{chunk-GRPEAINE.js → chunk-I2RHQQ3J.js} +1 -1
  39. package/{chunk-ULR2EPP5.js → chunk-I5AKUAZF.js} +1 -1
  40. package/chunk-I6BGE5RS.js +1 -0
  41. package/{chunk-CMFSS355.js → chunk-IZQG3EV6.js} +1 -1
  42. package/{chunk-P7OKMMNZ.js → chunk-KBGIIJMM.js} +1 -1
  43. package/{chunk-YWZRYOES.js → chunk-L4GZJLYK.js} +1 -1
  44. package/chunk-L7A3FH7R.js +1 -0
  45. package/chunk-LEYS7OLH.js +1 -0
  46. package/{chunk-G4Z3JAJB.js → chunk-LEZL7BSL.js} +1 -1
  47. package/chunk-LFRGO2IP.js +1 -0
  48. package/{chunk-HKYSIIV5.js → chunk-LFVCKT5O.js} +1 -1
  49. package/{chunk-NY63VRAY.js → chunk-LJQN4G2O.js} +1 -1
  50. package/{chunk-HW7A5ZWV.js → chunk-M77IE672.js} +1 -1
  51. package/{chunk-YU5AMM6C.js → chunk-MP7JKTLP.js} +1 -1
  52. package/{chunk-ZXEF3CNK.js → chunk-MZMEFIHU.js} +1 -1
  53. package/{chunk-AROXMP46.js → chunk-N6SGM2XM.js} +3 -3
  54. package/{chunk-NDZU2O2Q.js → chunk-NHRDYV7W.js} +1 -1
  55. package/{chunk-ILGMXHEE.js → chunk-NOHHRZSK.js} +1 -1
  56. package/{chunk-KUP2T6AG.js → chunk-OLOFMEQN.js} +1 -1
  57. package/chunk-PD5WNPQM.js +1 -0
  58. package/{chunk-WPIVIZS6.js → chunk-PDBKO5D5.js} +1 -1
  59. package/chunk-PG2PHQWA.js +1 -0
  60. package/{chunk-VXJJGZ5F.js → chunk-PJAWWLYW.js} +1 -1
  61. package/{chunk-AUMCM45B.js → chunk-RECKKS2S.js} +1 -1
  62. package/chunk-RKMVTPJD.js +1 -0
  63. package/{chunk-5RCKMVGY.js → chunk-RNNVKT2R.js} +1 -1
  64. package/{chunk-O2M7MRKP.js → chunk-S5O366BO.js} +1 -1
  65. package/{chunk-E4KSSC6K.js → chunk-T6C2OUI5.js} +1 -1
  66. package/{chunk-4IAJY6E3.js → chunk-TJ3WIU6Q.js} +1 -1
  67. package/chunk-TZP7VKPA.js +1 -0
  68. package/chunk-UCP4VAJ4.js +1 -0
  69. package/chunk-UNGFQSCM.js +1 -0
  70. package/{chunk-RRM5OZPV.js → chunk-UPGTBICK.js} +1 -1
  71. package/{chunk-W7NX3PWJ.js → chunk-UTONS2P4.js} +1 -1
  72. package/{chunk-J64OAILA.js → chunk-VKR5DJQG.js} +1 -1
  73. package/chunk-VO42K6TQ.js +1 -0
  74. package/{chunk-Q4I4JXKZ.js → chunk-VOYMNW22.js} +1 -1
  75. package/{chunk-QE4NBN5H.js → chunk-W2UO5LKI.js} +1 -1
  76. package/{chunk-QOQI2ALM.js → chunk-W4QCGFNO.js} +1 -1
  77. package/{chunk-3VHQLGKM.js → chunk-WEFZF25L.js} +1 -1
  78. package/{chunk-NXJQU7IR.js → chunk-X5FW56GT.js} +1 -1
  79. package/chunk-XDECUOQ5.js +1 -0
  80. package/{chunk-ZQ56M63S.js → chunk-XE5OMGTJ.js} +1 -1
  81. package/{chunk-Y2LISX47.js → chunk-XTYBRFP6.js} +1 -1
  82. package/{chunk-SNVT3M5C.js → chunk-XY6KVQXK.js} +1 -1
  83. package/chunk-Y7PF5UJZ.js +1 -0
  84. package/chunk-YRYV3RWO.js +1 -0
  85. package/chunk-ZOO7P75U.js +1 -0
  86. package/chunk-ZTCP7QD2.js +1 -0
  87. package/{chunk-EYFKXXER.js → chunk-ZV7VPSMZ.js} +1 -1
  88. package/index.html +2 -2
  89. package/locale/messages.cs.json +1 -0
  90. package/locale/messages.da.json +57 -0
  91. package/locale/messages.de.json +52 -15
  92. package/locale/messages.en_GB.json +1 -0
  93. package/locale/messages.es.json +1 -0
  94. package/locale/messages.fr.json +1 -0
  95. package/locale/messages.it.json +63 -15
  96. package/locale/messages.ja_JP.json +1 -0
  97. package/locale/messages.nl_NL.json +21 -17
  98. package/locale/messages.pl.json +3 -1
  99. package/locale/messages.pt.json +1 -0
  100. package/locale/messages.pt_BR.json +1 -0
  101. package/locale/messages.ru.json +1 -0
  102. package/locale/messages.sr_RS.json +1 -0
  103. package/locale/messages.sv_SE.json +1 -0
  104. package/locale/messages.zh-Hans.json +2 -5
  105. package/locale/messages.zh_CN.json +4 -14
  106. package/locale/messages.zh_TW.json +1 -0
  107. package/{main-L5HX5P6R.js → main-NUSQL6LE.js} +1 -1
  108. package/package.json +1 -1
  109. package/styles-XWAP6FKR.css +1 -0
  110. package/chunk-25QJ7OWU.js +0 -1
  111. package/chunk-2HQTO4LT.js +0 -1
  112. package/chunk-3O255C2R.js +0 -1
  113. package/chunk-4N7O6OWH.js +0 -1
  114. package/chunk-A4HSV37F.js +0 -1
  115. package/chunk-BRPGUJ77.js +0 -1
  116. package/chunk-CMMGGY2S.js +0 -1
  117. package/chunk-DPQEDR6U.js +0 -1
  118. package/chunk-EEXKY2IJ.js +0 -1
  119. package/chunk-FUPYLAQ6.js +0 -1
  120. package/chunk-GHJ4MU3O.js +0 -3
  121. package/chunk-HJSCQF6V.js +0 -1
  122. package/chunk-IMF5BUVN.js +0 -1
  123. package/chunk-IQ52IXSC.js +0 -1
  124. package/chunk-JXLBFHEH.js +0 -1
  125. package/chunk-KKLVMIFL.js +0 -1
  126. package/chunk-L7WPKNLR.js +0 -1
  127. package/chunk-LHOHOKP5.js +0 -1
  128. package/chunk-NLXY47SY.js +0 -1
  129. package/chunk-POAVE42X.js +0 -1
  130. package/chunk-QAY6UFT6.js +0 -1
  131. package/chunk-R3F6GIHW.js +0 -1
  132. package/chunk-SKFITJZT.js +0 -1
  133. package/chunk-TPYX7QC7.js +0 -1
  134. package/chunk-V5B247QH.js +0 -1
  135. package/chunk-V7OQKE2Z.js +0 -1
  136. package/chunk-WJEUX75A.js +0 -1
  137. package/chunk-WKA7CSGA.js +0 -1
  138. package/chunk-ZSEZR472.js +0 -1
  139. package/chunk-ZZBZEHXF.js +0 -1
  140. package/styles-5QAJP4BI.css +0 -1
@@ -1 +1 @@
1
- import{a as $e,b as He}from"./chunk-HKYSIIV5.js";import{a as we}from"./chunk-ZXEF3CNK.js";import{a as J}from"./chunk-JGXPFEYZ.js";import"./chunk-X7XIFHAV.js";import{a as ve}from"./chunk-ULR2EPP5.js";import"./chunk-VXJJGZ5F.js";import"./chunk-6Q6SSTBK.js";import"./chunk-AUMCM45B.js";import"./chunk-YWZRYOES.js";import{a as be}from"./chunk-NY63VRAY.js";import"./chunk-GRPEAINE.js";import"./chunk-QLUEDPL4.js";import{a as Re}from"./chunk-ZQ56M63S.js";import{a as ye}from"./chunk-EYFKXXER.js";import"./chunk-E4KSSC6K.js";import{b as Ce,d as Ge}from"./chunk-4IAJY6E3.js";import{b as V}from"./chunk-P7OKMMNZ.js";import{B as R,F as Pe,G as Ie,I as Le,P as De,X as Me,c as Te,d as me,e as he,i as Fe,r as Ee,s as Ae,t as Oe,u as M,w as Y,x as Ne,z as fe}from"./chunk-HJSCQF6V.js";import{c as pe,e as Se,f as ge}from"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ab as ne,Ac as ce,Bb as O,Cb as a,Db as o,Eb as _,H as j,Ib as ie,Jb as oe,Lb as E,Qc as B,Ra as r,Rc as Q,Sb as g,Tb as C,Ub as f,Vc as ue,Xb as b,Xc as de,Yb as T,Zc as K,_ as S,_b as c,bb as D,da as m,ea as h,fc as ae,gc as se,jc as U,lc as L,mc as u,nc as q,oa as A,oc as y,rc as $,sc as H,tc as w,uc as re,vc as le,wb as d,wc as x,xb as p,xc as _e,yb as ee,zb as te}from"./chunk-Y7PHGRGB.js";import{a as z,b as W}from"./chunk-EUDKD2JW.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=x(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=x(6);r(),y(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=x(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=x(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),y(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ee,k=class i{#e=S(Ne);#t=S(J);isSubmitting=A(!1);messageSent=A(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=A(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=B(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=A(null);previousNotificationsCount=A(null);constructor(){Q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,Y,M,R,He,$e],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();U("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();U("loader",e.isUpdating()),O("disabled",!0)}}var X=class i{#e=S(V);closed=ue();isUpdating=A(!1);passphrase=A("");repeatPassphrase=A("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=b(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let G;G=$localize`Not now thanks`;let v;v=$localize` Yes, update passphrase now `;let F;return F=$localize` Yes, update passphrase now `,[s,l,P,I,G,v,F,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),w("ngModelChange",function(l){return H(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),w("ngModelChange",function(l){return H(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),$("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),$("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),U("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ae,Te,he,Fe,Y,Ie,M,Me,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,10),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.changeDefaultClientTo("ngax"))}),g(1,7),_(2,"sh-icon"),C(),o(),a(3,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(4,8),_(5,"sh-icon"),C(),o()}}var Z=class i{#e=S(we);#t=S(V);#i=S(ve);#o=S(Ce);#a=S(fe);#s=S(J);#r=S(Ge);#l=S(be);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=B(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(X,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:43,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=b(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=b(I);let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let v;return v=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,G,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],["action","",1,"machine-name",3,"title"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),w("isOpenChange",function(l){return H(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",10),a(2,"div",11)(3,"header"),_(4,"app-logo"),a(5,"button",12),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",13)(9,"button",14),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",15),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",16),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",17),g(19,3),_(20,"sh-icon"),C(),o(),_(21,"sh-divider"),a(22,"div",18)(23,"sh-icon"),u(24,"desktop"),o(),u(25),o()(),_(26,"div",19),a(27,"sh-list",20),d(28,ct,6,0),_(29,"sh-divider"),a(30,"button",21),g(31,4),_(32,"sh-icon"),C(),o(),a(33,"a",22),g(34,5),_(35,"sh-icon")(36,"sh-icon",23),C(),o(),a(37,"a",24),g(38,6),_(39,"sh-icon")(40,"sh-icon",23),C(),o()()(),_(41,"router-outlet")(42,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),$("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(13),O("title",_e(t.machineName())),r(3),y(" ",t.machineName()," "),r(3),p(t.relayIsEnabled()?-1:28))},dependencies:[pe,Se,ge,De,M,Le,R,Pe,k,ye],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
1
+ import{a as $e,b as He}from"./chunk-LFVCKT5O.js";import{a as we}from"./chunk-MZMEFIHU.js";import{a as J}from"./chunk-66KMXCBD.js";import"./chunk-DU5QSRYH.js";import{a as ve}from"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-L4GZJLYK.js";import{a as be}from"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import{a as Re}from"./chunk-XE5OMGTJ.js";import{a as ye}from"./chunk-ZV7VPSMZ.js";import"./chunk-T6C2OUI5.js";import{b as Ce,d as Ge}from"./chunk-TJ3WIU6Q.js";import{b as V}from"./chunk-KBGIIJMM.js";import{B as R,G as Pe,H as Ie,J as Le,Q as De,Y as Me,c as Te,d as me,e as he,i as Fe,r as Ee,s as Ae,t as Oe,u as M,w as Y,x as Ne,z as fe}from"./chunk-LFRGO2IP.js";import{c as pe,e as Se,f as ge}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Ab as te,Bb as ne,Bc as ce,Cb as O,Db as a,Eb as o,Fb as _,H as j,Jb as ie,Kb as oe,Mb as E,Ra as r,Rc as B,Sc as Q,Tb as g,Ub as C,Vb as f,Wc as ue,Yb as b,Yc as de,Zb as T,_ as S,_c as K,bb as D,da as m,ea as h,gc as ae,hc as se,kc as U,mc as L,nc as u,oa as A,oc as q,pc as y,sc as $,tc as H,uc as w,vc as re,wb as d,wc as le,xb as p,xc as x,yb as ee,yc as _e}from"./chunk-FAM42SZT.js";import{a as z,b as W}from"./chunk-EUDKD2JW.js";var Be=["scroller"];function Ye(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell-ringing"),o())}function Ve(i,n){i&1&&(a(0,"sh-icon"),u(1,"bell"),o())}function Je(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=x(6);O("index",0)("notification",e.content)}}function Xe(i,n){if(i&1&&(a(0,"div",11),u(1),o()),i&2){c(3);let e=x(6);r(),y(" ",e.content.content," ")}}function ze(i,n){if(i&1&&(a(0,"sh-alert")(1,"div",10),u(2),o(),d(3,Xe,2,1,"div",11),o()),i&2){c(2);let e=x(6);L(e.content.type||"error"),r(2),q(e.content.title),r(),p(e.content.content?3:-1)}}function We(i,n){if(i&1&&(a(0,"div",6),d(1,Je,1,2,"app-notification",8)(2,ze,4,4,"sh-alert",9),o()),i&2){c();let e=x(6);r(),p(e.type==="notification"?1:2)}}function je(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,2),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleNotifications())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function qe(i,n){if(i&1&&(a(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),y(" ",e.content," ")}}function Qe(i,n){if(i&1){let e=E();a(0,"sh-alert",18,1),T("click",function(){let s=m(e).$implicit,l=c(2);return h(l.deleteAlertByIndex(s.id))}),a(2,"div",19),u(3),o(),d(4,qe,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),O("id",e.id),r(3),q(e.title),r(),p(e.content?4:-1)}}function Ke(i,n){i&1&&(a(0,"p",17),f(1,4),o())}function Ze(i,n){if(i&1){let e=E();a(0,"div",7)(1,"div",12)(2,"h6",13),g(3,3),a(4,"button",5),T("click",function(){m(e);let s=c();return h(s.toggleAlerts())}),_(5,"sh-icon"),o(),C(),o(),a(6,"div",14,0)(8,"div",15),te(9,Qe,5,5,"sh-alert",16,ee,!1,Ke,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var xe=new Ee,k=class i{#e=S(Ne);#t=S(J);isSubmitting=A(!1);messageSent=A(!1);form=xe.group({message:xe.control("",[me.required])});notifications=this.#t.notifications;shownMessage=A(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=B(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=de("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=A(null);previousNotificationsCount=A(null);constructor(){Q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(s=>W(z({},s),{countDown:s.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ae(t.scroller,Be,5),e&2&&se()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let s=E();a(0,"button",5),T("click",function(){return m(s),h(t.toggleAlerts())}),a(1,"sh-icon"),u(2,"info"),o()(),a(3,"button",5),T("click",function(){return m(s),h(t.toggleNotifications())}),d(4,Ye,2,0,"sh-icon")(5,Ve,2,0,"sh-icon"),o(),re(6),d(7,We,3,1,"div",6),d(8,je,10,0,"div",7),d(9,Ze,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),p(t.notifications().length?4:5),r(2);let s=le(t.shownMessage());r(),p(s?7:-1),r(),p(t.isNotificationsOpen()?8:-1),r(),p(t.isAlertsOpen()?9:-1)}},dependencies:[Oe,Y,M,R,He,$e],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function et(i,n){i&1&&(a(0,"sh-icon",14),u(1,"check"),o())}function tt(i,n){i&1&&(a(0,"sh-icon",15),u(1,"prohibit"),o())}function nt(i,n){if(i&1){let e=E();a(0,"button",20),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();U("loader",e.isUpdating())}}function it(i,n){if(i&1){let e=E();a(0,"button",21),T("click",function(){m(e);let s=c();return h(s.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();U("loader",e.isUpdating()),O("disabled",!0)}}var X=class i{#e=S(V);closed=ue();isUpdating=A(!1);passphrase=A("");repeatPassphrase=A("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let s;s=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=b(l);let P;P=$localize`Passphrase`;let I;I=$localize`Repeat passphrase`;let G;G=$localize`Not now thanks`;let v;v=$localize` Yes, update passphrase now `;let F;return F=$localize` Yes, update passphrase now `,[s,l,P,I,G,v,F,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(a(0,"header",7)(1,"h3"),f(2,0),o()(),a(3,"div",8)(4,"sh-alert",9),g(5,1),_(6,"br")(7,"br"),C(),o(),a(8,"sh-form-field")(9,"label",10),f(10,2),o(),a(11,"input",11),w("ngModelChange",function(l){return H(t.passphrase,l)||(t.passphrase=l),l}),o()(),a(12,"sh-form-field")(13,"label",12),f(14,3),o(),a(15,"input",13),w("ngModelChange",function(l){return H(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),d(16,et,2,0,"sh-icon",14)(17,tt,2,0,"sh-icon",15),o()(),a(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),d(21,nt,2,2,"button",18)(22,it,2,3,"button",19),o()),e&2&&(r(11),$("ngModel",t.passphrase),r(4),O("disabled",t.passphrase().length===0),$("ngModel",t.repeatPassphrase),r(),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),U("loader",t.isUpdating()),r(2),p(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Ae,Te,he,Fe,Y,Ie,M,Me,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var ot=()=>({exact:!0});function at(i,n){i&1&&(a(0,"sh-icon",26),u(1,"x-bold"),o())}function st(i,n){i&1&&(a(0,"sh-icon",27),u(1,"list-bold"),o())}function rt(i,n){if(i&1){let e=E();ie(0,10),a(1,"button",25),T("click",function(){m(e);let s=c();return h(s.toggleNav())}),d(2,at,2,0,"sh-icon",26)(3,st,2,0,"sh-icon",27),o(),oe()}if(i&2){let e=c();r(2),p(e.isNavOpen()?2:3)}}function lt(i,n){i&1&&(a(0,"sh-icon"),u(1,"sun"),o())}function _t(i,n){i&1&&(a(0,"sh-icon"),u(1,"moon"),o())}function ct(i,n){if(i&1){let e=E();a(0,"button",28),T("click",function(){m(e);let s=c();return h(s.changeDefaultClientTo("ngax"))}),g(1,7),_(2,"sh-icon"),C(),o(),a(3,"button",28),T("click",function(){m(e);let s=c();return h(s.logout())}),g(4,8),_(5,"sh-icon"),C(),o()}}var Z=class i{#e=S(we);#t=S(V);#i=S(ve);#o=S(Ce);#a=S(fe);#s=S(J);#r=S(Ge);#l=S(be);#n=S(Re);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;sidenavType=this.#e.sidenavType;machineName=B(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#s.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#a.open(X,{maxWidth:"500px"})}})}toggleNav(){this.#e.toggleNav()}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:43,vars:12,consts:()=>{let n;n=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let s;s=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let l;l=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=b(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=b(I);let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let v;return v=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,s,l,P,I,G,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav-closed-topbar",""],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],["action","",1,"machine-name",3,"title"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["shButton","",1,"small","toggle-sidebar",3,"click"],[1,"cross"],[1,"burger"],["action","",3,"click"]]},template:function(e,t){e&1&&(a(0,"sh-sidenav",9),w("isOpenChange",function(l){return H(t.isNavOpen,l)||(t.isNavOpen=l),l}),d(1,rt,4,1,"ng-container",10),a(2,"div",11)(3,"header"),_(4,"app-logo"),a(5,"button",12),T("click",function(){return t.toggleBodyClass()}),d(6,lt,2,0,"sh-icon")(7,_t,2,0,"sh-icon"),o()(),a(8,"sh-list",13)(9,"button",14),g(10,0),_(11,"sh-icon"),C(),o(),a(12,"button",15),g(13,1),_(14,"sh-icon"),C(),o(),a(15,"button",16),g(16,2),_(17,"sh-icon"),C(),o(),a(18,"button",17),g(19,3),_(20,"sh-icon"),C(),o(),_(21,"sh-divider"),a(22,"div",18)(23,"sh-icon"),u(24,"desktop"),o(),u(25),o()(),_(26,"div",19),a(27,"sh-list",20),d(28,ct,6,0),_(29,"sh-divider"),a(30,"button",21),g(31,4),_(32,"sh-icon"),C(),o(),a(33,"a",22),g(34,5),_(35,"sh-icon")(36,"sh-icon",23),C(),o(),a(37,"a",24),g(38,6),_(39,"sh-icon")(40,"sh-icon",23),C(),o()()(),_(41,"router-outlet")(42,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),$("isOpen",t.isNavOpen),O("disableDrag",!0),r(),p(t.isMobile()?1:-1),r(5),p(t.isDarkMode()?6:7),r(3),O("routerLinkActiveOptions",ce(11,ot)),r(13),O("title",_e(t.machineName())),r(3),y(" ",t.machineName()," "),r(3),p(t.relayIsEnabled()?-1:28))},dependencies:[pe,Se,ge,De,M,Le,R,Pe,k,ye],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}.toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{position:absolute;inset:auto}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
@@ -1 +1 @@
1
- import{a as ut}from"./chunk-ZXEF3CNK.js";import{a as Nt}from"./chunk-EEXKY2IJ.js";import{a as mt}from"./chunk-ILGMXHEE.js";import"./chunk-X7XIFHAV.js";import"./chunk-ZZBUNZZO.js";import"./chunk-HW7A5ZWV.js";import"./chunk-ULR2EPP5.js";import"./chunk-VXJJGZ5F.js";import"./chunk-6Q6SSTBK.js";import"./chunk-AUMCM45B.js";import"./chunk-YWZRYOES.js";import{a as ie}from"./chunk-QOQI2ALM.js";import{a as X}from"./chunk-NY63VRAY.js";import"./chunk-GRPEAINE.js";import"./chunk-QLUEDPL4.js";import{a as Et}from"./chunk-ZQ56M63S.js";import"./chunk-E4KSSC6K.js";import{a as at,b as lt}from"./chunk-4IAJY6E3.js";import{b as ne}from"./chunk-P7OKMMNZ.js";import{B as J,E as rt,F as dt,G as te,K as Tt,L as St,M as ct,O as gt,V as Ct,X as pt,c as j,e as K,i as Q,m as _t,s as Y,t as Z,u as k,w as ee}from"./chunk-HJSCQF6V.js";import"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import{Ac as V,B as $,Bb as m,Cb as s,Db as o,Eb as I,H as R,Lb as f,Oa as Ye,Qc as w,Ra as l,Rc as x,Sb as F,Tb as b,Ub as _,Vb as B,Wb as H,Xb as W,Xc as st,Yb as c,_ as O,_b as T,a as je,b as Ke,bb as D,c as Qe,da as p,ea as E,fc as nt,gb as le,gc as it,hb as Ze,jc as M,mc as G,n as L,nc as q,oa as S,oc as _e,rb as et,rc as y,sb as tt,sc as v,tc as A,wb as g,xb as C,xc as ot}from"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";var ht=["formRef"],It=()=>[import("./chunk-QAY6UFT6.js").then(i=>i.OptionsListComponent)];function Rt(i,t){i&1&&(s(0,"sh-alert",3),_(1,1),o())}function Gt(i,t){if(i&1){let e=f();s(0,"app-options-list",5),A("optionsChange",function(a){p(e);let d=T();return v(d.settings,a)||(d.settings=a),E(a)}),o()}if(i&2){let e=T();y("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class i{#e=O(X);#n=O(ne);formRef=st.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=x(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],d)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(u=>(u.some(P=>P.Name===N)||u.push({Name:N,Value:a}),u))}d===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name),d=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u.replace("--",""))),N=t.reduce((u,P)=>{let h=P.Name?.startsWith("--")?P.Name:`--${P.Name}`;return u[h]=P.Value,u},{});d.forEach(u=>{N[u]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&nt(n.formRef,ht,5),e&2&&it()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(s(0,"div",2),g(1,Rt,2,0,"sh-alert",3),s(2,"button",4),c("click",function(){return n.submit()}),F(3,0),I(4,"sh-icon"),b(),o()(),Ze(5,Gt,1,2),et(6,5,It)),e&2&&(l(),C(n.saved()?1:-1),l(),M("loader",n.isSubmitting()),l(4),tt(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function vt(i,t){if(i&1){let e=f();s(0,"sh-form-field",12)(1,"input",13),A("ngModelChange",function(a){p(e);let d=T(2);return v(d.registerUrl,a)||(d.registerUrl=a),E(a)}),o()(),s(2,"button",14),c("click",function(){p(e);let a=T(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=T(2);l(),y("ngModel",e.registerUrl)}}function At(i,t){if(i&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),G(4),o()()),i&2){let e=T(2);l(3),m("href",ot(e.claimUrl()),Ye),l(),q(e.claimUrl())}}function Lt(i,t){i&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function $t(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.cancel())}),_(1,3),o()}}function Ft(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.disable())}),_(1,4),o()}}function bt(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.enable())}),_(1,5),o(),s(2,"button",16),c("click",function(){p(e);let a=T(2);return E(a.delete())}),_(3,6),o()}}function wt(i,t){i&1&&(F(0,7,1),I(1,"sh-icon"),b())}function Dt(i,t){i&1&&(F(0,7,2),I(1,"sh-icon"),b())}function xt(i,t){if(i&1){let e=f();s(0,"sh-chip",17),c("click",function(){p(e);let a=T(2);return E(a.copyReportingUrl())}),F(1,7),g(2,wt,2,0,"sh-icon")(3,Dt,2,0,"sh-icon"),b(),o()}if(i&2){let e=T(2);l(2),C(e.copiedReportingUrl()===!0?2:3)}}function kt(i,t){if(i&1&&(s(0,"div",8),g(1,vt,4,1),g(2,At,5,3,"div",9),g(3,Lt,3,0,"div",9),g(4,$t,2,0,"button",10),g(5,Ft,2,0,"button",10),g(6,bt,4,0),g(7,xt,4,1,"sh-chip",11),o()),i&2){let e=T();l(),C(e.state()==="inactive"?1:-1),l(),C(e.state()==="registered"?2:-1),l(),C(e.state()==="registering"?3:-1),l(),C(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),C(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),C(e.state()==="disabled"?6:-1),l(),C(e.additionalReportingUrl()!==""?7:-1)}}var oe=class i{#e=O(ie);#n=O(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let d;d=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let P;return P=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,P=W(P),[t,e,n,a,d,N,u,P,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&g(0,kt,8,7,"div",8),e&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,rt,k],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function Pt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function Jt(i,t){i&1&&(s(0,"label"),_(1,31),o())}function Xt(i,t){i&1&&(s(0,"label"),_(1,32),o())}function Vt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,29),o(),s(4,"p"),_(5,30),o()(),s(6,"div",50)(7,"sh-toggle",59),c("click",function(){p(e);let a=T(2);return E(a.toggleConsoleControl())}),g(8,Jt,2,0,"label")(9,Xt,2,0,"label"),o()()()}if(i&2){let e=T(2);l(7),M("active",!e.consoleControlDisabled()),l(),C(e.consoleControlDisabled()?8:9)}}function zt(i,t){if(i&1&&(s(0,"section")(1,"div",49)(2,"h3"),_(3,28),o(),s(4,"p"),G(5),o()(),s(6,"div",50),I(7,"app-remote-control"),o()(),g(8,Vt,10,3,"section")),i&2){let e=T();l(5),q(e.remoteControlStatus()),l(3),C(e.remoteControlState()!="inactive"?8:-1)}}function Ut(i,t){i&1&&(s(0,"sh-icon",74),G(1,"check"),o())}function Bt(i,t){i&1&&(s(0,"sh-icon",75),G(1,"prohibit"),o())}function Ht(i,t){if(i&1){let e=f();s(0,"button",79),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,36),o()}if(i&2){let e=T(2);M("loader",e.isUpdating())}}function Wt(i,t){if(i&1){let e=f();s(0,"button",80),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,37),o()}if(i&2){let e=T(2);M("loader",e.isUpdating()),m("disabled",!0)}}function qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",70),_(2,33),o(),s(3,"input",71),A("ngModelChange",function(a){p(e);let d=T();return v(d.passphrase,a)||(d.passphrase=a),E(a)}),o()(),s(4,"sh-form-field")(5,"label",72),_(6,34),o(),s(7,"input",73),A("ngModelChange",function(a){p(e);let d=T();return v(d.repeatPassphrase,a)||(d.repeatPassphrase=a),E(a)}),o(),g(8,Ut,2,0,"sh-icon",74)(9,Bt,2,0,"sh-icon",75),o(),s(10,"div",55)(11,"button",76),c("click",function(){p(e);let a=T();return E(a.cancelPasswordChange())}),_(12,35),o(),g(13,Ht,2,2,"button",77)(14,Wt,2,3,"button",78),o()}if(i&2){let e=T();l(3),y("ngModel",e.passphrase),l(4),m("disabled",e.passphrase().length===0),y("ngModel",e.repeatPassphrase),l(),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),M("loader",e.isUpdating()),l(2),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function jt(i,t){i&1&&(s(0,"sh-icon",81),G(1,"check"),o())}function Kt(i,t){if(i&1){let e=f();s(0,"div",55)(1,"button",76),c("click",function(){p(e);let a=T();return E(a.openPassphraseForm())}),_(2,38),o(),g(3,jt,2,0,"sh-icon",81),o()}if(i&2){let e=T();l(3),C(e.passwordUpdated()?3:-1)}}function Qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",82),_(2,39),o(),s(3,"textarea",83),A("ngModelChange",function(a){p(e);let d=T();return v(d.allowedHostnames,a)||(d.allowedHostnames=a),E(a)}),o()(),s(4,"sh-alert",84),_(5,40),o(),s(6,"button",79),c("click",function(){p(e);let a=T();return E(a.updateAllowedHostnames())}),_(7,41),o()}if(i&2){let e=T();l(3),y("ngModel",e.allowedHostnames),l(3),M("loader",e.updatingAllowedHosts())}}function Yt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,42),o(),s(4,"p"),_(5,43),o()(),s(6,"div",50)(7,"sh-select",85)(8,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updatePowerMode(a))}),o()()()()}if(i&2){let e=T();l(7),m("options",e.powerModeOptions())("isClearable",!1),l(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function Zt(i,t){if(i&1&&(s(0,"p"),_(1,44),o()),i&2){let e,n=T();l(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function en(i,t){i&1&&I(0,"sh-progress-bar",60)}function tn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function nn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function on(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,45),o(),s(4,"p"),F(5,46),I(6,"a",86)(7,"br")(8,"br"),b(),o()(),s(9,"div",50)(10,"sh-select",87)(11,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updateUsageStatistics(a))}),o(),le(12,nn,1,1,"ng-template"),o()()()}if(i&2){let e=T();l(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function sn(i,t,e){let n=Pt(i),a=n[je];e?.equal&&(a.equal=e.equal);let d;return n.set=N=>{clearTimeout(d),d=setTimeout(()=>Ke(a,N),t)},n.update=N=>{clearTimeout(d),d=setTimeout(()=>Qe(a,N),t)},n}var an=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Ot=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],re=class i{#e=O(ut);#n=O(Et);#t=O(ne);#i=O(X);#o=O(ie);#l=O(lt);#s=O(at);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#n.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=S("list");previousLang=this.#a;langCtrl=S(this.#a);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#o.status;remoteControlState=this.#o.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#l.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#n.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#_=x(()=>{let t=this.#n.systemInfo()?.DefaultUsageReportLevel??"",e=Ot;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),$(()=>(this.updateChannel.set(e),L(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),$(()=>(this.allowRemoteAccess.set(t),L(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),$(()=>(this.allowedHostnames.set(t),L(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),$(()=>(this.consoleControlDisabled.set(t),L(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),$(()=>(this.disableTrayIconLogin.set(t),L(null)))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(mt);powerModeOptions=w(()=>{let t=this.#n.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S(Ot);timeTypeOptions=S(an);timeType=S("none");timeValue=sn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=x(()=>{let t=this.timeValue(),e=this.#i.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),$(()=>(this.usageStatistics.set(e),L(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe($(()=>(this.powerModeCtrl.set(e),L(null)))).subscribe())}serverSettingsEffect=x(()=>{let t=this.#i.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),d=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":d.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-settings"]],decls:113,vars:43,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let d;d=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let u;u=$localize`Language`;let P;P=$localize`Select a language for the platform`;let h;h=$localize`Allow remote access (requires restart)`;let de;de=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Te;Te=$localize`Allow remote access`;let Se;Se=$localize`Prevent tray icon automatic log-in`;let ce;ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize`Update channel`;let pe;pe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ue;ue=$localize`Stable`;let Ne;Ne=$localize`Official stable release.`;let me;me=$localize`Beta`;let fe;fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Me;Me=$localize` Experimental `;let Pe;Pe=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Ie;Ie=$localize`Pause after startup or hibernation`;let Re;Re=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ge;Ge=$localize`Advanced options`;let ye;ye=$localize`Connect to console`;let ve;ve=$localize`Disable console control`;let Ae;Ae=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let Le;Le=$localize`Remote control disabled`;let $e;$e=$localize`Remote control enabled`;let Fe;Fe=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let De;De=$localize`Repeat passphrase`;let xe;xe=$localize`Cancel`;let ke;ke=$localize` Update passphrase `;let Je;Je=$localize` Update passphrase `;let Xe;Xe=$localize`Change password`;let Ve;Ve=$localize`Allowed hostnames`;let ze;ze=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Ue;Ue=$localize` Update allowed hostnames `;let Be;Be=$localize`Power mode provider`;let He;He=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let We;We=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=W(U),[t,e,n,a,d,N,u,P,h,de,Te,Se,ce,ge,Ce,pe,Ee,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,ye,ve,Ae,Le,$e,we,De,xe,ke,Je,Xe,Ve,ze,Ue,Be,He,We,qe,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Fe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(I(0,"app-status-bar"),s(1,"div",47)(2,"header")(3,"div",48)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),g(8,zt,9,2),s(9,"section")(10,"div",49)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",50)(16,"div",51)(17,"img",52),c("click",function(){return n.setLightMode()}),o(),s(18,"img",53),c("click",function(){return n.setDarkMode()}),o()()()(),s(19,"section")(20,"div",49)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",54),g(26,qt,15,7)(27,Kt,4,1,"div",55),o()(),s(28,"section")(29,"div",49)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",50)(35,"sh-select",56)(36,"input",57),c("ngModelChange",function(d){return n.updateLocale(d)}),o()()()(),s(37,"section")(38,"div",49)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",58)(44,"sh-toggle",59),c("click",function(){return n.updateRemoteAccess()}),s(45,"label"),_(46,10),o()(),g(47,Qt,8,3),o()(),s(48,"section")(49,"div",49)(50,"h3"),_(51,11),o(),s(52,"p"),_(53,12),o()(),s(54,"div",50)(55,"sh-toggle",59),c("click",function(){return n.saveDisableTrayIconLogin()}),s(56,"label"),_(57,13),o()()()(),g(58,Yt,9,5,"section"),s(59,"section")(60,"div",49)(61,"h3"),_(62,14),o(),g(63,Zt,2,1,"p"),g(64,en,1,0,"sh-progress-bar",60),o(),s(65,"div",61)(66,"div",62),c("click",function(){return n.setNewChannel("")}),s(67,"sh-radio",63),_(68,15),o(),s(69,"p"),_(70,16),o()(),s(71,"div",62),c("click",function(){return n.setNewChannel("stable")}),s(72,"sh-radio",63),_(73,17),o(),s(74,"p"),_(75,18),o()(),s(76,"div",62),c("click",function(){return n.setNewChannel("beta")}),s(77,"sh-radio",63),_(78,19),o(),s(79,"p"),_(80,20),o()(),s(81,"div",62),c("click",function(){return n.setNewChannel("experimental")}),s(82,"sh-radio",63),_(83,21),o(),s(84,"p"),_(85,22),o()(),s(86,"div",62),c("click",function(){return n.setNewChannel("canary")}),s(87,"sh-radio",63),_(88,23),o(),s(89,"p"),_(90,24),o()()()()(),I(91,"sh-divider"),s(92,"div",47)(93,"section")(94,"div",49)(95,"h3"),_(96,25),o(),s(97,"p"),_(98,26),o()(),s(99,"div",50)(100,"div",64)(101,"sh-range-slider",65)(102,"input",66),A("ngModelChange",function(d){return v(n.timeValue,d)||(n.timeValue=d),d}),o()(),s(103,"sh-select",67)(104,"input",68),c("ngModelChange",function(d){return n.updateTimeType(d)}),o(),le(105,tn,1,1,"ng-template"),o()()()(),g(106,on,13,5,"section"),o(),s(107,"div",47)(108,"section")(109,"div",69)(110,"h3"),_(111,27),o(),I(112,"app-advanced-options-settings"),o()()()),e&2){let a,d,N;l(8),C(n.isUsingRelay()?-1:8),l(9),M("active",!n.isDarkMode()),l(),M("active",n.isDarkMode()),l(8),C(n.showPassphraseForm()?26:27),l(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),m("ngModel",n.langCtrl())("ngModelOptions",V(41,se)),l(8),M("active",n.allowRemoteAccess()),l(3),C(n.allowRemoteAccess()?47:-1),l(8),M("active",n.disableTrayIconLogin()),l(3),C(n.powerModeOptions().length>0?58:-1),l(5),C((a=n.sysinfo())!=null&&a.ServerVersion?63:-1),l(),C(n.updatingChannel()?64:-1),l(3),M("active",n.updateChannel()===""),l(),B((d=n.sysinfo())==null?null:d.DefaultUpdateChannel),H(68),l(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(70),l(2),M("active",n.updateChannel()==="stable"),l(5),M("active",n.updateChannel()==="beta"),l(5),M("active",n.updateChannel()==="experimental"),l(5),M("active",n.updateChannel()==="canary"),l(14),m("unit",n.timeType()==="none"?"s":n.timeType()),l(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),m("ngModelOptions",V(42,se)),l(),m("options",n.timeTypeOptions())("isClearable",!1),l(),m("ngModel",n.timeType()),l(2),C(n.usageStatisticsDisabled()?-1:106)}},dependencies:[Y,j,_t,K,Q,Z,Nt,oe,z,J,St,ct,Tt,Ct,pt,te,k,dt,ee,gt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{sn as debounceSignal,re as default};
1
+ import{a as ut}from"./chunk-MZMEFIHU.js";import{a as Nt}from"./chunk-XDECUOQ5.js";import{a as mt}from"./chunk-NOHHRZSK.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import{a as ie}from"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import{a as X}from"./chunk-LJQN4G2O.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import{a as Et}from"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import{a as at,b as lt}from"./chunk-TJ3WIU6Q.js";import{b as ne}from"./chunk-KBGIIJMM.js";import{B as J,E as rt,G as dt,H as te,L as Tt,M as St,N as ct,P as gt,W as Ct,Y as pt,c as j,e as K,i as Q,m as _t,s as Y,t as Z,u as k,w as ee}from"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{$b as T,B as $,Bc as V,Cb as m,Db as s,Eb as o,Fb as I,H as R,Mb as f,Oa as Ye,Ra as l,Rc as w,Sc as x,Tb as F,Ub as b,Vb as _,Wb as B,Xb as H,Yb as W,Yc as st,Zb as c,_ as O,a as je,b as Ke,bb as D,c as Qe,da as p,ea as E,gb as le,gc as nt,hb as Ze,hc as it,kc as M,n as L,nc as G,oa as S,oc as q,pc as _e,rb as et,sb as tt,sc as y,tc as v,uc as A,wb as g,xb as C,yc as ot}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var ht=["formRef"],It=()=>[import("./chunk-7KUVROHU.js").then(i=>i.OptionsListComponent)];function Rt(i,t){i&1&&(s(0,"sh-alert",3),_(1,1),o())}function Gt(i,t){if(i&1){let e=f();s(0,"app-options-list",5),A("optionsChange",function(a){p(e);let d=T();return v(d.settings,a)||(d.settings=a),E(a)}),o()}if(i&2){let e=T();y("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class i{#e=O(X);#n=O(ne);formRef=st.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=x(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],d)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(u=>(u.some(P=>P.Name===N)||u.push({Name:N,Value:a}),u))}d===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name),d=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u.replace("--",""))),N=t.reduce((u,P)=>{let h=P.Name?.startsWith("--")?P.Name:`--${P.Name}`;return u[h]=P.Value,u},{});d.forEach(u=>{N[u]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&nt(n.formRef,ht,5),e&2&&it()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(s(0,"div",2),g(1,Rt,2,0,"sh-alert",3),s(2,"button",4),c("click",function(){return n.submit()}),F(3,0),I(4,"sh-icon"),b(),o()(),Ze(5,Gt,1,2),et(6,5,It)),e&2&&(l(),C(n.saved()?1:-1),l(),M("loader",n.isSubmitting()),l(4),tt(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function vt(i,t){if(i&1){let e=f();s(0,"sh-form-field",12)(1,"input",13),A("ngModelChange",function(a){p(e);let d=T(2);return v(d.registerUrl,a)||(d.registerUrl=a),E(a)}),o()(),s(2,"button",14),c("click",function(){p(e);let a=T(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=T(2);l(),y("ngModel",e.registerUrl)}}function At(i,t){if(i&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),G(4),o()()),i&2){let e=T(2);l(3),m("href",ot(e.claimUrl()),Ye),l(),q(e.claimUrl())}}function Lt(i,t){i&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function $t(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.cancel())}),_(1,3),o()}}function Ft(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.disable())}),_(1,4),o()}}function bt(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.enable())}),_(1,5),o(),s(2,"button",16),c("click",function(){p(e);let a=T(2);return E(a.delete())}),_(3,6),o()}}function wt(i,t){i&1&&(F(0,7,1),I(1,"sh-icon"),b())}function Dt(i,t){i&1&&(F(0,7,2),I(1,"sh-icon"),b())}function xt(i,t){if(i&1){let e=f();s(0,"sh-chip",17),c("click",function(){p(e);let a=T(2);return E(a.copyReportingUrl())}),F(1,7),g(2,wt,2,0,"sh-icon")(3,Dt,2,0,"sh-icon"),b(),o()}if(i&2){let e=T(2);l(2),C(e.copiedReportingUrl()===!0?2:3)}}function kt(i,t){if(i&1&&(s(0,"div",8),g(1,vt,4,1),g(2,At,5,3,"div",9),g(3,Lt,3,0,"div",9),g(4,$t,2,0,"button",10),g(5,Ft,2,0,"button",10),g(6,bt,4,0),g(7,xt,4,1,"sh-chip",11),o()),i&2){let e=T();l(),C(e.state()==="inactive"?1:-1),l(),C(e.state()==="registered"?2:-1),l(),C(e.state()==="registering"?3:-1),l(),C(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),C(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),C(e.state()==="disabled"?6:-1),l(),C(e.additionalReportingUrl()!==""?7:-1)}}var oe=class i{#e=O(ie);#n=O(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let d;d=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let P;return P=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,P=W(P),[t,e,n,a,d,N,u,P,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&g(0,kt,8,7,"div",8),e&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,rt,k],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function Pt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function Jt(i,t){i&1&&(s(0,"label"),_(1,31),o())}function Xt(i,t){i&1&&(s(0,"label"),_(1,32),o())}function Vt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,29),o(),s(4,"p"),_(5,30),o()(),s(6,"div",50)(7,"sh-toggle",59),c("click",function(){p(e);let a=T(2);return E(a.toggleConsoleControl())}),g(8,Jt,2,0,"label")(9,Xt,2,0,"label"),o()()()}if(i&2){let e=T(2);l(7),M("active",!e.consoleControlDisabled()),l(),C(e.consoleControlDisabled()?8:9)}}function zt(i,t){if(i&1&&(s(0,"section")(1,"div",49)(2,"h3"),_(3,28),o(),s(4,"p"),G(5),o()(),s(6,"div",50),I(7,"app-remote-control"),o()(),g(8,Vt,10,3,"section")),i&2){let e=T();l(5),q(e.remoteControlStatus()),l(3),C(e.remoteControlState()!="inactive"?8:-1)}}function Ut(i,t){i&1&&(s(0,"sh-icon",74),G(1,"check"),o())}function Bt(i,t){i&1&&(s(0,"sh-icon",75),G(1,"prohibit"),o())}function Ht(i,t){if(i&1){let e=f();s(0,"button",79),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,36),o()}if(i&2){let e=T(2);M("loader",e.isUpdating())}}function Wt(i,t){if(i&1){let e=f();s(0,"button",80),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,37),o()}if(i&2){let e=T(2);M("loader",e.isUpdating()),m("disabled",!0)}}function qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",70),_(2,33),o(),s(3,"input",71),A("ngModelChange",function(a){p(e);let d=T();return v(d.passphrase,a)||(d.passphrase=a),E(a)}),o()(),s(4,"sh-form-field")(5,"label",72),_(6,34),o(),s(7,"input",73),A("ngModelChange",function(a){p(e);let d=T();return v(d.repeatPassphrase,a)||(d.repeatPassphrase=a),E(a)}),o(),g(8,Ut,2,0,"sh-icon",74)(9,Bt,2,0,"sh-icon",75),o(),s(10,"div",55)(11,"button",76),c("click",function(){p(e);let a=T();return E(a.cancelPasswordChange())}),_(12,35),o(),g(13,Ht,2,2,"button",77)(14,Wt,2,3,"button",78),o()}if(i&2){let e=T();l(3),y("ngModel",e.passphrase),l(4),m("disabled",e.passphrase().length===0),y("ngModel",e.repeatPassphrase),l(),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),M("loader",e.isUpdating()),l(2),C(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function jt(i,t){i&1&&(s(0,"sh-icon",81),G(1,"check"),o())}function Kt(i,t){if(i&1){let e=f();s(0,"div",55)(1,"button",76),c("click",function(){p(e);let a=T();return E(a.openPassphraseForm())}),_(2,38),o(),g(3,jt,2,0,"sh-icon",81),o()}if(i&2){let e=T();l(3),C(e.passwordUpdated()?3:-1)}}function Qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",82),_(2,39),o(),s(3,"textarea",83),A("ngModelChange",function(a){p(e);let d=T();return v(d.allowedHostnames,a)||(d.allowedHostnames=a),E(a)}),o()(),s(4,"sh-alert",84),_(5,40),o(),s(6,"button",79),c("click",function(){p(e);let a=T();return E(a.updateAllowedHostnames())}),_(7,41),o()}if(i&2){let e=T();l(3),y("ngModel",e.allowedHostnames),l(3),M("loader",e.updatingAllowedHosts())}}function Yt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,42),o(),s(4,"p"),_(5,43),o()(),s(6,"div",50)(7,"sh-select",85)(8,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updatePowerMode(a))}),o()()()()}if(i&2){let e=T();l(7),m("options",e.powerModeOptions())("isClearable",!1),l(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function Zt(i,t){if(i&1&&(s(0,"p"),_(1,44),o()),i&2){let e,n=T();l(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function en(i,t){i&1&&I(0,"sh-progress-bar",60)}function tn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function nn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function on(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,45),o(),s(4,"p"),F(5,46),I(6,"a",86)(7,"br")(8,"br"),b(),o()(),s(9,"div",50)(10,"sh-select",87)(11,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updateUsageStatistics(a))}),o(),le(12,nn,1,1,"ng-template"),o()()()}if(i&2){let e=T();l(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function sn(i,t,e){let n=Pt(i),a=n[je];e?.equal&&(a.equal=e.equal);let d;return n.set=N=>{clearTimeout(d),d=setTimeout(()=>Ke(a,N),t)},n.update=N=>{clearTimeout(d),d=setTimeout(()=>Qe(a,N),t)},n}var an=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Ot=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],re=class i{#e=O(ut);#n=O(Et);#t=O(ne);#i=O(X);#o=O(ie);#l=O(lt);#s=O(at);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#n.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=S("list");previousLang=this.#a;langCtrl=S(this.#a);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#o.status;remoteControlState=this.#o.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#l.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#n.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#_=x(()=>{let t=this.#n.systemInfo()?.DefaultUsageReportLevel??"",e=Ot;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),$(()=>(this.updateChannel.set(e),L(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),$(()=>(this.allowRemoteAccess.set(t),L(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),$(()=>(this.allowedHostnames.set(t),L(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),$(()=>(this.consoleControlDisabled.set(t),L(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),$(()=>(this.disableTrayIconLogin.set(t),L(null)))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(mt);powerModeOptions=w(()=>{let t=this.#n.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S(Ot);timeTypeOptions=S(an);timeType=S("none");timeValue=sn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=x(()=>{let t=this.timeValue(),e=this.#i.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),$(()=>(this.usageStatistics.set(e),L(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe($(()=>(this.powerModeCtrl.set(e),L(null)))).subscribe())}serverSettingsEffect=x(()=>{let t=this.#i.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),d=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":d.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-settings"]],decls:113,vars:43,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let d;d=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let u;u=$localize`Language`;let P;P=$localize`Select a language for the platform`;let h;h=$localize`Allow remote access (requires restart)`;let de;de=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Te;Te=$localize`Allow remote access`;let Se;Se=$localize`Prevent tray icon automatic log-in`;let ce;ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize`Update channel`;let pe;pe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ue;ue=$localize`Stable`;let Ne;Ne=$localize`Official stable release.`;let me;me=$localize`Beta`;let fe;fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Me;Me=$localize` Experimental `;let Pe;Pe=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Ie;Ie=$localize`Pause after startup or hibernation`;let Re;Re=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ge;Ge=$localize`Advanced options`;let ye;ye=$localize`Connect to console`;let ve;ve=$localize`Disable console control`;let Ae;Ae=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let Le;Le=$localize`Remote control disabled`;let $e;$e=$localize`Remote control enabled`;let Fe;Fe=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let De;De=$localize`Repeat passphrase`;let xe;xe=$localize`Cancel`;let ke;ke=$localize` Update passphrase `;let Je;Je=$localize` Update passphrase `;let Xe;Xe=$localize`Change password`;let Ve;Ve=$localize`Allowed hostnames`;let ze;ze=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Ue;Ue=$localize` Update allowed hostnames `;let Be;Be=$localize`Power mode provider`;let He;He=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let We;We=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=W(U),[t,e,n,a,d,N,u,P,h,de,Te,Se,ce,ge,Ce,pe,Ee,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,ye,ve,Ae,Le,$e,we,De,xe,ke,Je,Xe,Ve,ze,Ue,Be,He,We,qe,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Fe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(I(0,"app-status-bar"),s(1,"div",47)(2,"header")(3,"div",48)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),g(8,zt,9,2),s(9,"section")(10,"div",49)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",50)(16,"div",51)(17,"img",52),c("click",function(){return n.setLightMode()}),o(),s(18,"img",53),c("click",function(){return n.setDarkMode()}),o()()()(),s(19,"section")(20,"div",49)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",54),g(26,qt,15,7)(27,Kt,4,1,"div",55),o()(),s(28,"section")(29,"div",49)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",50)(35,"sh-select",56)(36,"input",57),c("ngModelChange",function(d){return n.updateLocale(d)}),o()()()(),s(37,"section")(38,"div",49)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",58)(44,"sh-toggle",59),c("click",function(){return n.updateRemoteAccess()}),s(45,"label"),_(46,10),o()(),g(47,Qt,8,3),o()(),s(48,"section")(49,"div",49)(50,"h3"),_(51,11),o(),s(52,"p"),_(53,12),o()(),s(54,"div",50)(55,"sh-toggle",59),c("click",function(){return n.saveDisableTrayIconLogin()}),s(56,"label"),_(57,13),o()()()(),g(58,Yt,9,5,"section"),s(59,"section")(60,"div",49)(61,"h3"),_(62,14),o(),g(63,Zt,2,1,"p"),g(64,en,1,0,"sh-progress-bar",60),o(),s(65,"div",61)(66,"div",62),c("click",function(){return n.setNewChannel("")}),s(67,"sh-radio",63),_(68,15),o(),s(69,"p"),_(70,16),o()(),s(71,"div",62),c("click",function(){return n.setNewChannel("stable")}),s(72,"sh-radio",63),_(73,17),o(),s(74,"p"),_(75,18),o()(),s(76,"div",62),c("click",function(){return n.setNewChannel("beta")}),s(77,"sh-radio",63),_(78,19),o(),s(79,"p"),_(80,20),o()(),s(81,"div",62),c("click",function(){return n.setNewChannel("experimental")}),s(82,"sh-radio",63),_(83,21),o(),s(84,"p"),_(85,22),o()(),s(86,"div",62),c("click",function(){return n.setNewChannel("canary")}),s(87,"sh-radio",63),_(88,23),o(),s(89,"p"),_(90,24),o()()()()(),I(91,"sh-divider"),s(92,"div",47)(93,"section")(94,"div",49)(95,"h3"),_(96,25),o(),s(97,"p"),_(98,26),o()(),s(99,"div",50)(100,"div",64)(101,"sh-range-slider",65)(102,"input",66),A("ngModelChange",function(d){return v(n.timeValue,d)||(n.timeValue=d),d}),o()(),s(103,"sh-select",67)(104,"input",68),c("ngModelChange",function(d){return n.updateTimeType(d)}),o(),le(105,tn,1,1,"ng-template"),o()()()(),g(106,on,13,5,"section"),o(),s(107,"div",47)(108,"section")(109,"div",69)(110,"h3"),_(111,27),o(),I(112,"app-advanced-options-settings"),o()()()),e&2){let a,d,N;l(8),C(n.isUsingRelay()?-1:8),l(9),M("active",!n.isDarkMode()),l(),M("active",n.isDarkMode()),l(8),C(n.showPassphraseForm()?26:27),l(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),m("ngModel",n.langCtrl())("ngModelOptions",V(41,se)),l(8),M("active",n.allowRemoteAccess()),l(3),C(n.allowRemoteAccess()?47:-1),l(8),M("active",n.disableTrayIconLogin()),l(3),C(n.powerModeOptions().length>0?58:-1),l(5),C((a=n.sysinfo())!=null&&a.ServerVersion?63:-1),l(),C(n.updatingChannel()?64:-1),l(3),M("active",n.updateChannel()===""),l(),B((d=n.sysinfo())==null?null:d.DefaultUpdateChannel),H(68),l(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(70),l(2),M("active",n.updateChannel()==="stable"),l(5),M("active",n.updateChannel()==="beta"),l(5),M("active",n.updateChannel()==="experimental"),l(5),M("active",n.updateChannel()==="canary"),l(14),m("unit",n.timeType()==="none"?"s":n.timeType()),l(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),m("ngModelOptions",V(42,se)),l(),m("options",n.timeTypeOptions())("isClearable",!1),l(),m("ngModel",n.timeType()),l(2),C(n.usageStatisticsDisabled()?-1:106)}},dependencies:[Y,j,_t,K,Q,Z,Nt,oe,z,J,St,ct,Tt,Ct,pt,te,k,dt,ee,gt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{sn as debounceSignal,re as default};
@@ -1 +1 @@
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
+ import{a as Ue}from"./chunk-W2UO5LKI.js";import{a as Ye}from"./chunk-GS5QK7LF.js";import{d as se}from"./chunk-VKR5DJQG.js";import{a as Xe}from"./chunk-PJAWWLYW.js";import{a as Je}from"./chunk-RECKKS2S.js";import{b as _e}from"./chunk-I2RHQQ3J.js";import{a as L}from"./chunk-F2QQDU4N.js";import{a as U}from"./chunk-XE5OMGTJ.js";import{b as Y}from"./chunk-KBGIIJMM.js";import{B as X,H as we,L as Be,M as xe,P as Ve,V as We,W 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-LFRGO2IP.js";import{b as h,d as R}from"./chunk-LEZL7BSL.js";import{la as oe}from"./chunk-6DB3NZXR.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,Ra as d,Rc as le,Sc as A,Tb as S,Ub as g,V as fe,Vb as E,Wb as Re,Xb as Pe,Zb as C,_,bb as M,da as N,ea as f,gb as he,i as Ee,kc as Ie,nc as K,o as me,oa as p,pc as Le,qc as Me,sc as ee,tc as te,uc as ie,wb as y,x as re,xb as b,y as Fe}from"./chunk-FAM42SZT.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};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-3L2HST7Q.js";import"./chunk-W2UO5LKI.js";import"./chunk-OLOFMEQN.js";import"./chunk-4BGVLUYV.js";import"./chunk-GS5QK7LF.js";import"./chunk-VKR5DJQG.js";import"./chunk-PJAWWLYW.js";import"./chunk-RECKKS2S.js";import"./chunk-I2RHQQ3J.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import"./chunk-LFRGO2IP.js";import"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as M}from"./chunk-XDECUOQ5.js";import"./chunk-DU5QSRYH.js";import"./chunk-D2DI6ZER.js";import"./chunk-M77IE672.js";import"./chunk-I5AKUAZF.js";import"./chunk-PJAWWLYW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-RECKKS2S.js";import"./chunk-W4QCGFNO.js";import"./chunk-L4GZJLYK.js";import"./chunk-F2QQDU4N.js";import"./chunk-XE5OMGTJ.js";import"./chunk-T6C2OUI5.js";import"./chunk-TJ3WIU6Q.js";import"./chunk-KBGIIJMM.js";import{B as D,C as N,u as E}from"./chunk-LFRGO2IP.js";import{e as m}from"./chunk-LEZL7BSL.js";import"./chunk-4MEL5WTX.js";import"./chunk-5K64UNNB.js";import"./chunk-6DB3NZXR.js";import"./chunk-FPPZ4BUR.js";import{Bc as d,Cb as s,Db as e,Eb as n,Fb as o,Ra as c,Tb as r,Ub as l,Vb as i,bb as T}from"./chunk-FAM42SZT.js";import"./chunk-EUDKD2JW.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};