@duplicati/ngclient 0.0.221 → 0.0.225

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-2EX5HS5X.js +1 -0
  2. package/{chunk-IQL3REGJ.js → chunk-2KD757N6.js} +1 -1
  3. package/{chunk-OPHQNXYO.js → chunk-2YUSBRXY.js} +1 -1
  4. package/{chunk-F2ZC26DC.js → chunk-35FMFK4I.js} +1 -1
  5. package/{chunk-IG7XUEED.js → chunk-3DHD6GQL.js} +1 -1
  6. package/{chunk-IRT2UBDI.js → chunk-3HYQMG65.js} +1 -1
  7. package/{chunk-3L3SRTPU.js → chunk-3PARK7B7.js} +1 -1
  8. package/chunk-3V25RAVK.js +1 -0
  9. package/{chunk-ELCA5MKF.js → chunk-4ISFDBI3.js} +1 -1
  10. package/chunk-5FQ7HESA.js +1 -0
  11. package/chunk-5QGFYH2A.js +3 -0
  12. package/chunk-5UJN5SN4.js +2 -0
  13. package/{chunk-BLSV7CNZ.js → chunk-6DX35WDO.js} +1 -1
  14. package/{chunk-77IXQ4GU.js → chunk-6WX2UOAN.js} +1 -1
  15. package/{chunk-N2GI5QYJ.js → chunk-7VQ67PEZ.js} +1 -1
  16. package/{chunk-XBAZKJ47.js → chunk-A23UTI46.js} +1 -1
  17. package/chunk-AR5SEBWX.js +1 -0
  18. package/{chunk-EKVZKEQJ.js → chunk-B4QFOJXL.js} +1 -1
  19. package/{chunk-TCXCC5BM.js → chunk-BPHX6VXP.js} +1 -1
  20. package/{chunk-VKQQDCUN.js → chunk-CJKZ27FM.js} +1 -1
  21. package/{chunk-YCJYEQF7.js → chunk-COEGVUM3.js} +1 -1
  22. package/chunk-CQJRBQ6I.js +1 -0
  23. package/{chunk-736PM4LG.js → chunk-E4CYVUYG.js} +1 -1
  24. package/chunk-EBKOJDCT.js +1 -0
  25. package/chunk-EVEI25GQ.js +2 -0
  26. package/{chunk-TVFRVP7K.js → chunk-EXAZ4QZR.js} +1 -1
  27. package/chunk-G7TNRWOU.js +1 -0
  28. package/{chunk-23SRH7FI.js → chunk-GA3CAVSK.js} +1 -1
  29. package/chunk-GKAMSAN5.js +1 -0
  30. package/{chunk-JPCUISZG.js → chunk-GNKCBZMS.js} +1 -1
  31. package/{chunk-N2AU7VKX.js → chunk-HDDAGHHE.js} +1 -1
  32. package/chunk-HLHUPBCV.js +1 -0
  33. package/chunk-HPXIWKIK.js +1 -0
  34. package/chunk-HS3UDQIJ.js +1 -0
  35. package/chunk-HWOUAWOE.js +1 -0
  36. package/chunk-IDJ52K34.js +1 -0
  37. package/chunk-ITN4L52Q.js +1 -0
  38. package/chunk-J7GH3G72.js +1 -0
  39. package/chunk-JBX7YYME.js +1 -0
  40. package/chunk-JCXT6U5P.js +1 -0
  41. package/{chunk-JP2Z2HMH.js → chunk-JNZJE3GC.js} +1 -1
  42. package/chunk-K5XGRFWJ.js +4 -0
  43. package/chunk-KGK4RY3J.js +1 -0
  44. package/{chunk-DSYNIXJF.js → chunk-KNSQLQC6.js} +1 -1
  45. package/chunk-KUNX5APQ.js +1 -0
  46. package/chunk-KX3UP3HV.js +1 -0
  47. package/chunk-KZYRTI62.js +1 -0
  48. package/chunk-LXTSZI4K.js +1 -0
  49. package/chunk-MKI54WTC.js +1 -0
  50. package/chunk-MSIH2OJ5.js +1 -0
  51. package/{chunk-FDYBIC4O.js → chunk-N5XYG3QW.js} +1 -1
  52. package/{chunk-LE24LKH7.js → chunk-NE255HQN.js} +1 -1
  53. package/chunk-NQAD2FBX.js +1 -0
  54. package/chunk-NUV5LHQV.js +1 -0
  55. package/{chunk-RGFJ5UMA.js → chunk-O2HQIEE4.js} +1 -1
  56. package/chunk-O2L2FRYE.js +11 -0
  57. package/chunk-OP7MDR2B.js +1 -0
  58. package/chunk-OSGHJCUU.js +1 -0
  59. package/chunk-OYU6OBKA.js +1 -0
  60. package/{chunk-5KJPC3V5.js → chunk-P2EIEVFT.js} +1 -1
  61. package/{chunk-6JS7B4FW.js → chunk-PDZNQW6F.js} +1 -1
  62. package/{chunk-IMQUTGIK.js → chunk-PEOYNJJM.js} +1 -1
  63. package/chunk-PMF4FTBF.js +1 -0
  64. package/{chunk-CAQ3XMFP.js → chunk-PNQ5BDQN.js} +1 -1
  65. package/{chunk-ACTJSKQZ.js → chunk-PNRFCYAE.js} +1 -1
  66. package/{chunk-GW34KK5A.js → chunk-POVWDK74.js} +1 -1
  67. package/chunk-QW23XWNE.js +1 -0
  68. package/{chunk-PIGMTUUT.js → chunk-SKLSR5GH.js} +1 -1
  69. package/chunk-T7RMSUHE.js +1 -0
  70. package/chunk-TSVSMVY4.js +1 -0
  71. package/chunk-TV7OB7Y4.js +1 -0
  72. package/{chunk-QDDVZ4CR.js → chunk-TWWAK5M6.js} +1 -1
  73. package/{chunk-BKEJZADV.js → chunk-TXCVGOPN.js} +1 -1
  74. package/{chunk-F3JYPWPK.js → chunk-UIVZWXBK.js} +1 -1
  75. package/chunk-UNQKMTFM.js +1 -0
  76. package/{chunk-KZTFESBJ.js → chunk-V2M5YF4E.js} +1 -1
  77. package/{chunk-O2SMJYPC.js → chunk-V2UO7ES2.js} +1 -1
  78. package/{chunk-OLWLWDXZ.js → chunk-VOXTAZLZ.js} +1 -1
  79. package/{chunk-FD5CKX3J.js → chunk-VQLI7RDY.js} +1 -1
  80. package/chunk-VTOEFKZG.js +1 -0
  81. package/chunk-VZNLMGYP.js +2 -0
  82. package/chunk-XUCXLLB4.js +1 -0
  83. package/{chunk-GKGMP6VF.js → chunk-XWML36YQ.js} +1 -1
  84. package/chunk-Y47NRSCA.js +1 -0
  85. package/{chunk-ZC23RK4J.js → chunk-YF6JHIN5.js} +1 -1
  86. package/{chunk-ANSV4G2K.js → chunk-YS4B2B5N.js} +1 -1
  87. package/{chunk-FBU3EBFO.js → chunk-ZGQ2WCM2.js} +1 -1
  88. package/chunk-ZSAEIKEB.js +1 -0
  89. package/chunk-ZXBKGNJU.js +1 -0
  90. package/index.html +1 -1
  91. package/main-S64CL44W.js +1 -0
  92. package/package.json +1 -1
  93. package/chunk-43WATFQS.js +0 -11
  94. package/chunk-4E7D5F6K.js +0 -1
  95. package/chunk-4J6L5OV3.js +0 -1
  96. package/chunk-5JGSXUKD.js +0 -1
  97. package/chunk-5YE4H57F.js +0 -1
  98. package/chunk-5ZRRLJA4.js +0 -1
  99. package/chunk-6NVCDJR6.js +0 -1
  100. package/chunk-ACTATISC.js +0 -1
  101. package/chunk-APSPCDGV.js +0 -1
  102. package/chunk-AXQQEOTT.js +0 -1
  103. package/chunk-BMACDVWX.js +0 -1
  104. package/chunk-COI6UMB5.js +0 -1
  105. package/chunk-CZVTBPNE.js +0 -1
  106. package/chunk-DE4JIJWO.js +0 -1
  107. package/chunk-DHFLXFWF.js +0 -1
  108. package/chunk-E4NQOMJX.js +0 -1
  109. package/chunk-ESLC5LVP.js +0 -1
  110. package/chunk-F3ETZKLK.js +0 -1
  111. package/chunk-FR5RTIOE.js +0 -1
  112. package/chunk-G2BDKU26.js +0 -2
  113. package/chunk-I5DD3Q6J.js +0 -1
  114. package/chunk-JPMKWWZP.js +0 -1
  115. package/chunk-JSZIISFS.js +0 -1
  116. package/chunk-MTL3FBSM.js +0 -1
  117. package/chunk-NPFPMA4P.js +0 -1
  118. package/chunk-O56QUSSI.js +0 -2
  119. package/chunk-OCUE5GMT.js +0 -1
  120. package/chunk-OJVUCHRP.js +0 -1
  121. package/chunk-OL7ADIFI.js +0 -1
  122. package/chunk-PPSQGUOL.js +0 -3
  123. package/chunk-QQWV3FEH.js +0 -1
  124. package/chunk-RDLRXAJU.js +0 -1
  125. package/chunk-SACQFUJE.js +0 -1
  126. package/chunk-TISQKN7N.js +0 -1
  127. package/chunk-TQTOIWBK.js +0 -4
  128. package/chunk-TWAHUXIN.js +0 -1
  129. package/chunk-TZ7MW3NZ.js +0 -2
  130. package/chunk-UTXZPAY6.js +0 -1
  131. package/chunk-UZ4POLDC.js +0 -1
  132. package/chunk-WJBMMY2Y.js +0 -1
  133. package/chunk-XPVATEBM.js +0 -1
  134. package/chunk-XWTB7XRI.js +0 -1
  135. package/chunk-YMFI2Q2X.js +0 -1
  136. package/chunk-YPNN5FBK.js +0 -1
  137. package/chunk-YWBZLU6M.js +0 -1
  138. package/chunk-YYD2JU6T.js +0 -1
  139. package/chunk-ZNYN6ES6.js +0 -1
  140. package/main-IUT3IXX4.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as Ke}from"./chunk-COEGVUM3.js";import{a as Ye}from"./chunk-PEOYNJJM.js";import{a as Qe}from"./chunk-NUV5LHQV.js";import{A as ze,B as ge,H as Q,J as je,K as He,L as Je,P as Ue,W as Xe,a as pe,c as U,e as X,i as q,k as he,s as K,v as We,y as Ve,z as Ge}from"./chunk-CJKZ27FM.js";import{d as qe}from"./chunk-KNSQLQC6.js";import{aa as Be}from"./chunk-YF6JHIN5.js";import{$ as ie,Ac as ce,B as be,Bb as re,Bc as we,Cb as se,Cc as ue,Db as y,Dc as Ie,Eb as p,Fb as h,G as _e,Gb as ae,Gc as Le,Jc as Ae,Kb as Se,Kc as ke,Lb as ye,Mb as me,Nb as W,Rc as v,Ta as _,Ub as ve,Vb as Oe,Wb as A,Wc as $e,Xb as Z,Xc as P,Yb as ee,Yc as Ce,_b as V,ac as m,bc as J,cc as D,ea as O,fa as F,hb as H,hc as Fe,ic as Re,jc as fe,kc as le,l as Me,lc as z,mb as Y,oc as N,pc as xe,q as G,qa as M,qc as De,rc as de,sa as L,tc as k,uc as $,vc as B,w as Ee,wb as oe,xb as R,yb as x,zb as Ne}from"./chunk-K5XGRFWJ.js";import{a as te,b as ne}from"./chunk-7CGTOI24.js";var lt=["treeContainer"],dt=["formRef"],ct=[[["label"]],[["label"]],[["input"]]],ut=["label","label","input"],pt=r=>({children:r,level:0}),nt=r=>({$implicit:r}),ht=(r,t)=>({children:r,level:t}),gt=()=>({maxWidth:"700px",width:"100%"}),_t=(r,t)=>t.id;function mt(r,t){if(r&1){let e=W();p(0,"sh-button-group",21),B("valueChange",function(i){O(e);let o=m();return $(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),F(i)}),p(1,"button",22),A(2,4),h(),p(3,"button",23),A(4,5),h()()}if(r&2){let e=m();k("value",e.pathDiscoveryMethod)}}function ft(r,t){r&1&&ae(0,"sh-progress-bar",14)}function Ct(r,t){r&1&&(p(0,"sh-icon",29),N(1,"caret-down"),h())}function Pt(r,t){r&1&&ae(0,"sh-icon",29)}function Tt(r,t){r&1&&(p(0,"sh-icon",29),N(1,"spinner"),h())}function Mt(r,t){r&1&&(p(0,"sh-icon",29),N(1,"caret-right"),h())}function Et(r,t){r&1&&(p(0,"sh-icon",26),N(1,"folder-open"),h())}function bt(r,t){r&1&&(p(0,"sh-icon",26),N(1,"folder-user"),h())}function Nt(r,t){r&1&&(p(0,"sh-icon",26),N(1,"file"),h())}function St(r,t){r&1&&(p(0,"sh-icon",26),N(1,"folder"),h())}function yt(r,t){if(r&1&&(R(0,Ct,2,0,"sh-icon",29)(1,Pt,1,0,"sh-icon",29)(2,Tt,2,0,"sh-icon",29)(3,Mt,2,0,"sh-icon",29),R(4,Et,2,0,"sh-icon",26)(5,bt,2,0,"sh-icon",26)(6,Nt,2,0,"sh-icon",26)(7,St,2,0,"sh-icon",26)),r&2){let e=m(2).$implicit,n=m(2);x(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),_(4),x(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function vt(r,t){r&1&&(p(0,"sh-icon",26),N(1,"desktop-tower"),h())}function Ot(r,t){if(r&1&&(p(0,"span",28),N(1),Le(2,"bytes"),h()),r&2){let e=m(2).$implicit;_(),De("\xA0(",Ae(2,1,e.fileSize,!0,!0),")")}}function Ft(r,t){r&1&&me(0)}function Rt(r,t){if(r&1&&Y(0,Ft,1,0,"ng-container",15),r&2){let e=m(2).$implicit,n=m().$implicit;m();let i=fe(7);y("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(5,nt,Ie(2,ht,e.children,n.level+1)))}}function xt(r,t){if(r&1){let e=W();p(0,"div",24,3),V("click",function(){O(e);let i=m().$implicit,o=m(2);return F(o.toggleNode(i.id,i))}),p(2,"div",25),R(3,yt,8,2)(4,vt,2,0,"sh-icon",26),h(),p(5,"div",27),V("click",function(i){O(e);let o=m().$implicit,a=m(2);return F(a.toggleSelectedNode(i,o))}),p(6,"span"),N(7),h(),R(8,Ot,3,5,"span",28),h()(),R(9,Rt,1,7,"ng-container")}if(r&2){let e=m().$implicit,n=m().$implicit,i=m();z("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),_(2),z("file",e.cls==="file"),_(),x(e.id!=="/"?3:4),_(4),xe(e.text),_(),x(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),_(),x(e.children.length>0?9:-1)}}function Dt(r,t){if(r&1&&R(0,xt,10,24),r&2){let e=t.$implicit,n=m(2);x(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function wt(r,t){if(r&1&&(p(0,"sh-list"),re(1,Dt,1,1,null,null,_t),h()),r&2){let e=t.$implicit;le("padding-left",e.level*.25,"rem"),_(),se(e.children)}}function It(r,t){r&1&&me(0)}function Lt(r,t){if(r&1){let e=W();p(0,"sh-toggle",30),B("checkedChange",function(i){O(e);let o=m();return $(o._showHiddenNodes,i)||(o._showHiddenNodes=i),F(i)}),A(1,6),h()}if(r&2){let e=m();k("checked",e._showHiddenNodes),_(),Z(e.showFiles()?"files":"folders"),ee(1)}}function At(r,t){if(r&1){let e=W();p(0,"button",31),V("click",function(){O(e);let i=m();return F(i.openCreateFolderDialog())}),A(1,7),h()}if(r&2){let e=m();y("disabled",!e.isCurrentPathFolder())}}function kt(r,t){if(r&1){let e=W();p(0,"sh-dialog",32),B("isOpenChange",function(i){O(e);let o=m();return $(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),F(i)}),p(1,"header",33)(2,"h2"),A(3,8),h()(),p(4,"div",34)(5,"div",35)(6,"p"),A(7,9),h(),p(8,"div",36)(9,"pre"),N(10),h()()(),p(11,"sh-form-field")(12,"textarea",37),B("ngModelChange",function(i){O(e);let o=m();return $(o.createFolderPath,i)||(o.createFolderPath=i),F(i)}),h()()(),p(13,"footer",38)(14,"button",39),V("click",function(){O(e);let i=m();return F(i.closeCreateFolderDialog(!1))}),N(15,"Cancel"),h(),p(16,"button",40),V("click",function(){O(e);let i=m();return F(i.closeCreateFolderDialog(!0))}),ve(17,10),ae(18,"sh-icon"),Oe(),h()()()}if(r&2){let e,n=m();k("isOpen",n.createFolderDialogOpen),y("options",we(6,gt)),_(10),de("",n.currentPathResolved(),"",n.createFolderPath()?"/"+n.createFolderPath():""),_(2),k("ngModel",n.createFolderPath),_(4),y("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var it=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(it||{}),T="/",Pe=class r{#e=ie(qe);#i=ie(Qe);#h=ie(Ge);multiSelect=P(!1);disabled=P(!1);showFiles=P(!1);selectFiles=P(!1);accepts=P(null);startingPath=P(null);rootPaths=P([]);initialNodes=P([]);backupSettings=P(null);pathRefreshTrigger=P(!1);showHiddenNodes=P(!1);enableCreateFolder=P(!1);hideShortcuts=P(!1);resolvePaths=P(!1);customRemoteMode=P(null);backupId=P("");sourcePrefix=P("");destinationUrl=P("");loadExtendedData=P(!0);hasExtendedData=$e();searchMode=P(!1);searchResults=P([]);_showHiddenNodes=M(!1);createFolderDialogOpen=M(!1);createFolderPath=M(null);treeContainerRef=Ce("treeContainer");formRef=Ce("formRef");pathDiscoveryMethod=M("browse");isLoading=M(null);currentPath=M("");#r=M(null);treeSearchQuery=M("");treeNodes=M([]);pathDelimiter=v(()=>this.#i.systemInfo()?.DirectorySeparator??"");filterGroups=this.#i.filterGroups();isByBackupSettings=v(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=v(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathResolved=v(()=>this.currentPath().split("\0").filter(e=>e!==""&&e!==T).map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#i.resolveShorthandPath(n)}).join("\0"));TreeEvalEnum=it;searchResultTreeStructure=v(()=>{let t=this.searchResults();if(t.length===0)return[];let e=this.currentPath().split("\0").filter(s=>s!==""&&s!==T),n=this.showHiddenNodes(),i=new Map;for(let s of t){let d=s.Path??"",f=this.#n(d),b=d.split(f).filter(S=>S!==""),C="";for(let S=0;S<b.length;S++){let w=b[S],I=S===b.length-1,j=!I||this.#t(d),st=C||T,Te=C?C.endsWith(f)?C.slice(0,-f.length):C:"";if(C=Te?`${Te}${f}${w}`:`${f}${w}`,j&&!C.endsWith(f)&&(C+=f),!i.has(C))i.set(C,{part:w,parentPath:st,isFolder:j,match:I?s:null});else if(I){let at=i.get(C);at.match=s}}}let o=new Map;for(let[s,d]of i)o.has(d.parentPath)||o.set(d.parentPath,[]),o.get(d.parentPath).push(s);let a=new Set,u=new Map;for(let[s,d]of i){if(!d.isFolder){a.add(s);continue}let f=o.get(d.parentPath)||[];if(f.length===1&&f[0]===s&&d.parentPath!==T)continue;a.add(s);let C=d.part,S=s;for(;;){let w=o.get(S)||[];if(w.length!==1)break;let I=w[0],j=i.get(I);if(!j||!j.isFolder)break;C+="/"+j.part,S=I}S!==s&&u.set(s,C)}a.add(T);let l=[],c=new Map,g=Array.from(a).filter(s=>s!==T).sort((s,d)=>s.split("/").length-d.split("/").length||s.localeCompare(d));for(let s of g){let d=i.get(s);if(!d)continue;let f=d.parentPath;for(;f!==T&&!a.has(f);)f=i.get(f)?.parentPath||T;if(c.has(s))continue;let b=this.#l(u.get(s),d.match?.Metadata)??d.part,C=d.match===null,S=d.match!==null&&!d.isFolder&&n?0:this.#a(e,s,d.isFolder?"folder":"file",null),w={id:s,resolvedpath:s,text:b,parentPath:f,children:[],evalState:S,isIndeterminate:this.isIndeterminate(e,s),cls:d.isFolder?"folder":"file",isSearchMatch:d.match!==null,isGenerated:C,hasChildrenInSearch:(o.get(s)?.length||0)>0,iconCls:null,check:!1,leaf:!d.isFolder,hidden:!1,systemFile:!1,temporary:!1,symlink:!1,fileSize:d.match?.Size??0};if(c.set(s,w),f===T)l.push(w);else{let I=c.get(f);I&&I.children.push(w)}}let E=s=>{s.sort((d,f)=>d.cls==="folder"&&f.cls!=="folder"?-1:d.cls!=="folder"&&f.cls==="folder"?1:(d.text??"").localeCompare(f.text??"")),s.forEach(d=>E(d.children))};return E(l),l});treeStructure=v(()=>{if(this.searchMode())return this.searchResultTreeStructure();let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==T),n=structuredClone(e);for(let l=0;l<n.length;l++){let g=n[l].slice(1);if(g.startsWith("{")&&g.endsWith("}")){let E=g.slice(1,-1),s=this.filterGroups?.FilterGroups[E];if(s&&s.length){let d=s.map(f=>`-${f}`);n.splice(l,1,...d)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),u=[];return o.length>0?u=o.map(l=>{let c=this.#a(n,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:c,isIndeterminate:!1,cls:this.#t(l)?"folder":"file"}}):u=[{id:T,resolvedpath:T,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],u.map(l=>{let c=new Map;if(!l.id)return;let g=l.id;a&&(l.accepted=!0),c.set(g,l);let E=o.length>0?i.filter(s=>s.parentPath.startsWith(g)):i;for(let s of E){if(!s.id)continue;let d=s.id;if(!s.cls||c.has(d))continue;let f=c.get(s.parentPath),b=s.hidden===!0&&!t?0:this.#a(n,d,s.cls,f),C=ne(te({},s),{isIndeterminate:this.isIndeterminate(n,d),evalState:b,children:[]});a&&(C.accepted=this.matchAccepts(a,C)),c.set(d,C),C.id?.startsWith("%")&&C.id?.endsWith("%")&&c.set(this.#s(d),C),f&&f.children.push(C)}return l}),u});#s(t){if(!t)return T;let e=this.#n(t);return t.endsWith("/")||t.endsWith("\\")||t===T?t:t+e}#d(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#s(t.resolvedpath):t.resolvedpath:null}#a(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,a=t.filter(g=>!g.startsWith("-")&&!g.startsWith("+")),u=t.filter(g=>g.startsWith("-")||g.startsWith("+")),l=this.multiSelect(),c=this.#d(this.treeNodes().find(g=>g.id===e))??e;if(a.length===0)return o;for(let g=0;g<a.length;g++){let E=a[g];if(e===E||c==E){o=1;break}if(!l||!this.#t(E))continue;if(e?.startsWith(E)||c?.startsWith(E)){o=1;break}}if(u.length===0)return o;for(let g=0;g<u.length;g++){let E=u[g],s=E.slice(1),d=E.startsWith("-")?-1:1;if(this.#t(s)){if(n!=="folder")continue;if(e===s||c==s){o=d;break}}if(s.startsWith("*")&&(s.endsWith("*\\")||s.endsWith("*/"))){if(n!=="folder")continue;let b=s.slice(1,-2);if(b==="")break;if(e?.includes(b+"\\")||e?.includes(b+"/")){o=d;break}}if(s.startsWith("[.*")&&(s.endsWith("[^\\/]*]")||s.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let b=s.slice(3,-7);if(new RegExp(b).test(e)){o=d;break}}if(s.startsWith("[")&&s.endsWith("]")){let b=s.slice(1,-1),C=this.translateCSharpRegex(b);if(new RegExp(`${C}`).test(e)){o=d;break}}if(s.startsWith("*.")){if(n!=="file"||s.replace("*.","").length===0)continue;if(this.#c(e,s,!0)){o=d;break}}if(s==="")continue;if(s===e){o=d;break}if(this.#c(e,s,!0)){o=d;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):!1}#c(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#n(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=L(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=L(()=>{let t=this.pathDiscoveryMethod(),e=this.#r();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n)}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===T)return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=L(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=L(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#g(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#r.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#T(t);else{let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#l(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#o(null,e[0])):this.#o(null,T)}}getParentPath(t){let e=this.#n(t),n=t.split(e);return n.length<=1?T:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===T||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(c=>c!==""&&c!==T),o=this.isChildOfSelected(e),a=this.#d(e),u=o?`-${a}`:a,l=this.#t(a);if(this.multiSelect())if(i.includes(a))this.currentPath.set(i.filter(c=>c!==a&&!(l&&c.startsWith(u))).join("\0"));else if(i.some(c=>c==u))this.currentPath.set(i.filter(c=>c!==u).join("\0"));else{let c=l?i.filter(g=>!g.startsWith(a)):i;this.currentPath.set([...c,u].join("\0"))}else i.includes(a)?this.currentPath.set(i.filter(c=>c!==a).join("\0")):this.currentPath.set(a)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==T&&this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#o(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),o=this.#s(e),a=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+a}}).subscribe({next:()=>{this.currentPath.set(a),this.#o(null,n),setTimeout(()=>{this.#u()},500),this.createFolderDialogOpen.set(!1)},error:u=>{let l=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=l?l[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#h.open(Ye,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#u(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#g(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#_(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#f(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(G(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#P(t){let e=this.backupSettings();if(this.#i.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(G(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(G(i=>i.Files??[]))}}#p(t){return this.customRemoteMode()==="o365"?this.#m(t):this.customRemoteMode()==="gsuite"?this.#f(t):this.customRemoteMode()==="diskimage"?this.#C(t):this.isByBackupSettings()?this.#P(t):this.#_(t)}#T(t){let n=t.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")&&!a.startsWith("@")).filter(Boolean).map(a=>{let u=this.#n(a),l=a.split(u);return l.at(-1)===""&&l.pop(),this.#t(a)||l.pop(),{split:l,sep:u}}),i=[T];n.forEach(({split:a,sep:u})=>{a.forEach((l,c)=>{let g=a.slice(0,c+1).join(u)+u;g===""||g===u||i.includes(g)||i.push(g)})});let o=i.map(a=>(this.isLoading.set(a),this.#p(a).pipe(G(u=>({status:"success",value:u,url:a})),be(u=>Me({status:"error",value:u,url:a})))));Ee(o).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:a=>{let u=a.filter(c=>c.status==="success"),l=a.filter(c=>c.status==="error");this.treeNodes.update(c=>{let g=u.flatMap(s=>Array.isArray(s.value)?s.value.map(d=>ne(te({},d),{parentPath:s.url})):[]),E=[...new Map([...c,...g].map(s=>[s.id,s])).values()];return this.#u(),this.hideShortcuts()?E.filter(s=>!s.id.startsWith("%")):E})}})}#l(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#M(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType)}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#o(t=null,e=T){this.isLoading.set(e),this.#p(e).pipe(_e(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#M(o.Metadata);let a=this.#n(o.Path);return{text:this.#l(o.Path.split(a).filter(l=>l!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1,fileSize:o.Size}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let c=this.#t(l.id)?"folder":"file";return ne(te({},l),{cls:c,parentPath:e})}),u=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?u.filter(l=>!l.id.startsWith("%")):u})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Fe(n.treeContainerRef,lt,5)(n.formRef,dt,5),e&2&&Re(2)},hostVars:2,hostBindings:function(e,n){e&2&&z("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:ut,decls:18,vars:17,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let a;a=$localize`Will be created as:`;let u;return u=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,a,u,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"size"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(J(ct),R(0,mt,5,1,"sh-button-group",11),p(1,"div",12),D(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",13,0),R(5,ft,1,0,"sh-progress-bar",14),Y(6,wt,3,2,"ng-template",null,1,ke)(8,It,1,0,"ng-container",15),h(),p(9,"div",16),R(10,Lt,2,2,"sh-toggle",17),R(11,At,2,1,"button",18),h()(),p(12,"div",19,2)(14,"sh-form-field"),D(15,1,["ngProjectAs","label",5,["label"]]),D(16,2,["ngProjectAs","input",5,["input"]]),h()(),R(17,kt,19,7,"sh-dialog",20)),e&2){let i=fe(7);x(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),_(),z("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),_(2),z("visualize-accepted",n.accepts()),_(2),x(n.isLoading()!=null?5:-1),_(3),y("ngTemplateOutlet",i)("ngTemplateOutletContext",ue(15,nt,ue(13,pt,n.treeStructure()))),_(2),x(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),_(),x(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),_(),z("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),_(5),x(n.createFolderDialogOpen()?17:-1)}},dependencies:[ge,ze,Xe,We,Q,je,Je,Ve,Be,K,U,X,q,Ke],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}'],changeDetection:0})};var $t=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Bt=["label","[prefix]","[suffix]"];function Wt(r,t){if(r&1&&N(0),r&2){let e=t.$implicit,n=m();de("",e.label,"",n.hasPerSecond()?"/s":"")}}var Vt=["throttle-upload","throttle-download"],Gt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],zt=r=>{if(!r||typeof r!="string"||r.length===0)return{size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},ot=class r{customId=P();inputType=P();timespan=M(0);unit=M("MB");sizeOptions=M(Gt);readonly=M(!1);hasPerSecond=v(()=>{let t=this.inputType();return t&&Vt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=zt(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit)}):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[ce([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Bt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(J($t),p(0,"div",0),D(1,0,["ngProjectAs","label",5,["label"]]),h(),p(2,"sh-form-field")(3,"input",1),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),h(),D(4,1),D(5,2),h(),p(6,"sh-select",2)(7,"input",3),B("ngModelChange",function(o){return $(n.unit,o)||(n.unit=o),o}),h(),Y(8,Wt,1,2,"ng-template"),h()),e&2&&(_(2),oe("readonly",n.readonly()||void 0),_(),y("id",n.customId()),k("ngModel",n.timespan),y("disabled",n.readonly()),_(3),le("--miw",0),y("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),_(),k("ngModel",n.unit))},dependencies:[Ue,Q,K,U,he,X,q],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var jt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ht=["label","[prefix]","[suffix]"];function Jt(r,t){if(r&1){let e=W();p(0,"button",7),V("click",function(){let i=O(e).$implicit,o=m();return F(o.updateUnit(i.value))}),A(1,1),h()}if(r&2){let e=t.$implicit;_(),Z(e.label),ee(1)}}var Ut=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Xt=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],qt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],rt=class r{customId=P();inputType=P();timespan=M(0);#e="D";unit=M(this.#e);unitLabel=v(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=v(()=>{let t=this.inputType();return t&&qt.includes(t.replace("--",""))});timeOptions=v(()=>this.isShortTime()?Ut:Xt);readonly=M(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=L(()=>{this.onChange(this.getValue())});inputTypeEffect=L(()=>{let t=this.timeOptions(),e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e)});updateUnit(t){this.unit.set(t)}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=H({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[ce([{provide:pe,useExisting:r,multi:!0}])],ngContentSelectors:Ht,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(J(jt),D(0,0,["ngProjectAs","label",5,["label"]]),p(1,"sh-form-field")(2,"input",2),B("ngModelChange",function(o){return $(n.timespan,o)||(n.timespan=o),o}),h(),D(3,1),D(4,2),h(),p(5,"sh-menu",3)(6,"button",4),A(7,0),h(),Se(8,5),re(9,Jt,2,1,"button",6,Ne),ye(),h()),e&2&&(_(),oe("readonly",n.readonly()||void 0),_(),y("id",n.customId()),k("ngModel",n.timespan),y("disabled",n.readonly()),_(3),y("openIndicator",!0),_(2),Z(n.unitLabel()),ee(7),_(2),se(n.timeOptions()))},dependencies:[He,Q,K,U,he,X,q,ge],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{Pe as a,zt as b,ot as c,rt as d};
@@ -1 +1 @@
1
- import{Pc as f,Qc as w,S as d,Sc as x,Tc as h,_ as v,ha as y,i as m,ja as l,pa as b,ra as D}from"./chunk-TQTOIWBK.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(s,e){let o=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=s()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:o,manualCleanup:!0});return o.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(s,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(s=Object.is){return(e,o)=>e.kind===1&&o.kind===1&&s(e.value,o.value)}function U(s){return x(p(g({},s),{loader:void 0,stream:e=>{let o,n=()=>o?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=s.stream;if(r===void 0)throw new d(990,!1);return o=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
1
+ import{$ as v,Qc as f,Rc as w,T as d,Tc as x,Uc as h,i as m,ia as y,ka as l,qa as b,sa as D}from"./chunk-K5XGRFWJ.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(s,e){let o=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=s()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:o,manualCleanup:!0});return o.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(s,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(s=Object.is){return(e,o)=>e.kind===1&&o.kind===1&&s(e.value,o.value)}function U(s){return x(p(g({},s),{loader:void 0,stream:e=>{let o,n=()=>o?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=s.stream;if(r===void 0)throw new d(990,!1);return o=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
@@ -1 +1 @@
1
- import{V as i,Y as c,_ as a,ia as h}from"./chunk-TQTOIWBK.js";var d=null;function s(){return d}function w(o){d??=o}var l=class{},f=(()=>{class o{historyGo(t){throw new Error("")}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>a(g),providedIn:"platform"})}return o})(),y=new c(""),g=(()=>{class o extends f{_location;_history;_doc=a(h);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,e,n){this._history.pushState(t,e,n)}replaceState(t,e,n){this._history.replaceState(t,e,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>new o,providedIn:"platform"})}return o})();function D(o,r){r=encodeURIComponent(r);for(let t of o.split(";")){let e=t.indexOf("="),[n,u]=e==-1?[t,""]:[t.slice(0,e),t.slice(e+1)];if(n.trim()===r)return decodeURIComponent(u)}return null}var p=class{};export{s as a,w as b,l as c,f as d,y as e,g as f,D as g,p as h};
1
+ import{$ as a,W as i,Z as c,ja as h}from"./chunk-K5XGRFWJ.js";var d=null;function s(){return d}function w(o){d??=o}var l=class{},f=(()=>{class o{historyGo(t){throw new Error("")}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>a(g),providedIn:"platform"})}return o})(),y=new c(""),g=(()=>{class o extends f{_location;_history;_doc=a(h);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("popstate",t,!1),()=>e.removeEventListener("popstate",t)}onHashChange(t){let e=s().getGlobalEventTarget(this._doc,"window");return e.addEventListener("hashchange",t,!1),()=>e.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,e,n){this._history.pushState(t,e,n)}replaceState(t,e,n){this._history.replaceState(t,e,n)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(e){return new(e||o)};static \u0275prov=i({token:o,factory:()=>new o,providedIn:"platform"})}return o})();function D(o,r){r=encodeURIComponent(r);for(let t of o.split(";")){let e=t.indexOf("="),[n,u]=e==-1?[t,""]:[t.slice(0,e),t.slice(e+1)];if(n.trim()===r)return decodeURIComponent(u)}return null}var p=class{};export{s as a,w as b,l as c,f as d,y as e,g as f,D as g,p as h};
@@ -1 +1 @@
1
- import{b as q}from"./chunk-F3JYPWPK.js";import{a as j}from"./chunk-736PM4LG.js";import{a as Q}from"./chunk-TCXCC5BM.js";import{a as H}from"./chunk-YCJYEQF7.js";import{B as V,L as z,O as J,Y as X,v as U}from"./chunk-VKQQDCUN.js";import{ha as K}from"./chunk-ZC23RK4J.js";import{$b as r,Cb as d,Db as a,Eb as s,Fb as m,Fc as F,Gc as $,Hc as G,Jc as L,Mb as k,Qc as _,Sa as o,Tb as T,Ub as P,Vb as N,Wb as R,Wc as w,Xb as v,Zb as B,_ as C,da as x,ea as h,gb as b,ic as M,jc as D,kc as I,lb as O,nc as l,oc as y,pa as S,pc as g,ra as E,wb as p,xb as c,zc as A}from"./chunk-TQTOIWBK.js";function Y(t,n){if(t&1&&l(0),t&2){let e=r(3);g(" ",e.statusData().actionText," - ")}}function Z(t,n){t&1&&(a(0,"sh-icon"),l(1,"check"),s())}function ee(t,n){t&1&&(a(0,"sh-icon"),l(1,"copy"),s())}function te(t,n){if(t&1){let e=k();a(0,"div",9)(1,"button",10),B("click",function(u){x(e);let f=r(4);return h(f.copyToClipboard(u,f.tooltipText()))}),p(2,Z,2,0,"sh-icon")(3,ee,2,0,"sh-icon"),l(4," Copy "),s(),a(5,"p",11),l(6),s()()}if(t&2){let e=r(4);o(),d("color",e.copied()?"success":null),o(),c(e.copied()===!0?2:3),o(4),y(e.tooltipText())}}function ne(t,n){if(t&1&&(a(0,"div",8),l(1),s(),O(2,te,7,3,"ng-template",null,0,L)),t&2){let e=M(3),i=r(3);d("shTooltip",e),o(),g(" ",i.statusData().fileStatusText," ")}}function ie(t,n){if(t&1&&(a(0,"div"),p(1,Y,1,1),l(2),s(),p(3,ne,4,2),m(4,"sh-progress-bar",7)),t&2){let e,i=r(2);o(),c(i.backupId()===null?1:-1),o(),g(" ",i.statusData().statusText," "),o(),c((e=i.statusData())!=null&&e.BackendFileSize?3:-1),o(),d("value",i.statusData().progress*100)}}function oe(t,n){if(t&1&&(a(0,"div",5),T(1,1),m(2,"sh-icon"),F(3,"relativeTime"),F(4,"date"),P(),s()),t&2){let e,i=r(2);o(4),R((e=i.nextBackup().backup)==null||e.Backup==null?null:e.Backup.Name)($(3,3,i.nextBackup().time))(G(4,5,i.nextBackup().time,"shortTime")),v(1)}}function ae(t,n){t&1&&(a(0,"div",5),N(1,2),s())}function se(t,n){t&1&&(a(0,"div",6),T(1,3),m(2,"sh-spinner"),P(),s()),t&2&&(o(2),D("--spinner-size","12px")("--spinner-thickness","2px"))}function re(t,n){if(t&1&&(a(0,"div",4),p(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),s()),t&2){let e,i=r();o(),c(i.isActive()?1:!i.backupId()&&(i.nextBackup().backup||i.nextBackup().time)?2:!i.backupId()&&!((e=i.serverState())!=null&&e.ActiveTask)?3:i.backupId()?-1:4)}}var W=class t{backupId=w(null);#e=C(q);#t=C(j);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=_(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=_(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):!0});isVisible=_(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():!1:!0);nextBackup=_(()=>{let n=this.#t.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=_(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=S(!1);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(!0),this.copiedTimeout=setTimeout(()=>{this.copied.set(!1)},2e3)}tooltipTrigger=S(!0);tooltipTriggerEffect=E(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(!1))});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,i){e&2&&I("is-visible",i.isVisible())},inputs:{backupId:[1,"backupId"]},features:[A([H])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let i;return i=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,i,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,i){e&1&&p(0,re,5,1,"div",4),e&2&&c(i.isVisible()?0:-1)},dependencies:[U,V,J,z,X,Q,K],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{W as a};
1
+ import{b as q}from"./chunk-UIVZWXBK.js";import{a as j}from"./chunk-E4CYVUYG.js";import{a as Q}from"./chunk-BPHX6VXP.js";import{a as H}from"./chunk-COEGVUM3.js";import{B as V,L as z,O as J,Y as X,v as U}from"./chunk-CJKZ27FM.js";import{ha as K}from"./chunk-YF6JHIN5.js";import{$ as C,Ac as A,Db as d,Eb as a,Fb as s,Gb as m,Gc as F,Hc as $,Ic as G,Kc as L,Nb as k,Rc as _,Ta as o,Ub as T,Vb as P,Wb as N,Xb as R,Xc as w,Yb as v,_b as B,ac as r,ea as x,fa as h,hb as b,jc as M,kc as D,lc as I,mb as O,oc as l,pc as y,qa as S,qc as g,sa as E,xb as p,yb as c}from"./chunk-K5XGRFWJ.js";function Y(t,n){if(t&1&&l(0),t&2){let e=r(3);g(" ",e.statusData().actionText," - ")}}function Z(t,n){t&1&&(a(0,"sh-icon"),l(1,"check"),s())}function ee(t,n){t&1&&(a(0,"sh-icon"),l(1,"copy"),s())}function te(t,n){if(t&1){let e=k();a(0,"div",9)(1,"button",10),B("click",function(u){x(e);let f=r(4);return h(f.copyToClipboard(u,f.tooltipText()))}),p(2,Z,2,0,"sh-icon")(3,ee,2,0,"sh-icon"),l(4," Copy "),s(),a(5,"p",11),l(6),s()()}if(t&2){let e=r(4);o(),d("color",e.copied()?"success":null),o(),c(e.copied()===!0?2:3),o(4),y(e.tooltipText())}}function ne(t,n){if(t&1&&(a(0,"div",8),l(1),s(),O(2,te,7,3,"ng-template",null,0,L)),t&2){let e=M(3),i=r(3);d("shTooltip",e),o(),g(" ",i.statusData().fileStatusText," ")}}function ie(t,n){if(t&1&&(a(0,"div"),p(1,Y,1,1),l(2),s(),p(3,ne,4,2),m(4,"sh-progress-bar",7)),t&2){let e,i=r(2);o(),c(i.backupId()===null?1:-1),o(),g(" ",i.statusData().statusText," "),o(),c((e=i.statusData())!=null&&e.BackendFileSize?3:-1),o(),d("value",i.statusData().progress*100)}}function oe(t,n){if(t&1&&(a(0,"div",5),T(1,1),m(2,"sh-icon"),F(3,"relativeTime"),F(4,"date"),P(),s()),t&2){let e,i=r(2);o(4),R((e=i.nextBackup().backup)==null||e.Backup==null?null:e.Backup.Name)($(3,3,i.nextBackup().time))(G(4,5,i.nextBackup().time,"shortTime")),v(1)}}function ae(t,n){t&1&&(a(0,"div",5),N(1,2),s())}function se(t,n){t&1&&(a(0,"div",6),T(1,3),m(2,"sh-spinner"),P(),s()),t&2&&(o(2),D("--spinner-size","12px")("--spinner-thickness","2px"))}function re(t,n){if(t&1&&(a(0,"div",4),p(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),s()),t&2){let e,i=r();o(),c(i.isActive()?1:!i.backupId()&&(i.nextBackup().backup||i.nextBackup().time)?2:!i.backupId()&&!((e=i.serverState())!=null&&e.ActiveTask)?3:i.backupId()?-1:4)}}var W=class t{backupId=w(null);#e=C(q);#t=C(j);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=_(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=_(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):!0});isVisible=_(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():!1:!0);nextBackup=_(()=>{let n=this.#t.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=_(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=S(!1);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(!0),this.copiedTimeout=setTimeout(()=>{this.copied.set(!1)},2e3)}tooltipTrigger=S(!0);tooltipTriggerEffect=E(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(!1))});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,i){e&2&&I("is-visible",i.isVisible())},inputs:{backupId:[1,"backupId"]},features:[A([H])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let i;return i=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,i,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,i){e&1&&p(0,re,5,1,"div",4),e&2&&c(i.isVisible()?0:-1)},dependencies:[U,V,J,z,X,Q,K],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{W as a};
@@ -1 +1 @@
1
- import{B as V,H as x,X as J,c as A,e as b,f as B,j as G,p as $,q as P,r as v,t as L,v as k,x as w}from"./chunk-VKQQDCUN.js";import{d as X}from"./chunk-DSYNIXJF.js";import{d as I,e as y}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{Ac as M,Cb as _,Db as r,Eb as i,F as g,Fb as p,L as T,Sa as F,Tb as E,Ub as C,Vb as d,Yb as O,Zb as m,_ as u,gb as R,kc as h,nc as N,pa as c,wb as S,xb as D}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),d(2,2),i(),p(3,"input",12),i())}var a=new v,f=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),d(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loading",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,G,A,b,B,P,$,y,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{f as default};
1
+ import{B as V,H as x,X as J,c as A,e as b,f as B,j as G,p as $,q as P,r as v,t as L,v as k,x as w}from"./chunk-CJKZ27FM.js";import{d as X}from"./chunk-KNSQLQC6.js";import{d as I,e as y}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as u,Bc as M,Db as _,Eb as r,Fb as i,G as g,Gb as p,M as T,Ta as F,Ub as E,Vb as C,Wb as d,Zb as O,_b as m,hb as R,lc as h,oc as N,qa as c,xb as S,yb as D}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),d(2,2),i(),p(3,"input",12),i())}var a=new v,f=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),d(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loading",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,G,A,b,B,P,$,y,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{f as default};
@@ -1,2 +1,2 @@
1
- import{a as V}from"./chunk-RGFJ5UMA.js";import{B as k,J as F,T as A,v as D}from"./chunk-VKQQDCUN.js";import{ha as $}from"./chunk-ZC23RK4J.js";import{$b as _,Ab as L,Bb as f,Cb as x,Db as o,Eb as i,Fb as P,Fc as w,Hc as R,Mb as N,Sa as l,Vb as p,Wc as b,Zb as y,_ as O,da as I,ea as M,gb as T,jc as G,kc as E,nc as r,oc as m,pa as h,pc as c,ra as C,wb as d,xb as s,yb as S}from"./chunk-TQTOIWBK.js";var B=(t,n)=>n.ID;function J(t,n){t&1&&(o(0,"div",4),p(1,0),i())}function U(t,n){if(t&1&&(o(0,"li"),r(1),i()),t&2){let e=n.$implicit;l(),m(e)}}function X(t,n){if(t&1&&(o(0,"strong"),r(1,"# Exception"),i(),o(2,"ol",15),L(3,U,2,1,"li",null,S),i()),t&2){let e=_(3).$implicit,a=_(2);l(3),f(a.breakIntoLines(e.Exception))}}function j(t,n){if(t&1&&(o(0,"li"),r(1),i()),t&2){let e=n.$implicit;l(),m(e)}}function z(t,n){if(t&1&&(o(0,"strong"),r(1,"# Message"),i(),o(2,"ol",15),L(3,j,2,1,"li",null,S),i()),t&2){let e=_(3).$implicit,a=_(2);l(3),f(a.breakIntoLines(e.Message))}}function W(t,n){if(t&1&&(o(0,"code"),d(1,X,5,0),d(2,z,5,0),i()),t&2){let e=_(2).$implicit;l(),s(e.Exception?1:-1),l(),s(e.Message?2:-1)}}function H(t,n){if(t&1&&(o(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),r(4),i(),o(5,"div",14),r(6),i(),o(7,"div",14),r(8),i(),o(9,"div",14),r(10),i(),o(11,"div",14),r(12),i()(),d(13,W,3,2,"code"),i()()),t&2){let e=_().$implicit;l(4),c("ID: ",e.ID),l(2),c("Type: ",e.Type),l(2),c("Tag: ",e.Tag),l(2),c("TaskID: ",e.TaskID),l(2),c("MessageID: ",e.MessageID),l(),s(e.Exception||e.Message?13:-1)}}function q(t,n){if(t&1){let e=N();o(0,"tr",10),y("click",function(){let u=I(e).$implicit,g=_(2);return M(g.toggleRow(u.ID))}),o(1,"td"),r(2),w(3,"date"),i(),o(4,"td"),r(5),i(),o(6,"td",8)(7,"button",11)(8,"sh-icon"),r(9,"caret-down"),i()()()(),d(10,H,14,6,"tr")}if(t&2){let e=n.$implicit,a=_(2);l(2),m(R(3,5,e.When,"medium")),l(3),m(a.subStringMessage(e.Message)),l(2),E("rotated-icon",e.ID===a.openRowId()),l(3),s(e.ID===a.openRowId()?10:-1)}}function K(t,n){if(t&1&&(o(0,"sh-table",6)(1,"tr",7)(2,"th"),p(3,1),i(),o(4,"th"),p(5,2),i(),P(6,"th",8),i(),L(7,q,11,8,null,null,B),o(9,"div",9),p(10,3),i()()),t&2){let e=_();G("grid-template-columns","auto 1fr auto"),E("type-b",!0),x("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var v=class t{#e=O(V);whenFilter=b();backupIdFilter=b();polling=b();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=C(()=>{let n=this.polling()??!1;this.#e.isPolling.set(n)});openRowId=h(null);whenEffect=C(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled")});backupIdEffect=C(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled")});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n)}breakIntoLines(n){return n?n.split(`
1
+ import{a as V}from"./chunk-O2HQIEE4.js";import{B as k,J as F,T as A,v as D}from"./chunk-CJKZ27FM.js";import{ha as $}from"./chunk-YF6JHIN5.js";import{$ as O,Bb as L,Cb as f,Db as x,Eb as o,Fb as i,Gb as P,Gc as w,Ic as R,Nb as N,Ta as l,Wb as p,Xc as b,_b as y,ac as _,ea as I,fa as M,hb as T,kc as G,lc as E,oc as r,pc as m,qa as h,qc as c,sa as C,xb as d,yb as s,zb as S}from"./chunk-K5XGRFWJ.js";var B=(t,n)=>n.ID;function J(t,n){t&1&&(o(0,"div",4),p(1,0),i())}function U(t,n){if(t&1&&(o(0,"li"),r(1),i()),t&2){let e=n.$implicit;l(),m(e)}}function X(t,n){if(t&1&&(o(0,"strong"),r(1,"# Exception"),i(),o(2,"ol",15),L(3,U,2,1,"li",null,S),i()),t&2){let e=_(3).$implicit,a=_(2);l(3),f(a.breakIntoLines(e.Exception))}}function j(t,n){if(t&1&&(o(0,"li"),r(1),i()),t&2){let e=n.$implicit;l(),m(e)}}function z(t,n){if(t&1&&(o(0,"strong"),r(1,"# Message"),i(),o(2,"ol",15),L(3,j,2,1,"li",null,S),i()),t&2){let e=_(3).$implicit,a=_(2);l(3),f(a.breakIntoLines(e.Message))}}function W(t,n){if(t&1&&(o(0,"code"),d(1,X,5,0),d(2,z,5,0),i()),t&2){let e=_(2).$implicit;l(),s(e.Exception?1:-1),l(),s(e.Message?2:-1)}}function H(t,n){if(t&1&&(o(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),r(4),i(),o(5,"div",14),r(6),i(),o(7,"div",14),r(8),i(),o(9,"div",14),r(10),i(),o(11,"div",14),r(12),i()(),d(13,W,3,2,"code"),i()()),t&2){let e=_().$implicit;l(4),c("ID: ",e.ID),l(2),c("Type: ",e.Type),l(2),c("Tag: ",e.Tag),l(2),c("TaskID: ",e.TaskID),l(2),c("MessageID: ",e.MessageID),l(),s(e.Exception||e.Message?13:-1)}}function q(t,n){if(t&1){let e=N();o(0,"tr",10),y("click",function(){let u=I(e).$implicit,g=_(2);return M(g.toggleRow(u.ID))}),o(1,"td"),r(2),w(3,"date"),i(),o(4,"td"),r(5),i(),o(6,"td",8)(7,"button",11)(8,"sh-icon"),r(9,"caret-down"),i()()()(),d(10,H,14,6,"tr")}if(t&2){let e=n.$implicit,a=_(2);l(2),m(R(3,5,e.When,"medium")),l(3),m(a.subStringMessage(e.Message)),l(2),E("rotated-icon",e.ID===a.openRowId()),l(3),s(e.ID===a.openRowId()?10:-1)}}function K(t,n){if(t&1&&(o(0,"sh-table",6)(1,"tr",7)(2,"th"),p(3,1),i(),o(4,"th"),p(5,2),i(),P(6,"th",8),i(),L(7,q,11,8,null,null,B),o(9,"div",9),p(10,3),i()()),t&2){let e=_();G("grid-template-columns","auto 1fr auto"),E("type-b",!0),x("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var v=class t{#e=O(V);whenFilter=b();backupIdFilter=b();polling=b();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=C(()=>{let n=this.polling()??!1;this.#e.isPolling.set(n)});openRowId=h(null);whenEffect=C(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled")});backupIdEffect=C(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled")});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n)}breakIntoLines(n){return n?n.split(`
2
2
  `):[]}subStringMessage(n){return n?n.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=T({type:t,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&E("is-disabled",a.logLevel()==="Disabled")},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let n;n=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let u;return u=$localize`No data available`,[n,e,a,u,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["thead",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&d(0,J,2,0,"div",4)(1,K,11,6,"sh-table",5),e&2&&s(a.logLevel()==="Disabled"?0:1)},dependencies:[A,D,F,k,$],styles:["[_nghost-%COMP%]{display:block}.is-disabled[_nghost-%COMP%]{padding:0 2rem}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column;background:var(--base-2)}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1.5rem;border-radius:var(--shape-2);overflow:auto;white-space:pre;max-width:100%;width:100%}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0}code[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-block;margin-bottom:.25rem}code[_ngcontent-%COMP%] ol.line-numbers-ol[_ngcontent-%COMP%] + strong[_ngcontent-%COMP%]{margin-top:1.25rem}"],changeDetection:0})};export{v as a};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-LE24LKH7.js";import{a as te}from"./chunk-IMQUTGIK.js";import{e as ee}from"./chunk-6JS7B4FW.js";import{B as Q,L as Y,w as K,x as W,z as q}from"./chunk-VKQQDCUN.js";import{a as H,d as Z}from"./chunk-DSYNIXJF.js";import{b as U,d as j}from"./chunk-NPFPMA4P.js";import{$b as s,Ab as R,Bb as v,Cb as O,Db as a,Eb as l,Fb as S,Jb as k,Kb as D,Mb as f,Pa as M,Qc as h,Sa as r,Tb as G,Ub as z,Vb as _,Wc as A,Zb as p,_ as d,da as I,ea as u,gb as E,mc as V,nc as P,oc as y,pa as w,pc as J,vc as X,wb as N,wc as B,xb as T,xc as g}from"./chunk-TQTOIWBK.js";function ae(i,t){if(i&1&&(a(0,"div",11),P(1),l()),i&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function re(i,t){if(i&1&&(a(0,"div"),G(1,1),S(2,"a",15),z(),l()),i&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function le(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doRepair(c.BackupID))}),_(1,2),l()}}function ce(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doDownloadBugreport(c))}),_(1,3),l()}}function _e(i,t){if(i&1&&S(0,"sh-progress-bar",17),i&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function se(i,t){if(i&1){let e=f();a(0,"div",11),k(1),_(2,4),D(),a(3,"a",16),P(4),l(),N(5,_e,1,1,"sh-progress-bar",17),a(6,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowUpdate())}),_(7,5),l()()}if(i&2){let e,o,n=s(),c=g(0);r(3),O("href",(e=n.serverState())==null?null:e.UpdateDownloadLink,M),r(),y(c.Message),r(),T(((o=n.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function de(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doShowLog(c.BackupID))}),_(1,6),l()}}function Ne(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function Te(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ce={Error:"error",Warning:"warn",Information:"primary"},x=class i{#e=d(j);#a=d(U);#r=d(q);#t=d(W);#i=d(F);#n=d(Z);#l=d(ee);#o=w(null);serverState=this.#i.serverState;index=A.required();notification=A.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(te,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let n=H.BASE||"",c=this.#l.xsrfQueryParam(),m=`${location.origin}${n}/api/v1/bugreport/${e}?token=${o.Token}${c?`&${c}`:""}`;t.DownloadLink=m,this.#o.set(m),this.triggerDownload(m)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let n;n=$localize`Download`;let c;c=$localize`New update found:`;let m;m=$localize`Show Update`;let b;b=$localize`Show Log`;let L;L=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,n,c,m,b,L,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1&&(X(0),a(1,"sh-alert")(2,"div",9),P(3),l(),a(4,"div",10),N(5,ae,2,1,"div",11),N(6,re,3,1,"div"),a(7,"div",12),N(8,le,2,0,"button",13),N(9,ce,2,0,"button",13),N(10,se,8,3,"div",11),N(11,de,2,0,"button",13),N(12,Ne,2,0,"button",13),N(13,Te,2,0,"button",13),a(14,"button",14),p("click",function(){return o.deleteNotificationByIndex()}),_(15,0),l()()()()),e&2){let n=B(o.notification());r(),V(o.getAlertType(n.Type)),r(2),y(n.Title),r(2),T(n.Action!=="update:new"&&n.Action!=="update:manual"?5:-1),r(),T(o.downloadLink()?6:-1),r(2),T(n.Message!=null&&n.Message.includes("please run repair")?8:-1),r(),T(n.Action!=null&&n.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),T(n.Action==="update:new"?10:-1),r(),T(n.Action==="backup:show-log"?11:-1),r(),T(n.Action==="config:issue:unencrypted-database"?12:-1),r(),T(n.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,Q,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"],changeDetection:0})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&S(0,"app-notification",1),i&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function ue(i,t){i&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ie=class i{#e=d(F);notificationFilterPredicate=A();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&R(0,Ie,1,2,"app-notification",1,pe,!1,ue,3,0,"div",2),e&2&&v(o.notifications())},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{x as a,ie as b};
1
+ import{a as F}from"./chunk-NE255HQN.js";import{a as te}from"./chunk-PEOYNJJM.js";import{e as ee}from"./chunk-PDZNQW6F.js";import{B as Q,L as Y,w as K,x as W,z as q}from"./chunk-CJKZ27FM.js";import{a as H,d as Z}from"./chunk-KNSQLQC6.js";import{b as U,d as j}from"./chunk-CQJRBQ6I.js";import{$ as d,Bb as R,Cb as v,Db as O,Eb as a,Fb as l,Gb as S,Kb as k,Lb as D,Nb as f,Qa as M,Rc as h,Ta as r,Ub as G,Vb as z,Wb as _,Xc as A,_b as p,ac as s,ea as I,fa as u,hb as E,nc as V,oc as P,pc as y,qa as w,qc as J,wc as X,xb as N,xc as B,yb as T,yc as g}from"./chunk-K5XGRFWJ.js";function ae(i,t){if(i&1&&(a(0,"div",11),P(1),l()),i&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function re(i,t){if(i&1&&(a(0,"div"),G(1,1),S(2,"a",15),z(),l()),i&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function le(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doRepair(c.BackupID))}),_(1,2),l()}}function ce(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doDownloadBugreport(c))}),_(1,3),l()}}function _e(i,t){if(i&1&&S(0,"sh-progress-bar",17),i&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function se(i,t){if(i&1){let e=f();a(0,"div",11),k(1),_(2,4),D(),a(3,"a",16),P(4),l(),N(5,_e,1,1,"sh-progress-bar",17),a(6,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowUpdate())}),_(7,5),l()()}if(i&2){let e,o,n=s(),c=g(0);r(3),O("href",(e=n.serverState())==null?null:e.UpdateDownloadLink,M),r(),y(c.Message),r(),T(((o=n.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function de(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doShowLog(c.BackupID))}),_(1,6),l()}}function Ne(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function Te(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ce={Error:"error",Warning:"warn",Information:"primary"},x=class i{#e=d(j);#a=d(U);#r=d(q);#t=d(W);#i=d(F);#n=d(Z);#l=d(ee);#o=w(null);serverState=this.#i.serverState;index=A.required();notification=A.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(te,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let n=H.BASE||"",c=this.#l.xsrfQueryParam(),m=`${location.origin}${n}/api/v1/bugreport/${e}?token=${o.Token}${c?`&${c}`:""}`;t.DownloadLink=m,this.#o.set(m),this.triggerDownload(m)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let n;n=$localize`Download`;let c;c=$localize`New update found:`;let m;m=$localize`Show Update`;let b;b=$localize`Show Log`;let L;L=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,n,c,m,b,L,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1&&(X(0),a(1,"sh-alert")(2,"div",9),P(3),l(),a(4,"div",10),N(5,ae,2,1,"div",11),N(6,re,3,1,"div"),a(7,"div",12),N(8,le,2,0,"button",13),N(9,ce,2,0,"button",13),N(10,se,8,3,"div",11),N(11,de,2,0,"button",13),N(12,Ne,2,0,"button",13),N(13,Te,2,0,"button",13),a(14,"button",14),p("click",function(){return o.deleteNotificationByIndex()}),_(15,0),l()()()()),e&2){let n=B(o.notification());r(),V(o.getAlertType(n.Type)),r(2),y(n.Title),r(2),T(n.Action!=="update:new"&&n.Action!=="update:manual"?5:-1),r(),T(o.downloadLink()?6:-1),r(2),T(n.Message!=null&&n.Message.includes("please run repair")?8:-1),r(),T(n.Action!=null&&n.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),T(n.Action==="update:new"?10:-1),r(),T(n.Action==="backup:show-log"?11:-1),r(),T(n.Action==="config:issue:unencrypted-database"?12:-1),r(),T(n.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,Q,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"],changeDetection:0})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&S(0,"app-notification",1),i&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function ue(i,t){i&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ie=class i{#e=d(F);notificationFilterPredicate=A();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&R(0,Ie,1,2,"app-notification",1,pe,!1,ue,3,0,"div",2),e&2&&v(o.notifications())},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{x as a,ie as b};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{q as S}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import"./chunk-2EX5HS5X.js";import"./chunk-EVEI25GQ.js";import"./chunk-UIVZWXBK.js";import{a as D}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import{b as g}from"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{L as R,R as L}from"./chunk-CJKZ27FM.js";import{d as I}from"./chunk-KNSQLQC6.js";import{b as A,c as M,e as O,f as y}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as _,Ac as B,Db as p,Dc as u,E as k,Eb as r,Fb as s,Gb as m,Ta as o,Wb as c,ac as N,hb as T,oc as E,qc as b,sa as h,xb as C,yb as f}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(r(0,"p"),E(1),s()),i&2){let t=N();o(),b("Editing: ",t.backupName())}}function J(i,e){i&1&&m(0,"sh-progress-bar",7)}function X(i,e){i&1&&(r(0,"section"),m(1,"router-outlet"),s())}var P=class i{#t=_(A);#e=_(S);#i=_(D);#n=_(I);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=g(this.#t.params);#o=g(this.#t.url);paramsChanged=h(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults())});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(k(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data)}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=T({type:i,selectors:[["app-backup"]],features:[B([S])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(m(0,"app-status-bar"),r(1,"header"),C(2,w,2,1,"p"),r(3,"sh-stepper",5)(4,"div",6),c(5,0),s(),r(6,"div",6),c(7,1),s(),r(8,"div",6),c(9,2),s(),r(10,"div",6),c(11,3),s(),r(12,"div",6),c(13,4),s()()(),C(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(o(2),f(n.isNew()?-1:2),o(2),p("routerLink",u(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),p("routerLink",u(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),o(2),f(n.finishedLoading()?15:14))},dependencies:[M,O,y,v,L,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{P as default};
@@ -1,2 +1,2 @@
1
- import{B as U,T as z,v as w}from"./chunk-VKQQDCUN.js";import{d as J}from"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import{ha as k}from"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Ab as T,Bb as E,Cb as C,Db as i,Eb as a,F as R,Fb as h,Fc as y,Hc as A,Mb as $,Sa as s,Tb as B,Ub as v,Vb as r,Zb as f,_ as P,da as D,ea as F,gb as b,jc as L,kc as x,nc as d,oc as g,pa as l,ra as G,wb as S,xb as u,yb as O}from"./chunk-TQTOIWBK.js";import{a as N,b as I}from"./chunk-7CGTOI24.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;s(),g(t)}}function j(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),T(4,X,2,1,"li",null,O),a()()()()),o&2){let t=c().$implicit,n=c();s(),L("grid-column","1 / -1")("height","auto"),s(3),E(n.breakIntoLines(t.Exception))}}function K(o,e){if(o&1){let t=$();i(0,"tr",9),f("click",function(){let _=D(t).$index,m=c();return F(m.toggleRow(_))}),i(1,"td"),d(2),y(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),S(12,j,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,_=c();s(2),g(t.Timestamp?A(3,6,t.Timestamp*1e3,"medium"):"-"),s(3),g(t.BackupID>=0?t.BackupID:"-"),s(2),g(t.Message),s(2),x("rotated-icon",n===_.openRowIndex()),s(3),u(n===_.openRowIndex()?12:-1)}}function V(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],M=class o{#e=P(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=G(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(R(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
1
+ import{B as U,T as z,v as w}from"./chunk-CJKZ27FM.js";import{d as J}from"./chunk-KNSQLQC6.js";import"./chunk-HDDAGHHE.js";import{ha as k}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as P,Bb as T,Cb as E,Db as C,Eb as i,Fb as a,G as R,Gb as h,Gc as y,Ic as A,Nb as $,Ta as s,Ub as B,Vb as v,Wb as r,_b as f,ac as c,ea as D,fa as F,hb as b,kc as L,lc as x,oc as d,pc as g,qa as l,sa as G,xb as S,yb as u,zb as O}from"./chunk-K5XGRFWJ.js";import{a as N,b as I}from"./chunk-7CGTOI24.js";function X(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;s(),g(t)}}function j(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),T(4,X,2,1,"li",null,O),a()()()()),o&2){let t=c().$implicit,n=c();s(),L("grid-column","1 / -1")("height","auto"),s(3),E(n.breakIntoLines(t.Exception))}}function K(o,e){if(o&1){let t=$();i(0,"tr",9),f("click",function(){let _=D(t).$index,m=c();return F(m.toggleRow(_))}),i(1,"td"),d(2),y(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"sh-icon"),d(11,"caret-down"),a()()()(),S(12,j,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,_=c();s(2),g(t.Timestamp?A(3,6,t.Timestamp*1e3,"medium"):"-"),s(3),g(t.BackupID>=0?t.BackupID:"-"),s(2),g(t.Message),s(2),x("rotated-icon",n===_.openRowIndex()),s(3),u(n===_.openRowIndex()?12:-1)}}function V(o,e){o&1&&r(0,4,1)}function q(o,e){o&1&&r(0,4,2)}var H=["BackupID","Timestamp","Message","actions"],M=class o{#e=P(J);displayedColumns=l(H);openRowIndex=l(null);noMoreItems=l(!1);logsIsLoading=l(!1);logs=l([]);pagination=l({offsetTime:void 0,pagesize:10});paginationEffect=G(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(R(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
2
  `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>I(N({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=b({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;_=$localize`No data available`;let m;return m=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,_,m,[1,"type-b",3,"data","loading"],["thead",""],["table-no-rows",""],["shButton","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["shButton","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1&&(i(0,"sh-table",5)(1,"tr",6)(2,"th"),r(3,0),a(),i(4,"th"),r(5,1),a(),i(6,"th"),r(7,2),a(),h(8,"th"),a(),T(9,K,13,9,null,null,O),i(11,"div",7),r(12,3),a()(),i(13,"footer")(14,"button",8),f("click",function(){return n.loadMore()}),B(15,4),S(16,V,1,0)(17,q,1,0),v(),a()()),t&2){let _=n.logs();L("grid-template-columns","1fr 1fr 1fr auto"),C("data",_)("loading",n.logsIsLoading()),s(9),E(_),s(5),C("disabled",n.logsIsLoading()||n.noMoreItems()),s(2),u(n.noMoreItems()?16:17)}},dependencies:[z,w,U,k],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{M as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-35FMFK4I.js";import"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{a as BackupProgressComponent};
@@ -0,0 +1,3 @@
1
+ import{a as Ce}from"./chunk-VZNLMGYP.js";import{a as pe}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{l as ge,q as b}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import"./chunk-2EX5HS5X.js";import"./chunk-EVEI25GQ.js";import{b as _e}from"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import{a as de}from"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import{b as A}from"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import{a as ue}from"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as oe,G as ie,H as ae,L as se,P as re,Y as le,c as H,e as z,f as W,j,p as Q,q as Y,r as Z,s as ee,t as te,v as ne}from"./chunk-CJKZ27FM.js";import{b as ce,d as me}from"./chunk-KNSQLQC6.js";import{b as K,d as J,e as X}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as u,Ac as w,Bc as V,Db as C,Eb as m,Fb as a,Gb as r,Nb as G,Rc as q,Ta as d,Ub as _,Vb as p,W as L,Wb as B,Xb as U,Yb as x,_b as I,ac as F,ea as h,fa as S,hb as R,lc as v,qa as E,sa as $,tc as M,uc as D,vc as O,xb as y,yb as k}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var f=class c{#e=new Map;saveState(t){let e=de();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||c)};static \u0275prov=L({token:c,factory:c.\u0275fac,providedIn:"root"})};var he=()=>["backup"];function Se(c,t){c&1&&r(0,"sh-progress-bar",10)}function Te(c,t){if(c&1){let e=G();m(0,"form",11)(1,"sh-select",12)(2,"label",13),_(3,1),r(4,"sh-icon",14),p(),a(),r(5,"input",15),a(),m(6,"sh-form-field")(7,"label",16),_(8,2),r(9,"sh-icon",17),p(),a(),r(10,"textarea",18),a(),m(11,"sh-form-field")(12,"label",19),_(13,3),r(14,"sh-icon",20),p(),a(),r(15,"textarea",21),a()(),m(16,"sh-divider"),B(17,4),a(),m(18,"form",11)(19,"sh-form-field")(20,"label",22),_(21,5),r(22,"sh-icon",23),p(),a(),r(23,"input",24),a(),m(24,"sh-form-field")(25,"label",25),_(26,6),r(27,"sh-icon",26),p(),a(),r(28,"input",27),a(),m(29,"app-filters",28),O("filtersChange",function(i){h(e);let s=F();return D(s.filters,i)||(s.filters=i),S(i)}),I("filtersChange",function(i){h(e);let s=F();return S(s.updateFilters(i))}),a()(),m(30,"app-options-list",29),O("optionsChange",function(i){h(e);let s=F();return D(s.settings,i)||(s.settings=i),S(i)}),a(),m(31,"div",30)(32,"button",31),I("click",function(){h(e);let i=F();return S(i.submit())}),_(33,7),r(34,"sh-icon"),p(),a()()}if(c&2){let e=F();C("formGroup",e.baseCmdForm),d(),C("options",e.commandOptions()??V(11,he))("inlineSearch",!0),d(17),C("formGroup",e.standardFields),d(11),M("filters",e.filters),C("osType",e.osType()??""),d(),M("options",e.settings),C("hasFreeTextSettings",!0),d(2),v("loading",e.isSubmitting()),d(2),U(e.baseCmdForm.value.command),x(33)}}var l=new Z,P=class c{#e=u(b);#n=u(me);#o=u(J);#t=u(K);#a=u(ce);#s=u(_e);#i=u(f);#r=u(ue);osType=q(()=>this.#r.systemInfo()?.OSType);#l=A(this.#t.params);commandOptions=A(this.#a.getApiV1Commandline());isSubmitting=E(!1);optionsFields=this.#e.optionsFields;standardFields=l.group({"backup-id":l.control(""),"backup-name":l.control(""),dbpath:l.control(""),filters:l.array([])});baseCmdForm=l.group({command:l.control("backup"),targetUrl:l.control(""),arguments:l.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;filters=E([]);settings=this.#e.settings;updateFilters(t){this.standardFields.controls.filters.clear(),t.forEach(e=>this.standardFields.controls.filters.push(l.control(e))),this.filters.set(t)}#m=$(()=>{let t=this.#l()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){if(this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),this.standardFields.controls.filters.clear(),t.Filters&&t.Filters.length){let e=t.Filters.map(n=>`${n.Include?"":"-"}${n.Expression}`);e.forEach(n=>{this.standardFields.controls.filters.push(l.control(n))}),this.filters.set(e)}else this.filters.set([])}submit(){this.#s.resumeDialogCheck(()=>this.#c())}#c(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",i=(e.arguments??"").split(`
2
+ `)??[],s=[n,...i].filter(o=>o.length>0),g=this.standardFields.value,T=g.filters??[],N=[e.command,...s,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...T.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:N}).subscribe({next:o=>{o.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",o.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
+ `)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],i=this.settings(),s=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:i});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:s},replaceUrl:!0}),s}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(i=>{this.standardFields.controls.filters.push(l.control(i))}),this.filters.set(n.filters)),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=R({type:c,selectors:[["app-commandline"]],features:[w([b])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Command ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let N;return N=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,i,s,g,T,N,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"filtersChange","filters","osType"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(r(0,"app-status-bar"),m(1,"section")(2,"div",8)(3,"button",9),_(4,0),r(5,"sh-icon"),p(),a()(),y(6,Se,1,0,"sh-progress-bar",10)(7,Te,35,12),a()),e&2&&(d(6),k(n.finishedLoading()?7:6))},dependencies:[ee,j,H,z,W,pe,Ce,ge,te,Y,Q,X,ae,oe,ie,re,se,ne,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
@@ -0,0 +1,2 @@
1
+ import{a as vt}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import{a as bt}from"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{a as wt}from"./chunk-GA3CAVSK.js";import"./chunk-UIVZWXBK.js";import"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import{b as ee}from"./chunk-KZYRTI62.js";import{a as x}from"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import{a as ae}from"./chunk-PEOYNJJM.js";import{a as Lt}from"./chunk-NUV5LHQV.js";import{a as mt,c as ft}from"./chunk-PDZNQW6F.js";import{B as D,E as Pt,G as ht,H as Z,L as Ot,M as Rt,N as Gt,P as yt,W as Ft,Y as $t,c as W,e as q,i as j,m as It,s as K,t as Q,v as w,w as Y,z as Mt}from"./chunk-CJKZ27FM.js";import{d as At}from"./chunk-KNSQLQC6.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as O,Bc as J,Db as C,Eb as s,Fb as i,G,Gb as m,Nb as I,Qa as ct,Rc as b,Ta as l,Ub as P,Vb as h,Wb as _,Xb as U,Yb as V,Yc as Nt,Zb as B,_b as d,a as rt,ac as S,b as Tt,c as St,ea as u,fa as p,hb as v,hc as Et,ic as ut,lc as F,mb as oe,nb as dt,oc as y,pc as H,qa as c,qc as se,sa as k,tc as $,ub as Ct,uc as A,vb as gt,vc as L,xb as g,yb as E,zc as pt}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var Xt=["formRef"],zt=()=>[import("./chunk-LXTSZI4K.js").then(n=>n.OptionsListComponent)];function Ut(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),i())}function Vt(n,t){if(n&1){let e=I();s(0,"app-options-list",5),L("optionsChange",function(a){u(e);let T=S();return A(T.settings,a)||(T.settings=a),p(a)}),i()}if(n&2){let e=S();$("options",e.settings),C("hasFreeTextSettings",!0)}}var X=class n{#e=O(x);#n=O(At);formRef=Nt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{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(([o,a],T)=>{if(o.startsWith("--")){let f=o.substring(2);this.settings.update(N=>(N.some(M=>M.Name===f||M.Name===o)||N.push({Name:o,Value:a}),N))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),o=t.map(N=>N.Name?.startsWith("--")?N.Name:`--${N.Name}`),T=Object.keys(e).filter(N=>N.startsWith("--")).filter(N=>!o.includes(N)),f=t.reduce((N,M)=>{let R=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return N[R]=M.Value,N},{});T.forEach(N=>{f[N]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(G(()=>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||n)};static \u0275cmp=v({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,o){e&1&&Et(o.formRef,Xt,5),e&2&&ut()},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,o){e&1&&(s(0,"div",2),g(1,Ut,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return o.submit()}),P(3,0),m(4,"sh-icon"),h(),i()(),dt(5,Vt,1,2),Ct(6,5,zt)),e&2&&(l(),E(o.saved()?1:-1),l(),F("loading",o.isSubmitting()),l(4),gt(!o.isLoadingOptions()))},dependencies:[Q,D,w,Y],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 Ht(n,t){if(n&1){let e=I();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){u(e);let T=S(2);return A(T.registerUrl,a)||(T.registerUrl=a),p(a)}),i()(),s(2,"button",14),d("click",function(){u(e);let a=S(2);return p(a.register())}),_(3,0),i()}if(n&2){let e=S(2);l(),$("ngModel",e.registerUrl)}}function Wt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),i(),s(3,"a",15),y(4),i()()),n&2){let e=S(2);l(3),C("href",pt(e.claimUrl()),ct),l(),H(e.claimUrl())}}function qt(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),i()())}function jt(n,t){if(n&1){let e=I();s(0,"button",14),d("click",function(){u(e);let a=S(2);return p(a.cancel())}),_(1,3),i()}}function Kt(n,t){if(n&1){let e=I();s(0,"button",14),d("click",function(){u(e);let a=S(2);return p(a.disable())}),_(1,4),i()}}function Qt(n,t){if(n&1){let e=I();s(0,"button",14),d("click",function(){u(e);let a=S(2);return p(a.enable())}),_(1,5),i(),s(2,"button",16),d("click",function(){u(e);let a=S(2);return p(a.delete())}),_(3,6),i()}}function Yt(n,t){n&1&&(P(0,7,1),m(1,"sh-icon"),h())}function Zt(n,t){n&1&&(P(0,7,2),m(1,"sh-icon"),h())}function en(n,t){if(n&1){let e=I();s(0,"sh-chip",17),d("click",function(){u(e);let a=S(2);return p(a.copyReportingUrl())}),P(1,7),g(2,Yt,2,0,"sh-icon")(3,Zt,2,0,"sh-icon"),h(),i()}if(n&2){let e=S(2);l(2),E(e.copiedReportingUrl()===!0?2:3)}}function tn(n,t){if(n&1&&(s(0,"div",8),g(1,Ht,4,1),g(2,Wt,5,3,"div",9),g(3,qt,3,0,"div",9),g(4,jt,2,0,"button",10),g(5,Kt,2,0,"button",10),g(6,Qt,4,0),g(7,en,4,1,"sh-chip",11),i()),n&2){let e=S();l(),E(e.state()==="inactive"?1:-1),l(),E(e.state()==="registered"?2:-1),l(),E(e.state()==="registering"?3:-1),l(),E(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),E(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),E(e.state()==="disabled"?6:-1),l(),E(e.additionalReportingUrl()!==""&&e.state()!=="registered"?7:-1)}}var te=class n{#e=O(ee);#n=O(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=b(()=>{let t=this.#n.serverSettings();return t&&t["additional-report-url"]||""});copiedReportingUrl=c(!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||n)};static \u0275cmp=v({type:n,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 o;o=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let N;N=$localize` Delete console connection setup `;let M;return M=$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:`,M=B(M),[t,e,o,a,T,f,N,M,[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,o){e&1&&g(0,tn,8,7,"div",8),e&2&&E(o.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,Pt,w],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 kt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function nn(n,t){if(n&1&&(s(0,"label"),P(1,35),m(2,"sh-icon",89),h(),i()),n&2){let e=S(3);l(2),C("shTooltip",e.remoteControlTooltip())}}function on(n,t){if(n&1&&(s(0,"label"),P(1,36),m(2,"sh-icon",89),h(),i()),n&2){let e=S(3);l(2),C("shTooltip",e.remoteControlTooltip())}}function sn(n,t){if(n&1&&(s(0,"label"),P(1,37),m(2,"sh-icon",89),h(),i()),n&2){let e=S(3);l(2),C("shTooltip",e.connectionStatusIndicatorTooltip())}}function an(n,t){if(n&1&&(s(0,"label"),P(1,38),m(2,"sh-icon",89),h(),i()),n&2){let e=S(3);l(2),C("shTooltip",e.connectionStatusIndicatorTooltip())}}function ln(n,t){if(n&1){let e=I();s(0,"section")(1,"div",65)(2,"h3"),_(3,33),i(),s(4,"p"),_(5,34),i()(),s(6,"div",88)(7,"sh-toggle",77),d("checkedChange",function(a){u(e);let T=S(2);return p(T.toggleConsoleControl(a))}),g(8,nn,3,1,"label")(9,on,3,1,"label"),i(),s(10,"sh-toggle",77),d("checkedChange",function(a){u(e);let T=S(2);return p(T.saveHideConsoleConnectionStatus(a))}),g(11,sn,3,1,"label")(12,an,3,1,"label"),i()()()}if(n&2){let e=S(2);l(7),C("checked",!e.consoleControlDisabled()),l(),E(e.consoleControlDisabled()?8:9),l(2),C("checked",!e.hideConsoleConnectionStatus()),l(),E(e.hideConsoleConnectionStatus()?11:12)}}function _n(n,t){n&1&&(s(0,"label"),_(1,41),i())}function rn(n,t){n&1&&(s(0,"label"),_(1,42),i())}function Tn(n,t){if(n&1){let e=I();s(0,"section")(1,"div",65)(2,"h3"),_(3,39),i(),s(4,"p"),_(5,40),i()(),s(6,"div",66)(7,"sh-toggle",77),d("checkedChange",function(a){u(e);let T=S(2);return p(T.saveHideConsoleConnectionStatus(a))}),g(8,_n,2,0,"label")(9,rn,2,0,"label"),i()()()}if(n&2){let e=S(2);l(7),C("checked",!e.hideConsoleConnectionStatus()),l(),E(e.hideConsoleConnectionStatus()?8:9)}}function Sn(n,t){if(n&1&&(s(0,"section")(1,"div",65)(2,"h3"),_(3,32),i(),s(4,"p"),y(5),i()(),s(6,"div",66),m(7,"app-remote-control"),i()(),g(8,ln,13,4,"section")(9,Tn,10,2,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),E(e.remoteControlState()!="inactive"?8:9)}}function cn(n,t){n&1&&(s(0,"sh-icon",94),y(1,"check"),i())}function dn(n,t){n&1&&(s(0,"sh-icon",95),y(1,"prohibit"),i())}function Cn(n,t){if(n&1){let e=I();s(0,"button",99),d("click",function(){u(e);let a=S(2);return p(a.updatePassphrase())}),_(1,46),i()}if(n&2){let e=S(2);F("loading",e.isUpdating())}}function gn(n,t){if(n&1){let e=I();s(0,"button",100),d("click",function(){u(e);let a=S(2);return p(a.updatePassphrase())}),_(1,47),i()}if(n&2){let e=S(2);F("loading",e.isUpdating()),C("disabled",!0)}}function En(n,t){if(n&1){let e=I();s(0,"sh-form-field")(1,"label",90),_(2,43),i(),s(3,"input",91),L("ngModelChange",function(a){u(e);let T=S();return A(T.passphrase,a)||(T.passphrase=a),p(a)}),i()(),s(4,"sh-form-field")(5,"label",92),_(6,44),i(),s(7,"input",93),L("ngModelChange",function(a){u(e);let T=S();return A(T.repeatPassphrase,a)||(T.repeatPassphrase=a),p(a)}),i(),g(8,cn,2,0,"sh-icon",94)(9,dn,2,0,"sh-icon",95),i(),s(10,"div",71)(11,"button",96),d("click",function(){u(e);let a=S();return p(a.cancelPasswordChange())}),_(12,45),i(),g(13,Cn,2,2,"button",97)(14,gn,2,3,"button",98),i()}if(n&2){let e=S();l(3),$("ngModel",e.passphrase),l(4),C("disabled",e.passphrase().length===0),$("ngModel",e.repeatPassphrase),l(),E(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),F("loading",e.isUpdating()),l(2),E(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function un(n,t){n&1&&(s(0,"sh-icon",101),y(1,"check"),i())}function pn(n,t){if(n&1){let e=I();s(0,"div",71)(1,"button",96),d("click",function(){u(e);let a=S();return p(a.openPassphraseForm())}),_(2,48),i(),g(3,un,2,0,"sh-icon",101),i()}if(n&2){let e=S();l(3),E(e.passwordUpdated()?3:-1)}}function Nn(n,t){n&1&&(P(0,11,1),m(1,"span"),h())}function mn(n,t){n&1&&(P(0,11,2),m(1,"span"),h())}function fn(n,t){if(n&1){let e=I();s(0,"sh-form-field")(1,"label",102),_(2,49),i(),s(3,"textarea",103),L("ngModelChange",function(a){u(e);let T=S();return A(T.allowedHostnames,a)||(T.allowedHostnames=a),p(a)}),i()(),s(4,"sh-alert",104),_(5,50),i(),s(6,"button",99),d("click",function(){u(e);let a=S();return p(a.updateAllowedHostnames())}),_(7,51),i()}if(n&2){let e=S();l(3),$("ngModel",e.allowedHostnames),l(3),F("loading",e.updatingAllowedHosts())}}function In(n,t){if(n&1){let e=I();s(0,"section")(1,"div",65)(2,"h3"),_(3,52),i(),s(4,"p"),_(5,53),i()(),s(6,"div",66)(7,"sh-select",105)(8,"input",73),d("ngModelChange",function(a){u(e);let T=S();return p(T.updatePowerMode(a))}),i()()()()}if(n&2){let e=S();l(7),C("options",e.powerModeOptions())("isClearable",!1),l(),C("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Mn(n,t){if(n&1&&(s(0,"p"),_(1,54),i()),n&2){let e,o=S();l(),U((e=o.sysinfo())==null?null:e.ServerVersionName),V(1)}}function Pn(n,t){n&1&&m(0,"sh-progress-bar",78)}function hn(n,t){if(n&1&&y(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function On(n,t){if(n&1&&y(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Rn(n,t){if(n&1){let e=I();s(0,"section")(1,"div",65)(2,"h3"),_(3,55),i(),s(4,"p")(5,"span"),_(6,56),i(),s(7,"a",106),_(8,57),i(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),i()()(),s(13,"div",66)(14,"sh-select",107)(15,"input",73),d("ngModelChange",function(a){u(e);let T=S();return p(T.updateUsageStatistics(a))}),i(),oe(16,On,1,1,"ng-template"),i()()()}if(n&2){let e=S();l(14),C("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),C("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Gn(n,t){n&1&&(s(0,"label"),_(1,61),i())}function yn(n,t){n&1&&(s(0,"label"),_(1,62),i())}function Fn(n,t){if(n&1){let e=I();s(0,"section")(1,"div",65)(2,"h3"),_(3,59),i(),s(4,"p"),_(5,60),i()(),s(6,"div",88)(7,"p"),y(8,"Backup process isolation"),i(),s(9,"sh-toggle",77),d("checkedChange",function(a){u(e);let T=S();return p(T.saveControllerIpcState(a))}),g(10,Gn,2,0,"label")(11,yn,2,0,"label"),i()()()}if(n&2){let e=S();l(9),C("checked",e.isControllerIpcEnabled()),l(),E(e.isControllerIpcEnabled()?10:11)}}function $n(n,t,e){let o=kt(n),a=o[rt];e?.equal&&(a.equal=e.equal);let T;return o.set=f=>{clearTimeout(T),T=setTimeout(()=>Tt(a,f),t)},o.update=f=>{clearTimeout(T),T=setTimeout(()=>St(a,f),t)},o}var An=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Jt=[{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`}],le=class n{#e=O(Mt);#n=O(bt);#i=O(Lt);#t=O(x);#s=O(ee);#T=O(ft);#a=O(mt);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.statusMessage;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());hasIpcController=this.#i.hasIpcController;usageStatisticsDisabled=b(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=Jt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
2
+ registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=c($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(G(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updatingConsoleControl=c(!1);consoleControlDisabled=c(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;isControllerIpcEnabled=this.#t.isControllerIpcEnabled;updateRemoteAccess(t){this.allowRemoteAccess.set(t),this.#t.setRemoteAccessInterface(t?"any":"loopback").pipe(G(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(G(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(t){this.consoleControlDisabled.set(!t),this.#t.setDisableConsoleControl(!t).pipe(G(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(t){let e=t;this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(G(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=c(!1);saveHideConsoleConnectionStatus(t){this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(!t).pipe(G(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}updatingControllerIpcState=c(!1);saveControllerIpcState(t){this.updatingControllerIpcState.set(!0),this.#t.setControllerIpcState(!!t).pipe(G(()=>this.updatingControllerIpcState.set(!1))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(G(()=>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=c(wt);powerModeOptions=b(()=>{let t=this.#i.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=c(Jt);timeTypeOptions=c(An);timeType=c("none");timeValue=$n(0,300);timeRange=b(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),o=e==="none"||t===0?"":`${t}${e}`;o!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(o).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],o=e.slice(-1),a=e.slice(0,-1),T=["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":T.includes(o)?o:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(ae,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(ae,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#S(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let o=t[e].trim();if(o.startsWith("default-client="))return o.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=v({type:n,selectors:[["app-settings"]],decls:129,vars:38,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let o;o=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let N;N=$localize`Language`;let M;M=$localize`Select a language for the platform`;let R;R=$localize`Use legacy interface`;let _e;_e=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let re;re=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=B(z);let Te;Te=$localize`Allow remote access (requires restart)`;let Se;Se=$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 ce;ce=$localize`Allow remote access`;let de;de=$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 Ee;Ee=$localize`Update channel`;let ue;ue=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let pe;pe=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Stable`;let me;me=$localize`Official stable release.`;let fe;fe=$localize`Beta`;let Ie;Ie=$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 he;he=$localize`Canary`;let Oe;Oe=$localize`Builds for developers and testers only. Not for use with important data.`;let Re;Re=$localize`Pause after startup or hibernation`;let Ge;Ge=$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 ye;ye=$localize`Advanced options`;let Fe;Fe=$localize`Connect to console`;let $e;$e=$localize`Configure console control`;let Ae;Ae=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Le;Le=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ve;ve=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize`Toggle console connection status`;let xe;xe=$localize`Toggle the visibility of the console connection status indicator.`;let ke;ke=$localize`Console connection status is hidden`;let Je;Je=$localize`Console connection status is visible`;let Xe;Xe=$localize`Enter new password`;let ze;ze=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let Ue;Ue=$localize`Passphrase`;let Ve;Ve=$localize`Repeat passphrase`;let Be;Be=$localize`Cancel`;let He;He=$localize` Update passphrase `;let We;We=$localize` Update passphrase `;let qe;qe=$localize`Change password`;let je;je=$localize`Allowed hostnames`;let Ke;Ke=$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 Qe;Qe=$localize` Update allowed hostnames `;let Ye;Ye=$localize`Power mode provider`;let Ze;Ze=$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 et;et=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tt;tt=$localize`Usage statistics`;let nt;nt=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let it;it=$localize`public usage statistics.`;let ot;ot=$localize` 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. `;let st;st=$localize`Experimental options`;let at;at=$localize`Toggle experimental options.`;let lt;lt=$localize`Operations run in an isolated process`;let _t;return _t=$localize`Operations run inside the server process`,[t,e,o,a,T,f,N,M,R,_e,re,z,Te,Se,ce,de,Ce,ge,Ee,ue,pe,Ne,me,fe,Ie,Me,Pe,he,Oe,Re,Ge,ye,Fe,$e,Ae,Le,be,ve,we,De,xe,ke,Je,Ue,Ve,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,nt,it,ot,st,at,lt,_t,[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","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"checkedChange","checked"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised",3,"checked"],[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"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","new-password","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","new-password","placeholder",ze,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ie,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ie,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","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,o){if(e&1&&(m(0,"app-status-bar"),s(1,"div",63)(2,"header")(3,"div",64)(4,"h2"),_(5,0),i(),s(6,"p"),_(7,1),i()()(),g(8,Sn,10,2),s(9,"section")(10,"div",65)(11,"h3"),_(12,2),i(),s(13,"p"),_(14,3),i()(),s(15,"div",66)(16,"div",67)(17,"img",68),d("click",function(){return o.setLightMode()}),i(),s(18,"img",69),d("click",function(){return o.setDarkMode()}),i()()()(),s(19,"section")(20,"div",65)(21,"h3"),_(22,4),i(),s(23,"p"),_(24,5),i()(),s(25,"div",70),g(26,En,15,7)(27,pn,4,1,"div",71),i()(),s(28,"section")(29,"div",65)(30,"h3"),_(31,6),i(),s(32,"p"),_(33,7),i()(),s(34,"div",66)(35,"sh-select",72)(36,"input",73),d("ngModelChange",function(T){return o.updateLocale(T)}),i()()()(),s(37,"section")(38,"div",65)(39,"h3"),_(40,8),i(),s(41,"p"),_(42,9),i()(),s(43,"div",74)(44,"button",75),d("click",function(){return o.openLegacyUI()}),P(45,10),m(46,"sh-icon"),h(),i(),s(47,"button",75),d("click",function(){return o.changeDefaultClientTo(o.defaultClient()==="ngclient"?"ngax":"ngclient")}),P(48,11),m(49,"sh-icon"),g(50,Nn,2,0,"span")(51,mn,2,0,"span"),h(),i()()(),s(52,"section")(53,"div",65)(54,"h3"),_(55,12),i(),s(56,"p"),_(57,13),i()(),s(58,"div",76)(59,"sh-toggle",77),d("checkedChange",function(T){return o.updateRemoteAccess(T)}),s(60,"label"),_(61,14),i()(),g(62,fn,8,3),i()(),s(63,"section")(64,"div",65)(65,"h3"),_(66,15),i(),s(67,"p"),_(68,16),i()(),s(69,"div",66)(70,"sh-toggle",77),d("checkedChange",function(T){return o.saveDisableTrayIconLogin(T)}),s(71,"label"),_(72,17),i()()()(),g(73,In,9,5,"section"),s(74,"section")(75,"div",65)(76,"h3"),_(77,18),i(),g(78,Mn,2,1,"p"),g(79,Pn,1,0,"sh-progress-bar",78),i(),s(80,"div",79)(81,"div",80),d("click",function(){return o.setNewChannel("")}),s(82,"sh-radio",81),_(83,19),i(),s(84,"p"),_(85,20),i()(),s(86,"div",80),d("click",function(){return o.setNewChannel("stable")}),s(87,"sh-radio",81),_(88,21),i(),s(89,"p"),_(90,22),i()(),s(91,"div",80),d("click",function(){return o.setNewChannel("beta")}),s(92,"sh-radio",81),_(93,23),i(),s(94,"p"),_(95,24),i()(),s(96,"div",80),d("click",function(){return o.setNewChannel("experimental")}),s(97,"sh-radio",81),_(98,25),i(),s(99,"p"),_(100,26),i()(),s(101,"div",80),d("click",function(){return o.setNewChannel("canary")}),s(102,"sh-radio",81),_(103,27),i(),s(104,"p"),_(105,28),i()()()(),s(106,"section")(107,"div",65)(108,"h3"),_(109,29),i(),s(110,"p"),_(111,30),i()(),s(112,"div",66)(113,"div",82)(114,"sh-range-slider",83)(115,"input",84),L("ngModelChange",function(T){return A(o.timeValue,T)||(o.timeValue=T),T}),d("ngModelChange",function(T){return o.updateTimeValue(T)}),i()(),s(116,"sh-select",85)(117,"input",86),d("ngModelChange",function(T){return o.updateTimeType(T)}),i(),oe(118,hn,1,1,"ng-template"),i()()()(),g(119,Rn,17,5,"section"),g(120,Fn,12,2,"section"),i(),m(121,"sh-divider"),s(122,"div",63)(123,"section")(124,"div",87)(125,"h3"),_(126,31),i(),m(127,"app-advanced-options-settings"),i()()(),m(128,"sh-divider")),e&2){let a,T,f;l(8),E(o.isUsingRelay()?-1:8),l(9),F("active",!o.isDarkMode()),l(),F("active",o.isDarkMode()),l(8),E(o.showPassphraseForm()?26:27),l(9),C("options",o.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),C("ngModel",o.langCtrl())("ngModelOptions",J(36,ne)),l(14),E(o.defaultClient()==="ngax"?50:51),l(9),C("checked",o.allowRemoteAccess()),l(3),E(o.allowRemoteAccess()?62:-1),l(8),C("checked",o.disableTrayIconLogin()),l(3),E(o.powerModeOptions().length>0?73:-1),l(5),E((a=o.sysinfo())!=null&&a.ServerVersion?78:-1),l(),E(o.updatingChannel()?79:-1),l(3),C("checked",o.updateChannel()===""),l(),U((T=o.sysinfo())==null?null:T.DefaultUpdateChannel),V(83),l(2),U((f=o.sysinfo())==null?null:f.ServerVersionType),V(85),l(2),C("checked",o.updateChannel()==="stable"),l(5),C("checked",o.updateChannel()==="beta"),l(5),C("checked",o.updateChannel()==="experimental"),l(5),C("checked",o.updateChannel()==="canary"),l(12),C("unit",o.timeType()==="none"?"s":o.timeType()),l(),C("min",o.timeRange()[0])("max",o.timeRange()[1])("disabled",o.timeType()==="none"),$("ngModel",o.timeValue),C("ngModelOptions",J(37,ne)),l(),C("options",o.timeTypeOptions())("isClearable",!1),l(),C("ngModel",o.timeType()),l(2),E(o.usageStatisticsDisabled()?-1:119),l(),E(o.hasIpcController()?120:-1)}},dependencies:[K,W,It,q,j,Q,vt,te,X,D,Rt,Gt,Ot,Ft,$t,Z,w,ht,Y,yt],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)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{$n as debounceSignal,le as default};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-UTXZPAY6.js";import{a as l}from"./chunk-ANSV4G2K.js";import{xa as r}from"./chunk-ZC23RK4J.js";import{Qc as d,V as o,_ as e,ia as a,pa as t,ra as s,za as n}from"./chunk-TQTOIWBK.js";var m=class i{#i=e(c);#t=e(a);#o=e(n);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=d(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{a as l}from"./chunk-YS4B2B5N.js";import{a as c}from"./chunk-KZYRTI62.js";import{xa as r}from"./chunk-YF6JHIN5.js";import{$ as e,Aa as n,Rc as d,W as o,ja as a,qa as t,sa as s}from"./chunk-K5XGRFWJ.js";var m=class i{#i=e(c);#t=e(a);#o=e(n);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=d(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};