@duplicati/ngclient 0.0.214 → 0.0.218
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.
- package/assets/sh-bold.woff2 +0 -0
- package/assets/sh.woff2 +0 -0
- package/{chunk-JMLM4A3C.js → chunk-2C3OMPC2.js} +1 -1
- package/{chunk-VCIINZCU.js → chunk-2LDEHODA.js} +1 -1
- package/{chunk-TZEOQBIX.js → chunk-3374ABNZ.js} +1 -1
- package/{chunk-QAQMMCTH.js → chunk-4KFQXVKU.js} +1 -1
- package/chunk-4U5P2NHK.js +1 -0
- package/{chunk-22YUDKKU.js → chunk-53YJLSUR.js} +1 -1
- package/{chunk-I625OICV.js → chunk-54IBJBVK.js} +1 -1
- package/{chunk-2NLWVJNK.js → chunk-5DB5LJ2V.js} +1 -1
- package/{chunk-VI7MBIGT.js → chunk-5Q47XWAA.js} +1 -1
- package/chunk-5QCIXYJ2.js +1 -0
- package/{chunk-35APLYI4.js → chunk-5TT43ERP.js} +1 -1
- package/{chunk-APAWDC4O.js → chunk-5VAN6GVG.js} +1 -1
- package/{chunk-3XCT4PYH.js → chunk-6HY2QKBL.js} +1 -1
- package/chunk-6LPGVWBH.js +1 -0
- package/{chunk-PBYZZEYM.js → chunk-6PPCACHR.js} +1 -1
- package/{chunk-AJZA5YWT.js → chunk-6XWKOOJR.js} +1 -1
- package/{chunk-BRL4YYWO.js → chunk-7BK2K5ML.js} +1 -1
- package/{chunk-U34FLIYL.js → chunk-7PBEL6UP.js} +1 -1
- package/{chunk-L2QOWZDR.js → chunk-AAUAZ76N.js} +1 -1
- package/{chunk-EQNDYV43.js → chunk-AC34YYIW.js} +1 -1
- package/{chunk-AMSFSVKQ.js → chunk-B7CN4JEV.js} +1 -1
- package/{chunk-YGHS3INE.js → chunk-B7PXB6LO.js} +1 -1
- package/{chunk-GE3DHZ5E.js → chunk-BOD6INK4.js} +1 -1
- package/{chunk-M5RTYP7N.js → chunk-C56RQYG4.js} +1 -1
- package/chunk-CL2S4OQ7.js +1 -0
- package/{chunk-QQLV7J6T.js → chunk-DJIBS7A6.js} +1 -1
- package/{chunk-S3FBC24H.js → chunk-DQISAVUL.js} +1 -1
- package/chunk-E3UAEGAI.js +1 -0
- package/{chunk-V7UJAXBT.js → chunk-EZZPO6ZZ.js} +1 -1
- package/{chunk-MRSBKQQM.js → chunk-FHH444ZI.js} +1 -1
- package/{chunk-KHZ5AXGT.js → chunk-G5IUH2UI.js} +1 -1
- package/{chunk-J5TWEZOP.js → chunk-GEATZGKK.js} +1 -1
- package/{chunk-BDQJFOCO.js → chunk-GIITUFAQ.js} +1 -1
- package/chunk-GNMIMW7D.js +1 -0
- package/{chunk-VDHWNNO7.js → chunk-GQWUTQIZ.js} +1 -1
- package/{chunk-WALKMFYR.js → chunk-HKQDPKTA.js} +1 -1
- package/{chunk-GCYBVLSX.js → chunk-HN6343SO.js} +1 -1
- package/{chunk-CYY7RVDE.js → chunk-HSAIFBZZ.js} +1 -1
- package/{chunk-DTIGWCAE.js → chunk-IFZC7RUJ.js} +1 -1
- package/{chunk-QRLREAIK.js → chunk-IHNPTBK2.js} +1 -1
- package/{chunk-OO32MPRQ.js → chunk-IM6CS76E.js} +1 -1
- package/chunk-J6OYVDRR.js +1 -0
- package/{chunk-CW43F6WE.js → chunk-JJ5XEJ75.js} +1 -1
- package/{chunk-R5OX4JTJ.js → chunk-JNWS5H5A.js} +1 -1
- package/{chunk-22PELS6R.js → chunk-KDWGBKDI.js} +1 -1
- package/{chunk-B7CQXYTS.js → chunk-KQR3DEQ4.js} +1 -1
- package/{chunk-7WOSHJ7G.js → chunk-KTRNTLNO.js} +1 -1
- package/{chunk-5L2OOKRZ.js → chunk-LFWCPFV7.js} +1 -1
- package/{chunk-2E5PWPGZ.js → chunk-LRZXNEAQ.js} +1 -1
- package/{chunk-FSHBOASN.js → chunk-MI3BETEH.js} +1 -1
- package/{chunk-AZRNX5LU.js → chunk-MZAGGSG2.js} +1 -1
- package/chunk-NFXXT6A3.js +4 -0
- package/chunk-NPL5UWFD.js +1 -0
- package/{chunk-FMDSOHVR.js → chunk-NXEMSNQO.js} +1 -1
- package/{chunk-U3A754M6.js → chunk-O42PEGVX.js} +1 -1
- package/{chunk-R6TFME5I.js → chunk-O6ZQRIZA.js} +1 -1
- package/{chunk-XZNYCTQB.js → chunk-OMOPTBR2.js} +1 -1
- package/chunk-OW2XLFBF.js +1 -0
- package/{chunk-5FQ5SDPZ.js → chunk-OZDUAVJM.js} +1 -1
- package/{chunk-YMUS7QSB.js → chunk-PAXRIMTV.js} +1 -1
- package/{chunk-WIE7KXIC.js → chunk-PSISW3DT.js} +1 -1
- package/chunk-Q6A652RP.js +1 -0
- package/chunk-R3H3RDDJ.js +1 -0
- package/chunk-RLWCEUKT.js +1 -0
- package/{chunk-T2X5J6MQ.js → chunk-RXWMHEJY.js} +1 -1
- package/{chunk-HHDCI6IF.js → chunk-RZTMWVAA.js} +1 -1
- package/chunk-S235GCI6.js +1 -0
- package/{chunk-7FDLOZXV.js → chunk-S36F6ZJZ.js} +1 -1
- package/{chunk-ADB5QRUO.js → chunk-SDKAVOP6.js} +1 -1
- package/{chunk-OBF6ZSYT.js → chunk-SRILTSQM.js} +1 -1
- package/{chunk-VGBTP4QP.js → chunk-SXNQOAUJ.js} +1 -1
- package/{chunk-ZK3S23CJ.js → chunk-TMS3I5A2.js} +1 -1
- package/{chunk-GO22QPW4.js → chunk-TSDCJYMP.js} +1 -1
- package/{chunk-HO6FQWDR.js → chunk-UOTOQXS3.js} +1 -1
- package/{chunk-XAYG4QT7.js → chunk-UT42UQWA.js} +1 -1
- package/chunk-V42HCQ3A.js +1 -0
- package/chunk-V4NNTODH.js +1 -0
- package/{chunk-NBKLLQQO.js → chunk-V6U75SVY.js} +1 -1
- package/{chunk-KHFOQETZ.js → chunk-VJ3PK33N.js} +1 -1
- package/{chunk-XCVBN7EK.js → chunk-VOHSRCTH.js} +1 -1
- package/{chunk-7PYUNUEY.js → chunk-X5TRWBWL.js} +1 -1
- package/{chunk-EGTYGTQI.js → chunk-X6S2TQ5D.js} +1 -1
- package/{chunk-J6WVOYQ6.js → chunk-XZS6HRVR.js} +1 -1
- package/{chunk-LU7TIW3P.js → chunk-Y3LMRA5G.js} +1 -1
- package/{chunk-3PUCEFO5.js → chunk-Y4TMGQ3H.js} +1 -1
- package/{chunk-CQYKOCGO.js → chunk-Y6WYFFBC.js} +1 -1
- package/{chunk-OZEGNE5W.js → chunk-YEMKFHRS.js} +1 -1
- package/{chunk-Y3YNTMT5.js → chunk-YXRM2NKT.js} +1 -1
- package/chunk-ZJAQQH7X.js +1 -0
- package/chunk-ZXAPMIF3.js +1 -0
- package/index.html +2 -2
- package/{main-7HIGYDD6.js → main-57XFFSWO.js} +1 -1
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +3079 -2415
- package/styles-VWVVVLVS.css +1 -0
- package/chunk-522J6R6I.js +0 -1
- package/chunk-7ED2GUWQ.js +0 -1
- package/chunk-7YSKL3IG.js +0 -1
- package/chunk-B3T2NEGO.js +0 -1
- package/chunk-BME6TJIR.js +0 -1
- package/chunk-BP66ERTI.js +0 -1
- package/chunk-C2NKW2QW.js +0 -1
- package/chunk-EU6N52DH.js +0 -1
- package/chunk-HYYZB4AS.js +0 -1
- package/chunk-IJHPC43D.js +0 -1
- package/chunk-LOFKRPRH.js +0 -1
- package/chunk-NCXKMSRH.js +0 -1
- package/chunk-QUXPHHDZ.js +0 -1
- package/chunk-TJNL6F5S.js +0 -1
- package/chunk-UH2E7MMT.js +0 -4
- package/chunk-Y3BYCXUX.js +0 -1
- package/chunk-YPWKWP5H.js +0 -1
- package/chunk-ZXQSQRKN.js +0 -1
- package/styles-43GHZ572.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ze}from"./chunk-35APLYI4.js";import{a as Ge}from"./chunk-R6TFME5I.js";import{A as Le,B as ce,H as J,J as Ae,K as ke,L as Be,P as $e,W as We,a as ae,c as G,e as z,i as j,k as de,s as H,v as De,y as we,z as Ie}from"./chunk-NCXKMSRH.js";import{d as Ve}from"./chunk-QAQMMCTH.js";import{aa as Re}from"./chunk-BDQJFOCO.js";import{$b as _,A as Ce,Ab as te,Ac as se,Bb as ne,Bc as ve,Cb as T,Cc as le,Db as a,Dc as Fe,Eb as d,F as ue,Fb as ie,Jb as Te,Kb as Pe,Kc as ye,Lb as pe,Mb as L,Rc as O,Sa as p,Tb as Me,Ub as be,Vb as x,Wb as q,Wc as xe,Xb as K,Xc as m,Yc as _e,Zb as A,_ as Z,ac as V,bc as S,da as b,ea as N,gb as W,gc as Ne,hc as Se,ic as ge,jc as oe,kc as B,l as me,lb as X,nc as P,pa as C,pc as Oe,q as k,qc as re,ra as y,sc as R,tc as D,uc as w,vb as ee,w as fe,wb as v,xb as F,yb as Ee}from"./chunk-UH2E7MMT.js";import{a as Q,b as Y}from"./chunk-7CGTOI24.js";var Qe=["treeContainer"],Ye=["formRef"],Ze=[[["label"]],[["label"]],[["input"]]],et=["label","label","input"],tt=r=>({children:r,level:0}),Ue=r=>({$implicit:r}),nt=(r,t)=>({children:r,level:t}),it=()=>({maxWidth:"700px",width:"100%"}),ot=(r,t)=>t.id;function rt(r,t){if(r&1){let e=L();a(0,"sh-button-group",21),w("valueChange",function(i){b(e);let o=_();return D(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),N(i)}),a(1,"button",22),x(2,4),d(),a(3,"button",23),x(4,5),d()()}if(r&2){let e=_();R("value",e.pathDiscoveryMethod)}}function st(r,t){r&1&&ie(0,"sh-progress-bar",14)}function lt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-down"),d())}function at(r,t){r&1&&ie(0,"sh-icon",28)}function dt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"spinner"),d())}function ct(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-right"),d())}function ut(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-open"),d())}function pt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-user"),d())}function gt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"file"),d())}function _t(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder"),d())}function ht(r,t){if(r&1&&(v(0,lt,2,0,"sh-icon",28)(1,at,1,0,"sh-icon",28)(2,dt,2,0,"sh-icon",28)(3,ct,2,0,"sh-icon",28),v(4,ut,2,0,"sh-icon",26)(5,pt,2,0,"sh-icon",26)(6,gt,2,0,"sh-icon",26)(7,_t,2,0,"sh-icon",26)),r&2){let e=_(2).$implicit,n=_(2);F(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),p(4),F(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function mt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"desktop-tower"),d())}function ft(r,t){r&1&&pe(0)}function Ct(r,t){if(r&1&&X(0,ft,1,0,"ng-container",15),r&2){let e=_(2).$implicit,n=_().$implicit;_();let i=ge(7);T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(5,Ue,Fe(2,nt,e.children,n.level+1)))}}function Et(r,t){if(r&1){let e=L();a(0,"div",24,3),A("click",function(){b(e);let i=_().$implicit,o=_(2);return N(o.toggleNode(i.id,i))}),a(2,"div",25),v(3,ht,8,2)(4,mt,2,0,"sh-icon",26),d(),a(5,"div",27),A("click",function(i){b(e);let o=_().$implicit,l=_(2);return N(l.toggleSelectedNode(i,o))}),P(6),d()(),v(7,Ct,1,7,"ng-container")}if(r&2){let e=_().$implicit,n=_().$implicit,i=_();B("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),p(2),B("file",e.cls==="file"),p(),F(e.id!=="/"?3:4),p(3),Oe(" ",e.text," "),p(),F(e.children.length>0?7:-1)}}function Tt(r,t){if(r&1&&v(0,Et,8,19),r&2){let e=t.$implicit,n=_(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Pt(r,t){if(r&1&&(a(0,"sh-list"),te(1,Tt,1,1,null,null,ot),d()),r&2){let e=t.$implicit;oe("padding-left",e.level*.25,"rem"),p(),ne(e.children)}}function Mt(r,t){r&1&&pe(0)}function bt(r,t){if(r&1){let e=L();a(0,"sh-toggle",29),w("checkedChange",function(i){b(e);let o=_();return D(o._showHiddenNodes,i)||(o._showHiddenNodes=i),N(i)}),x(1,6),d()}if(r&2){let e=_();R("checked",e._showHiddenNodes),p(),q(e.showFiles()?"files":"folders"),K(1)}}function Nt(r,t){if(r&1){let e=L();a(0,"button",30),A("click",function(){b(e);let i=_();return N(i.openCreateFolderDialog())}),x(1,7),d()}if(r&2){let e=_();T("disabled",!e.isCurrentPathFolder())}}function St(r,t){if(r&1){let e=L();a(0,"sh-dialog",31),w("isOpenChange",function(i){b(e);let o=_();return D(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),N(i)}),a(1,"header",32)(2,"h2"),x(3,8),d()(),a(4,"div",33)(5,"div",34)(6,"p"),x(7,9),d(),a(8,"div",35)(9,"pre"),P(10),d()()(),a(11,"sh-form-field")(12,"textarea",36),w("ngModelChange",function(i){b(e);let o=_();return D(o.createFolderPath,i)||(o.createFolderPath=i),N(i)}),d()()(),a(13,"footer",37)(14,"button",38),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!1))}),P(15,"Cancel"),d(),a(16,"button",39),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!0))}),Me(17,10),ie(18,"sh-icon"),be(),d()()()}if(r&2){let e,n=_();R("isOpen",n.createFolderDialogOpen),T("options",ve(6,it)),p(10),re("",n.currentPathResolvedShorthands(),"",n.createFolderPath()?"/"+n.createFolderPath():""),p(2),R("ngModel",n.createFolderPath),p(4),T("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var Xe=(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))(Xe||{}),M="/",he=class r{#e=Z(Ve);#n=Z(Ge);#u=Z(Ie);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPaths=m([]);initialNodes=m([]);backupSettings=m(null);pathRefreshTrigger=m(!1);showHiddenNodes=m(!1);enableCreateFolder=m(!1);hideShortcuts=m(!1);customRemoteMode=m(null);backupId=m("");sourcePrefix=m("");destinationUrl=m("");loadExtendedData=m(!0);hasExtendedData=xe();_showHiddenNodes=C(!1);createFolderDialogOpen=C(!1);createFolderPath=C(null);treeContainerRef=_e("treeContainer");formRef=_e("formRef");pathDiscoveryMethod=C("browse");isLoading=C(null);currentPath=C("");currentPathResolvedShorthands=O(()=>this.#n.resolveShorthandPath(this.currentPath()));#r=C(null);treeSearchQuery=C("");treeNodes=C([]);pathDelimiter=O(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=O(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=O(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Xe;treeStructure=O(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),n=structuredClone(e);for(let s=0;s<n.length;s++){let f=n[s].slice(1);if(f.startsWith("{")&&f.endsWith("}")){let h=f.slice(1,-1),g=this.filterGroups?.FilterGroups[h];if(g&&g.length){let I=g.map(E=>`-${E}`);n.splice(s,1,...I)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),l=this.accepts(),u=[];return o.length>0?u=o.map(s=>{let c=this.#s(n,s,"folder",null);return{id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:c,isIndeterminate:!1,cls:this.#t(s)?"folder":"file"}}):u=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],u.map(s=>{let c=new Map;if(!s.id)return;let f=s.id;l&&(s.accepted=!0),c.set(f,s);let h=o.length>0?i.filter(g=>g.parentPath.startsWith(f)):i;for(let g of h){if(!g.id)continue;let I=g.id;if(!g.cls||c.has(I))continue;let E=c.get(g.parentPath),U=g.hidden===!0&&t?0:this.#s(n,I,g.cls,E),$=Y(Q({},g),{isIndeterminate:this.isIndeterminate(n,I),evalState:U,children:[]});l&&($.accepted=this.matchAccepts(l,$)),c.set(I,$),E&&E.children.push($)}return s}),u});#p(t){if(!t)return M;let e=this.#i(t);return t.endsWith("/")||t.endsWith("\\")||t===M?t:t+e}#s(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,l=t.filter(c=>!c.startsWith("-")&&!c.startsWith("+")),u=t.filter(c=>c.startsWith("-")||c.startsWith("+")),s=this.multiSelect();if(l.length===0)return o;for(let c=0;c<l.length;c++){let f=l[c];if(e===f){o=1;break}if(!s||!this.#t(f))continue;if(e?.startsWith(f)){o=1;break}}if(u.length===0)return o;for(let c=0;c<u.length;c++){let f=u[c],h=f.slice(1),g=f.startsWith("-")?-1:1;if(this.#t(h)){if(n!=="folder")continue;if(e===h){o=g;break}}if(h.startsWith("*")&&(h.endsWith("*\\")||h.endsWith("*/"))){if(n!=="folder")continue;let E=h.slice(1,-2);if(E==="")break;if(e?.includes(E+"\\")||e?.includes(E+"/")){o=g;break}}if(h.startsWith("[.*")&&(h.endsWith("[^\\/]*]")||h.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let E=h.slice(3,-7);if(new RegExp(E).test(e)){o=g;break}}if(h.startsWith("[")&&h.endsWith("]")){let E=h.slice(1,-1),U=this.translateCSharpRegex(E);if(new RegExp(`${U}`).test(e)){o=g;break}}if(h.startsWith("*.")){if(n!=="file"||h.replace("*.","").length===0)continue;if(this.#l(e,h,!0)){o=g;break}}if(h==="")continue;if(h===e){o=g;break}if(this.#l(e,h,!0)){o=g;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,l)=>`(${l})`),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}#l(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#i(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=y(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=y(()=>{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===M)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=y(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=y(()=>{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.#E(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.#c(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,M)}}getParentPath(t){let e=this.#i(t),n=t.split(e);return n.length<=1?M:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===M||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),l=this.isChildOfSelected(e)?`-${e.id}`:e.id,u=this.#t(e.id);if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(u&&s.startsWith(l))).join("\0"));else if(i.some(s=>s==l))this.currentPath.set(i.filter(s=>s!==l).join("\0"));else{let s=u?i.filter(c=>!c.startsWith(e.id)):i;this.currentPath.set([...s,l].join("\0"))}else i.includes(e.id)?this.currentPath.set(i.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==M&&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.currentPathResolvedShorthands(),o=this.#p(e),l=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+l}}).subscribe({next:()=>{this.currentPath.set(l),this.#o(null,n),setTimeout(()=>{this.#a()},500),this.createFolderDialogOpen.set(!1)},error:u=>{let s=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=s?s[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#u.open(ze,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#a(){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()})}#h(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(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:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){let e=this.backupSettings();if(this.#n.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(k(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(k(i=>i.Files??[]))}}#d(t){return this.customRemoteMode()==="o365"?this.#h(t):this.customRemoteMode()==="gsuite"?this.#m(t):this.customRemoteMode()==="diskimage"?this.#f(t):this.isByBackupSettings()?this.#C(t):this.#_(t)}#E(t){let n=t.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")&&!l.startsWith("@")).filter(Boolean).map(l=>{let u=this.#i(l),s=l.split(u);return s.at(-1)!==""&&s.pop(),{split:s,sep:u}}),i=[M];n.forEach(({split:l,sep:u})=>{l.forEach((s,c)=>{let f=l.slice(0,c+1).join(u)+u;f===""||f===u||i.includes(f)||i.push(f)})});let o=i.map(l=>(this.isLoading.set(l),this.#d(l).pipe(k(u=>({status:"success",value:u,url:l})),Ce(u=>me({status:"error",value:u,url:l})))));fe(o).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:l=>{let u=l.filter(c=>c.status==="success"),s=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let f=u.flatMap(g=>Array.isArray(g.value)?g.value.map(I=>Y(Q({},I),{parentPath:g.url})):[]),h=[...new Map([...c,...f].map(g=>[g.id,g])).values()];return this.#a(),this.hideShortcuts()?h.filter(g=>!g.id.startsWith("%")):h})}})}#c(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}#T(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=M){this.isLoading.set(e),this.#d(e).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#T(o.Metadata);let l=this.#i(o.Path);return{text:this.#c(o.Path.split(l).filter(s=>s!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let l=i.map(s=>{let c=this.#t(s.id)?"folder":"file";return Y(Q({},s),{cls:c,parentPath:e})}),u=[...new Map([...o,...l].map(s=>[s.id,s])).values()];return this.hideShortcuts()?u.filter(s=>!s.id.startsWith("%")):u})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=W({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Ne(n.treeContainerRef,Qe,5)(n.formRef,Ye,5),e&2&&Se(2)},hostVars:2,hostBindings:function(e,n){e&2&&B("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"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:et,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 l;l=$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,l,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,"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&&(V(Ze),v(0,rt,5,1,"sh-button-group",11),a(1,"div",12),S(2,0,["ngProjectAs","label",5,["label"]]),a(3,"div",13,0),v(5,st,1,0,"sh-progress-bar",14),X(6,Pt,3,2,"ng-template",null,1,ye)(8,Mt,1,0,"ng-container",15),d(),a(9,"div",16),v(10,bt,2,2,"sh-toggle",17),v(11,Nt,2,1,"button",18),d()(),a(12,"div",19,2)(14,"sh-form-field"),S(15,1,["ngProjectAs","label",5,["label"]]),S(16,2,["ngProjectAs","input",5,["input"]]),d()(),v(17,St,19,7,"sh-dialog",20)),e&2){let i=ge(7);F(!n.multiSelect()&&n.customRemoteMode()===null?0:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="browse"),p(2),B("visualize-accepted",n.accepts()),p(2),F(n.isLoading()!=null?5:-1),p(3),T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(15,Ue,le(13,tt,n.treeStructure()))),p(2),F(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null?10:-1),p(),F(n.enableCreateFolder()&&n.customRemoteMode()===null?11:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="path"),p(5),F(n.createFolderDialogOpen()?17:-1)}},dependencies:[ce,Le,We,De,J,Ae,Be,we,Re,H,G,z,j],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;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].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 Ot=[[["label"]],[["","prefix",""]],[["","suffix",""]]],vt=["label","[prefix]","[suffix]"];function Ft(r,t){if(r&1&&P(0),r&2){let e=t.$implicit,n=_();re("",e.label,"",n.hasPerSecond()?"/s":"")}}var yt=["throttle-upload","throttle-download"],xt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Rt=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"}},qe=class r{customId=m();inputType=m();timespan=C(0);unit=C("MB");sizeOptions=C(xt);readonly=C(!1);hasPerSecond=O(()=>{let t=this.inputType();return t&&yt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Rt(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=W({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:vt,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&&(V(Ot),a(0,"div",0),S(1,0,["ngProjectAs","label",5,["label"]]),d(),a(2,"sh-form-field")(3,"input",1),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(4,1),S(5,2),d(),a(6,"sh-select",2)(7,"input",3),w("ngModelChange",function(o){return D(n.unit,o)||(n.unit=o),o}),d(),X(8,Ft,1,2,"ng-template"),d()),e&2&&(p(2),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),oe("--miw",0),T("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),p(),R("ngModel",n.unit))},dependencies:[$e,J,H,G,de,z,j],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 Dt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],wt=["label","[prefix]","[suffix]"];function It(r,t){if(r&1){let e=L();a(0,"button",7),A("click",function(){let i=b(e).$implicit,o=_();return N(o.updateUnit(i.value))}),x(1,1),d()}if(r&2){let e=t.$implicit;p(),q(e.label),K(1)}}var Lt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],At=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],kt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],Ke=class r{customId=m();inputType=m();timespan=C(0);#e="D";unit=C(this.#e);unitLabel=O(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=O(()=>{let t=this.inputType();return t&&kt.includes(t.replace("--",""))});timeOptions=O(()=>this.isShortTime()?Lt:At);readonly=C(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});inputTypeEffect=y(()=>{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=W({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:wt,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&&(V(Dt),S(0,0,["ngProjectAs","label",5,["label"]]),a(1,"sh-form-field")(2,"input",2),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(3,1),S(4,2),d(),a(5,"sh-menu",3)(6,"button",4),x(7,0),d(),Te(8,5),te(9,It,2,1,"button",6,Ee),Pe(),d()),e&2&&(p(),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),T("openIndicator",!0),p(2),q(n.unitLabel()),K(7),p(2),ne(n.timeOptions()))},dependencies:[ke,J,H,G,de,z,j,ce],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{he as a,Rt as b,qe as c,Ke as d};
|
|
1
|
+
import{a as ze}from"./chunk-5TT43ERP.js";import{a as Ge}from"./chunk-O6ZQRIZA.js";import{A as Le,B as ce,H as J,J as Ae,K as ke,L as Be,P as $e,W as We,a as ae,c as G,e as z,i as j,k as de,s as H,v as De,y as we,z as Ie}from"./chunk-E3UAEGAI.js";import{d as Ve}from"./chunk-4KFQXVKU.js";import{aa as Re}from"./chunk-GIITUFAQ.js";import{$b as _,A as Ce,Ab as te,Ac as se,Bb as ne,Bc as ve,Cb as T,Cc as le,Db as a,Dc as Fe,Eb as d,F as ue,Fb as ie,Jb as Te,Kb as Pe,Kc as ye,Lb as pe,Mb as L,Rc as O,Sa as p,Tb as Me,Ub as be,Vb as x,Wb as q,Wc as xe,Xb as K,Xc as m,Yc as _e,Zb as A,_ as Z,ac as V,bc as S,da as b,ea as N,gb as W,gc as Ne,hc as Se,ic as ge,jc as oe,kc as B,l as me,lb as X,nc as P,pa as C,pc as Oe,q as k,qc as re,ra as y,sc as R,tc as D,uc as w,vb as ee,w as fe,wb as v,xb as F,yb as Ee}from"./chunk-NFXXT6A3.js";import{a as Q,b as Y}from"./chunk-7CGTOI24.js";var Qe=["treeContainer"],Ye=["formRef"],Ze=[[["label"]],[["label"]],[["input"]]],et=["label","label","input"],tt=r=>({children:r,level:0}),Ue=r=>({$implicit:r}),nt=(r,t)=>({children:r,level:t}),it=()=>({maxWidth:"700px",width:"100%"}),ot=(r,t)=>t.id;function rt(r,t){if(r&1){let e=L();a(0,"sh-button-group",21),w("valueChange",function(i){b(e);let o=_();return D(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),N(i)}),a(1,"button",22),x(2,4),d(),a(3,"button",23),x(4,5),d()()}if(r&2){let e=_();R("value",e.pathDiscoveryMethod)}}function st(r,t){r&1&&ie(0,"sh-progress-bar",14)}function lt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-down"),d())}function at(r,t){r&1&&ie(0,"sh-icon",28)}function dt(r,t){r&1&&(a(0,"sh-icon",28),P(1,"spinner"),d())}function ct(r,t){r&1&&(a(0,"sh-icon",28),P(1,"caret-right"),d())}function ut(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-open"),d())}function pt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder-user"),d())}function gt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"file"),d())}function _t(r,t){r&1&&(a(0,"sh-icon",26),P(1,"folder"),d())}function ht(r,t){if(r&1&&(v(0,lt,2,0,"sh-icon",28)(1,at,1,0,"sh-icon",28)(2,dt,2,0,"sh-icon",28)(3,ct,2,0,"sh-icon",28),v(4,ut,2,0,"sh-icon",26)(5,pt,2,0,"sh-icon",26)(6,gt,2,0,"sh-icon",26)(7,_t,2,0,"sh-icon",26)),r&2){let e=_(2).$implicit,n=_(2);F(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),p(4),F(e.children.length?4:e.id==="%HOME%"?5:e.cls==="file"?6:7)}}function mt(r,t){r&1&&(a(0,"sh-icon",26),P(1,"desktop-tower"),d())}function ft(r,t){r&1&&pe(0)}function Ct(r,t){if(r&1&&X(0,ft,1,0,"ng-container",15),r&2){let e=_(2).$implicit,n=_().$implicit;_();let i=ge(7);T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(5,Ue,Fe(2,nt,e.children,n.level+1)))}}function Et(r,t){if(r&1){let e=L();a(0,"div",24,3),A("click",function(){b(e);let i=_().$implicit,o=_(2);return N(o.toggleNode(i.id,i))}),a(2,"div",25),v(3,ht,8,2)(4,mt,2,0,"sh-icon",26),d(),a(5,"div",27),A("click",function(i){b(e);let o=_().$implicit,l=_(2);return N(l.toggleSelectedNode(i,o))}),P(6),d()(),v(7,Ct,1,7,"ng-container")}if(r&2){let e=_().$implicit,n=_().$implicit,i=_();B("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),p(2),B("file",e.cls==="file"),p(),F(e.id!=="/"?3:4),p(3),Oe(" ",e.text," "),p(),F(e.children.length>0?7:-1)}}function Tt(r,t){if(r&1&&v(0,Et,8,19),r&2){let e=t.$implicit,n=_(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Pt(r,t){if(r&1&&(a(0,"sh-list"),te(1,Tt,1,1,null,null,ot),d()),r&2){let e=t.$implicit;oe("padding-left",e.level*.25,"rem"),p(),ne(e.children)}}function Mt(r,t){r&1&&pe(0)}function bt(r,t){if(r&1){let e=L();a(0,"sh-toggle",29),w("checkedChange",function(i){b(e);let o=_();return D(o._showHiddenNodes,i)||(o._showHiddenNodes=i),N(i)}),x(1,6),d()}if(r&2){let e=_();R("checked",e._showHiddenNodes),p(),q(e.showFiles()?"files":"folders"),K(1)}}function Nt(r,t){if(r&1){let e=L();a(0,"button",30),A("click",function(){b(e);let i=_();return N(i.openCreateFolderDialog())}),x(1,7),d()}if(r&2){let e=_();T("disabled",!e.isCurrentPathFolder())}}function St(r,t){if(r&1){let e=L();a(0,"sh-dialog",31),w("isOpenChange",function(i){b(e);let o=_();return D(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),N(i)}),a(1,"header",32)(2,"h2"),x(3,8),d()(),a(4,"div",33)(5,"div",34)(6,"p"),x(7,9),d(),a(8,"div",35)(9,"pre"),P(10),d()()(),a(11,"sh-form-field")(12,"textarea",36),w("ngModelChange",function(i){b(e);let o=_();return D(o.createFolderPath,i)||(o.createFolderPath=i),N(i)}),d()()(),a(13,"footer",37)(14,"button",38),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!1))}),P(15,"Cancel"),d(),a(16,"button",39),A("click",function(){b(e);let i=_();return N(i.closeCreateFolderDialog(!0))}),Me(17,10),ie(18,"sh-icon"),be(),d()()()}if(r&2){let e,n=_();R("isOpen",n.createFolderDialogOpen),T("options",ve(6,it)),p(10),re("",n.currentPathResolvedShorthands(),"",n.createFolderPath()?"/"+n.createFolderPath():""),p(2),R("ngModel",n.createFolderPath),p(4),T("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var Xe=(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))(Xe||{}),M="/",he=class r{#e=Z(Ve);#n=Z(Ge);#u=Z(Ie);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPaths=m([]);initialNodes=m([]);backupSettings=m(null);pathRefreshTrigger=m(!1);showHiddenNodes=m(!1);enableCreateFolder=m(!1);hideShortcuts=m(!1);customRemoteMode=m(null);backupId=m("");sourcePrefix=m("");destinationUrl=m("");loadExtendedData=m(!0);hasExtendedData=xe();_showHiddenNodes=C(!1);createFolderDialogOpen=C(!1);createFolderPath=C(null);treeContainerRef=_e("treeContainer");formRef=_e("formRef");pathDiscoveryMethod=C("browse");isLoading=C(null);currentPath=C("");currentPathResolvedShorthands=O(()=>this.#n.resolveShorthandPath(this.currentPath()));#r=C(null);treeSearchQuery=C("");treeNodes=C([]);pathDelimiter=O(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=O(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=O(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Xe;treeStructure=O(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),n=structuredClone(e);for(let s=0;s<n.length;s++){let f=n[s].slice(1);if(f.startsWith("{")&&f.endsWith("}")){let h=f.slice(1,-1),g=this.filterGroups?.FilterGroups[h];if(g&&g.length){let I=g.map(E=>`-${E}`);n.splice(s,1,...I)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),l=this.accepts(),u=[];return o.length>0?u=o.map(s=>{let c=this.#s(n,s,"folder",null);return{id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:c,isIndeterminate:!1,cls:this.#t(s)?"folder":"file"}}):u=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],u.map(s=>{let c=new Map;if(!s.id)return;let f=s.id;l&&(s.accepted=!0),c.set(f,s);let h=o.length>0?i.filter(g=>g.parentPath.startsWith(f)):i;for(let g of h){if(!g.id)continue;let I=g.id;if(!g.cls||c.has(I))continue;let E=c.get(g.parentPath),U=g.hidden===!0&&t?0:this.#s(n,I,g.cls,E),$=Y(Q({},g),{isIndeterminate:this.isIndeterminate(n,I),evalState:U,children:[]});l&&($.accepted=this.matchAccepts(l,$)),c.set(I,$),E&&E.children.push($)}return s}),u});#p(t){if(!t)return M;let e=this.#i(t);return t.endsWith("/")||t.endsWith("\\")||t===M?t:t+e}#s(t,e,n,i){if(i&&i.evalState===-1)return-2;let o=0,l=t.filter(c=>!c.startsWith("-")&&!c.startsWith("+")),u=t.filter(c=>c.startsWith("-")||c.startsWith("+")),s=this.multiSelect();if(l.length===0)return o;for(let c=0;c<l.length;c++){let f=l[c];if(e===f){o=1;break}if(!s||!this.#t(f))continue;if(e?.startsWith(f)){o=1;break}}if(u.length===0)return o;for(let c=0;c<u.length;c++){let f=u[c],h=f.slice(1),g=f.startsWith("-")?-1:1;if(this.#t(h)){if(n!=="folder")continue;if(e===h){o=g;break}}if(h.startsWith("*")&&(h.endsWith("*\\")||h.endsWith("*/"))){if(n!=="folder")continue;let E=h.slice(1,-2);if(E==="")break;if(e?.includes(E+"\\")||e?.includes(E+"/")){o=g;break}}if(h.startsWith("[.*")&&(h.endsWith("[^\\/]*]")||h.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let E=h.slice(3,-7);if(new RegExp(E).test(e)){o=g;break}}if(h.startsWith("[")&&h.endsWith("]")){let E=h.slice(1,-1),U=this.translateCSharpRegex(E);if(new RegExp(`${U}`).test(e)){o=g;break}}if(h.startsWith("*.")){if(n!=="file"||h.replace("*.","").length===0)continue;if(this.#l(e,h,!0)){o=g;break}}if(h==="")continue;if(h===e){o=g;break}if(this.#l(e,h,!0)){o=g;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,l)=>`(${l})`),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}#l(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}#i(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=y(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=y(()=>{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===M)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=y(()=>{let t=this.#r();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=y(()=>{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.#E(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.#c(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,M)}}getParentPath(t){let e=this.#i(t),n=t.split(e);return n.length<=1?M:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===M||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),l=this.isChildOfSelected(e)?`-${e.id}`:e.id,u=this.#t(e.id);if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(u&&s.startsWith(l))).join("\0"));else if(i.some(s=>s==l))this.currentPath.set(i.filter(s=>s!==l).join("\0"));else{let s=u?i.filter(c=>!c.startsWith(e.id)):i;this.currentPath.set([...s,l].join("\0"))}else i.includes(e.id)?this.currentPath.set(i.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!==M&&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.currentPathResolvedShorthands(),o=this.#p(e),l=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+l}}).subscribe({next:()=>{this.currentPath.set(l),this.#o(null,n),setTimeout(()=>{this.#a()},500),this.createFolderDialogOpen.set(!1)},error:u=>{let s=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=s?s[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#u.open(ze,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#a(){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()})}#h(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#m(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:this.destinationUrl()??"",path:t??"/"}}).pipe(k(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:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(k(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#C(t){let e=this.backupSettings();if(this.#n.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(k(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(k(i=>i.Files??[]))}}#d(t){return this.customRemoteMode()==="o365"?this.#h(t):this.customRemoteMode()==="gsuite"?this.#m(t):this.customRemoteMode()==="diskimage"?this.#f(t):this.isByBackupSettings()?this.#C(t):this.#_(t)}#E(t){let n=t.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")&&!l.startsWith("@")).filter(Boolean).map(l=>{let u=this.#i(l),s=l.split(u);return s.at(-1)!==""&&s.pop(),{split:s,sep:u}}),i=[M];n.forEach(({split:l,sep:u})=>{l.forEach((s,c)=>{let f=l.slice(0,c+1).join(u)+u;f===""||f===u||i.includes(f)||i.push(f)})});let o=i.map(l=>(this.isLoading.set(l),this.#d(l).pipe(k(u=>({status:"success",value:u,url:l})),Ce(u=>me({status:"error",value:u,url:l})))));fe(o).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:l=>{let u=l.filter(c=>c.status==="success"),s=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let f=u.flatMap(g=>Array.isArray(g.value)?g.value.map(I=>Y(Q({},I),{parentPath:g.url})):[]),h=[...new Map([...c,...f].map(g=>[g.id,g])).values()];return this.#a(),this.hideShortcuts()?h.filter(g=>!g.id.startsWith("%")):h})}})}#c(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}#T(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=M){this.isLoading.set(e),this.#d(e).pipe(ue(()=>this.isLoading.set(null))).subscribe({next:n=>{let i=this.isByBackupSettings()||this.customRemoteMode()!==null?n.map(o=>{this.#T(o.Metadata);let l=this.#i(o.Path);return{text:this.#c(o.Path.split(l).filter(s=>s!=="").pop(),o.Metadata),id:o.Path,cls:this.#t(o.Path)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let l=i.map(s=>{let c=this.#t(s.id)?"folder":"file";return Y(Q({},s),{cls:c,parentPath:e})}),u=[...new Map([...o,...l].map(s=>[s.id,s])).values()];return this.hideShortcuts()?u.filter(s=>!s.id.startsWith("%")):u})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=W({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&Ne(n.treeContainerRef,Qe,5)(n.formRef,Ye,5),e&2&&Se(2)},hostVars:2,hostBindings:function(e,n){e&2&&B("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"],customRemoteMode:[1,"customRemoteMode"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:et,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 l;l=$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,l,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,"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&&(V(Ze),v(0,rt,5,1,"sh-button-group",11),a(1,"div",12),S(2,0,["ngProjectAs","label",5,["label"]]),a(3,"div",13,0),v(5,st,1,0,"sh-progress-bar",14),X(6,Pt,3,2,"ng-template",null,1,ye)(8,Mt,1,0,"ng-container",15),d(),a(9,"div",16),v(10,bt,2,2,"sh-toggle",17),v(11,Nt,2,1,"button",18),d()(),a(12,"div",19,2)(14,"sh-form-field"),S(15,1,["ngProjectAs","label",5,["label"]]),S(16,2,["ngProjectAs","input",5,["input"]]),d()(),v(17,St,19,7,"sh-dialog",20)),e&2){let i=ge(7);F(!n.multiSelect()&&n.customRemoteMode()===null?0:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="browse"),p(2),B("visualize-accepted",n.accepts()),p(2),F(n.isLoading()!=null?5:-1),p(3),T("ngTemplateOutlet",i)("ngTemplateOutletContext",le(15,Ue,le(13,tt,n.treeStructure()))),p(2),F(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null?10:-1),p(),F(n.enableCreateFolder()&&n.customRemoteMode()===null?11:-1),p(),B("hidden",n.pathDiscoveryMethod()!=="path"),p(5),F(n.createFolderDialogOpen()?17:-1)}},dependencies:[ce,Le,We,De,J,Ae,Be,we,Re,H,G,z,j],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;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].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 Ot=[[["label"]],[["","prefix",""]],[["","suffix",""]]],vt=["label","[prefix]","[suffix]"];function Ft(r,t){if(r&1&&P(0),r&2){let e=t.$implicit,n=_();re("",e.label,"",n.hasPerSecond()?"/s":"")}}var yt=["throttle-upload","throttle-download"],xt=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Rt=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"}},qe=class r{customId=m();inputType=m();timespan=C(0);unit=C("MB");sizeOptions=C(xt);readonly=C(!1);hasPerSecond=O(()=>{let t=this.inputType();return t&&yt.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Rt(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=W({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:vt,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&&(V(Ot),a(0,"div",0),S(1,0,["ngProjectAs","label",5,["label"]]),d(),a(2,"sh-form-field")(3,"input",1),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(4,1),S(5,2),d(),a(6,"sh-select",2)(7,"input",3),w("ngModelChange",function(o){return D(n.unit,o)||(n.unit=o),o}),d(),X(8,Ft,1,2,"ng-template"),d()),e&2&&(p(2),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),oe("--miw",0),T("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),p(),R("ngModel",n.unit))},dependencies:[$e,J,H,G,de,z,j],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 Dt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],wt=["label","[prefix]","[suffix]"];function It(r,t){if(r&1){let e=L();a(0,"button",7),A("click",function(){let i=b(e).$implicit,o=_();return N(o.updateUnit(i.value))}),x(1,1),d()}if(r&2){let e=t.$implicit;p(),q(e.label),K(1)}}var Lt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],At=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],kt=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],Ke=class r{customId=m();inputType=m();timespan=C(0);#e="D";unit=C(this.#e);unitLabel=O(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=O(()=>{let t=this.inputType();return t&&kt.includes(t.replace("--",""))});timeOptions=O(()=>this.isShortTime()?Lt:At);readonly=C(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=y(()=>{this.onChange(this.getValue())});inputTypeEffect=y(()=>{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=W({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[se([{provide:ae,useExisting:r,multi:!0}])],ngContentSelectors:wt,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&&(V(Dt),S(0,0,["ngProjectAs","label",5,["label"]]),a(1,"sh-form-field")(2,"input",2),w("ngModelChange",function(o){return D(n.timespan,o)||(n.timespan=o),o}),d(),S(3,1),S(4,2),d(),a(5,"sh-menu",3)(6,"button",4),x(7,0),d(),Te(8,5),te(9,It,2,1,"button",6,Ee),Pe(),d()),e&2&&(p(),ee("readonly",n.readonly()||void 0),p(),T("id",n.customId()),R("ngModel",n.timespan),T("disabled",n.readonly()),p(3),T("openIndicator",!0),p(2),q(n.unitLabel()),K(7),p(2),ne(n.timeOptions()))},dependencies:[ke,J,H,G,de,z,j,ce],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{he as a,Rt as b,qe as c,Ke as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Qc as f,Rc as w,S as d,Tc as x,Uc as h,_ as v,ha as y,i as m,ja as l,pa as b,ra as D}from"./chunk-NFXXT6A3.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(o,e){let s=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=o()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:s,manualCleanup:!0});return s.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(o,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=o.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(o=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&o(e.value,s.value)}function U(o){return x(p(g({},o),{loader:void 0,stream:e=>{let s,n=()=>s?.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=o.stream??o.loader;if(r===void 0)throw new d(990,!1);return s=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{a as dn}from"./chunk-ZK3S23CJ.js";import{a as Tn}from"./chunk-GO22QPW4.js";import"./chunk-FMDSOHVR.js";import"./chunk-NBKLLQQO.js";import{c as _e,l as Cn}from"./chunk-OBF6ZSYT.js";import{b as un}from"./chunk-I625OICV.js";import{a as sn}from"./chunk-XCVBN7EK.js";import"./chunk-ADB5QRUO.js";import"./chunk-22PELS6R.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MRSBKQQM.js";import{a as Fn}from"./chunk-7FDLOZXV.js";import"./chunk-EQNDYV43.js";import"./chunk-35APLYI4.js";import{a as rn}from"./chunk-LU7TIW3P.js";import"./chunk-YMUS7QSB.js";import"./chunk-ZXQSQRKN.js";import"./chunk-XZNYCTQB.js";import"./chunk-R6TFME5I.js";import"./chunk-AZRNX5LU.js";import{A as Ze,B as oe,C as en,E as nn,G as tn,K as on,L as _n,S as an,T as ln,v as ie,z as Ye}from"./chunk-NCXKMSRH.js";import{d as cn}from"./chunk-QAQMMCTH.js";import{e as te}from"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{$b as l,Ab as V,Bb as U,Bc as j,Cb as E,Cc as $,Db as o,Eb as i,F as q,Fb as C,Gc as D,Hc as G,Ic as A,Jb as N,Kb as M,Kc as ee,Lb as f,Mb as R,Pa as J,Rc as ne,Sa as a,Tb as s,Ub as u,Vb as d,Wb as x,Xb as H,Yb as K,Zb as I,_ as L,da as m,ea as O,gb as We,ic as W,kc as h,lb as P,mb as je,nc as T,pa as k,pc as S,ra as Ke,sc as Q,tb as qe,tc as Y,ub as Qe,uc as Z,wb as p,xb as g,yb as z}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";var pn=()=>[te,import("./chunk-VGBTP4QP.js").then(e=>e.NgTemplateOutlet),oe,ie,nn,ln,an,import("./chunk-YPWKWP5H.js").then(e=>e.BackupProgressComponent),import("./chunk-TJNL6F5S.js").then(e=>e.DurationFormatPipe),import("./chunk-QUXPHHDZ.js").then(e=>e.BytesPipe),import("./chunk-Y3BYCXUX.js").then(e=>e.RelativeTimePipe)],gn=()=>["/add-backup"],Sn=()=>["/restore"],En=e=>({$implicit:e}),mn=()=>["/backup/new"],On=e=>["/backup",e],Nn=e=>["/restore",e],Mn=e=>["/backup",e,"export"],In=e=>["/backup",e,"delete"],Pn=e=>["/backup",e,"database"],Dn=e=>["/backup",e,"commandline"],fn=e=>["/backup",e,"log"];function $n(e,t){e&1&&d(0,11,1)}function Rn(e,t){e&1&&d(0,11,2)}function hn(e,t){if(e&1&&d(0,11,3),e&2){let n=l(2);x(n.timeType()),H(0)}}function An(e,t){if(e&1){let n=R();o(0,"button",64),I("click",function(){let r=m(n).$implicit,F=l(3);return O(F.sortByColumn.set(r.value))}),d(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);h("active",_.orderBy()===n.value),a(),x(n.label),H(1)}}function Ln(e,t){if(e&1&&(o(0,"sh-menu",61)(1,"button",62),s(2,14),C(3,"strong")(4,"sh-icon"),u(),i(),N(5,63),V(6,An,2,3,"button",65,z),M(),i()),e&2){let n=l(2);a(4),x(n.orderBy()),H(2),a(2),U(n.sortOrderOptions())}}function xn(e,t){if(e&1){let n=R();o(0,"div",57)(1,"sh-button-group",58),Z("valueChange",function(r){m(n);let F=l();return Y(F.viewMode,r)||(F.viewMode=r),O(r)}),o(2,"button",59),s(3,9),C(4,"sh-icon"),u(),i(),o(5,"button",60),s(6,10),C(7,"sh-icon"),u(),i()(),o(8,"sh-menu",61)(9,"button",62),s(10,11),o(11,"strong"),p(12,$n,1,0)(13,Rn,1,0)(14,hn,1,1),i(),C(15,"sh-icon"),u(),i(),N(16,63),o(17,"button",64),I("click",function(){m(n);let r=l();return O(r.setTimeType("relative"))}),d(18,12),i(),o(19,"button",64),I("click",function(){m(n);let r=l();return O(r.setTimeType("actual"))}),d(20,13),i(),M(),i(),p(21,Ln,8,1,"sh-menu",61),i()}if(e&2){let n=l();a(),Q("value",n.viewMode),a(11),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function Hn(e,t){if(e&1){let n=R();o(0,"div",70)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()()(),o(7,"div",73)(8,"sh-chip",74),d(9,16),i()(),o(10,"div",57)(11,"button",75),I("click",function(){m(n);let r=l().$implicit,F=l(4);return O(F.openInConsole(r))}),s(12,17),C(13,"sh-icon"),u(),i()(),C(14,"app-backup-progress",76),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),E("backupId",n.Backup.ID)}}function kn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,23),i(),T(3),D(4,"relativeTime"),i()),e&2){let n=l(3).$implicit,_=l(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Gn(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function yn(e,t){e&1&&(N(0),T(1,"-"),M())}function Bn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function bn(e,t){e&1&&(N(0),T(1,"-"),M())}function vn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function wn(e,t){e&1&&(N(0),T(1,"-"),M())}function Xn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,19),i(),T(3),D(4,"relativeTime"),i(),p(5,kn,5,4,"p"),o(6,"p")(7,"span"),d(8,20),i(),p(9,Gn,2,4)(10,yn,2,0,"ng-container"),i(),o(11,"p")(12,"span"),d(13,21),i(),p(14,Bn,2,3)(15,bn,2,0,"ng-container"),i(),o(16,"p")(17,"span"),d(18,22),i(),p(19,vn,2,3)(20,wn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",A(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?5:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?9:10),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?14:15),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?19:20)}}function Jn(e,t){if(e&1&&C(0,"app-backup-progress",76),e&2){let n=l(2).$implicit;E("backupId",n.Backup.ID)}}function zn(e,t){e&1&&(o(0,"sh-chip",74),d(1,24),i())}function Vn(e,t){e&1&&f(0)}function Un(e,t){if(e&1&&(o(0,"div",71)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()(),p(7,Xn,21,8)(8,Jn,1,1,"app-backup-progress",76),i(),o(9,"div",73)(10,"sh-chip",77),d(11,18),i(),p(12,zn,2,0,"sh-chip",74),i(),o(13,"div",57),P(14,Vn,1,0,"ng-container",78),i()()),e&2){let n=l().$implicit,_=l(4),r=W(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let F=_.getBackupVersionCount(n);a(4),x(F)(F),H(11),a(),g(n.Backup.ExternalID?12:-1),a(2),E("ngTemplateOutlet",r)("ngTemplateOutletContext",$(9,En,n))}}function Kn(e,t){if(e&1&&p(0,Hn,15,4,"div",70)(1,Un,15,11,"div",71),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function Wn(e,t){if(e&1&&V(0,Kn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function jn(e,t){e&1&&(o(0,"div",69),s(1,25),o(2,"button",79),C(3,"sh-icon"),i(),u(),i()),e&2&&(a(2),E("routerLink",j(1,mn)))}function qn(e,t){if(e&1&&(o(0,"div",68),p(1,Wn,2,0)(2,jn,4,2,"div",69),i()),e&2){let n=l(2);h("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function Qn(e,t){e&1&&(s(0,26,1),f(1),u())}function Yn(e,t){e&1&&(s(0,27,1),f(1),u())}function Zn(e,t){e&1&&(s(0,28,1),f(1),u())}function et(e,t){e&1&&(s(0,29,1),f(1),u())}function nt(e,t){e&1&&(s(0,30,1),f(1),u())}function tt(e,t){e&1&&(s(0,31,1),f(1),u())}function it(e,t){e&1&&(s(0,32,1),f(1),u())}function ot(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function _t(e,t){e&1&&(N(0),T(1,"-"),M())}function at(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function lt(e,t){e&1&&(N(0),T(1,"-"),M())}function ct(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function rt(e,t){e&1&&(N(0),T(1,"-"),M())}function st(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function ut(e,t){e&1&&(N(0),T(1,"-"),M())}function Ft(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Ct(e,t){e&1&&(N(0),T(1,"-"),M())}function Tt(e,t){e&1&&f(0)}function dt(e,t){if(e&1&&(o(0,"tr")(1,"td"),T(2),i(),o(3,"td")(4,"sh-chip",90),C(5,"img",72),T(6),i()(),o(7,"td"),p(8,ot,2,4)(9,_t,2,0,"ng-container"),i(),o(10,"td"),p(11,at,2,4)(12,lt,2,0,"ng-container"),i(),o(13,"td"),p(14,ct,2,4)(15,rt,2,0,"ng-container"),i(),o(16,"td"),p(17,st,2,3)(18,ut,2,0,"ng-container"),i(),o(19,"td"),p(20,Ft,2,3)(21,Ct,2,0,"ng-container"),i(),o(22,"td")(23,"span"),d(24,35),i()(),o(25,"td"),P(26,Tt,1,0,"ng-container",78),i()()),e&2){let n=t.$implicit,_=l(3),r=W(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let F=_.getBackupVersionCount(n);a(4),x(F)(F),H(24),a(2),E("ngTemplateOutlet",r)("ngTemplateOutletContext",$(12,En,n))}}function Et(e,t){if(e&1){let n=R();o(0,"sh-table",80),Z("sortByColumnChange",function(r){m(n);let F=l(2);return Y(F.sortByColumn,r)||(F.sortByColumn=r),O(r)}),o(1,"tr",81)(2,"th",82),s(3,26),P(4,Qn,2,0,"ng-container",83),u(),i(),o(5,"th",84),s(6,27),P(7,Yn,2,0,"ng-container",83),u(),i(),o(8,"th",85),s(9,28),P(10,Zn,2,0,"ng-container",83),u(),i(),o(11,"th",86),s(12,29),P(13,et,2,0,"ng-container",83),u(),i(),o(14,"th",87),s(15,30),P(16,nt,2,0,"ng-container",83),u(),i(),o(17,"th",88),s(18,31),P(19,tt,2,0,"ng-container",83),u(),i(),o(20,"th",89),s(21,32),P(22,it,2,0,"ng-container",83),u(),i(),o(23,"th"),d(24,33),i(),o(25,"th"),d(26,34),i()(),V(27,dt,27,14,"tr",null,z),i()}if(e&2){let n=l(2),_=W(35);E("data",n.backups())("loading",n.backupsLoading()),Q("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),U(n.backups())}}function pt(e,t){if(e&1&&p(0,qn,3,3,"div",66)(1,Et,29,10,"sh-table",67),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function gt(e,t){e&1&&(o(0,"div",91),C(1,"sh-progress-bar",92),o(2,"div",53)(3,"h3"),d(4,36),i()()())}function St(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l(3);return O(r.abort())}),s(1,38),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function mt(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l(3);return O(r.stop())}),s(1,39),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function Ot(e,t){e&1&&(s(0,37,1),C(1,"sh-icon"),u())}function Nt(e,t){e&1&&(s(0,37,2),C(1,"sh-icon"),u())}function Mt(e,t){if(e&1){let n=R();p(0,St,3,2,"button",93)(1,mt,3,2,"button",93),o(2,"button",94),I("click",function(){m(n);let r=l(2);return O(r.pauseResume())}),s(3,37),p(4,Ot,2,0)(5,Nt,2,0),u(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),h("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function It(e,t){e&1&&d(0,40,1)}function Pt(e,t){e&1&&(o(0,"sh-icon"),T(1,"check"),i())}function Dt(e,t){e&1&&(o(0,"sh-icon"),T(1,"dots-three-vertical"),i())}function ft(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.startBackup(r.Backup.ID))}),s(1,40),C(2,"sh-icon"),p(3,It,1,0),u(),i(),o(4,"button",95)(5,"sh-icon"),T(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",96),p(9,Pt,2,0,"sh-icon")(10,Dt,2,0,"sh-icon"),i(),N(11,63),o(12,"h3",97),T(13,"Operations"),i(),o(14,"button",98),s(15,41),C(16,"sh-icon"),u(),i(),o(17,"button",98),s(18,42),C(19,"sh-icon"),u(),i(),o(20,"button",98),s(21,43),C(22,"sh-icon"),u(),i(),C(23,"sh-divider"),o(24,"h3",97),d(25,44),i(),o(26,"button",98),s(27,45),C(28,"sh-icon"),u(),i(),o(29,"button",64),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.verifyFiles(r.Backup.ID))}),s(30,46),C(31,"sh-icon"),u(),i(),o(32,"button",64),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.compressBackup(r.Backup.ID))}),s(33,47),C(34,"sh-icon"),u(),i(),o(35,"button",98),s(36,48),C(37,"sh-icon"),u(),i(),C(38,"sh-divider"),o(39,"h3",97),d(40,49),i(),o(41,"button",98),s(42,50),C(43,"sh-icon"),u(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();h("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,On,n.Backup.ID)),a(4),h("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,Nn,n.Backup.ID)),a(3),E("routerLink",$(19,Mn,n.Backup.ID)),a(3),E("routerLink",$(21,In,n.Backup.ID)),a(6),E("routerLink",$(23,Pn,n.Backup.ID)),a(9),E("routerLink",$(25,Dn,n.Backup.ID)),a(6),E("routerLink",$(27,fn,n.Backup.ID))}}function $t(e,t){if(e&1&&p(0,Mt,6,6)(1,ft,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function Rt(e,t){e&1&&(o(0,"sh-icon",99),T(1,"funnel-simple"),i(),o(2,"sh-icon",100),T(3,"sort-ascending"),i(),o(4,"sh-icon",101),T(5,"sort-descending"),i())}var ht={file:{Display:$localize`Local`,Icon:null}},ae=class e{#t=L(cn);#n=L(un);#e=L(sn);#o=L(Fn);#_=L(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=ne(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=ne(()=>this.runningTask()==this.#i());#i=k(-1);viewMode=rn("viewMode","list");sortByColumn=k(this.#e.orderBy());loadingId=k(null);successId=k(null);sortEffect=Ke(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#_.open(Tn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?_e(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=_e(t);if(!n)return"";let _=ht[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let r="http://null?"+t.split("?")[1],y=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,b]of Object.entries(Cn))if(y.endsWith(B))return b}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=We({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let r;r=$localize`Restores`;let F;F=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$localize`My backups`;let b;b=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let le;le=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ce;ce=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let re;re=$localize`Relative time`;let se;se=$localize`Actual time`;let ue;ue=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Fe;Fe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Ce;Ce=$localize`Externally managed`;let Te;Te=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let de;de=$localize` ${v}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Last successful backup:`;let pe;pe=$localize`Duration:`;let ge;ge=$localize`Source:`;let Se;Se=$localize`Destination:`;let me;me=$localize`Next scheduled run:`;let Oe;Oe=$localize`Externally managed`;let Ne;Ne=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let Me;Me=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Pe;Pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let De;De=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let fe;fe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let $e;$e=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Re;Re=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let he;he=$localize`Version`;let Ae;Ae=$localize`Actions`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=K(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Le;Le=$localize` ${w}:ICU@@3521773141017690117: `;let xe;xe=$localize`Loading backups...`;let X;X=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,X=K(X);let He;He=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Ge;Ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let ye;ye=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Be;Be=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let be;be=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let ve;ve=$localize`Advanced`;let we;we=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Xe;Xe=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Je;Je=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ze;ze=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Ve;Ve=$localize`Reporting`;let Ue;return Ue=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,r,F,y,B,b,le,ce,re,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,Ae,Le,xe,X,He,ke,Ge,ye,Be,be,ve,we,Xe,Je,ze,Ve,Ue,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["type","button","shButton",""],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(4,"img",52),o(5,"div",53)(6,"h3"),d(7,2),i(),o(8,"p"),d(9,3),i()(),o(10,"button",54),s(11,4),C(12,"sh-icon"),u(),i()(),o(13,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(14,"img",55),o(15,"div",53)(16,"h3"),d(17,5),i(),o(18,"p"),d(19,6),i()(),o(20,"button",54),s(21,7),C(22,"sh-icon"),u(),i()()(),o(23,"div",56)(24,"h2"),N(25),d(26,8),M(),p(27,xn,22,3,"div",57),i(),je(28,pt,2,1)(29,gt,5,0),qe(30,28,pn,null,29),i()(),P(32,$t,2,1,"ng-template",null,0,ee)(34,Rt,6,0,"ng-template",null,1,ee)),n&2&&(a(3),E("routerLink",j(4,gn)),a(10),E("routerLink",j(5,Sn)),a(14),g(_.backups().length>0?27:-1),a(3),Qe(!_.backupsLoading()))},dependencies:[te,dn,en,oe,ie,tn,on,_n,Ze],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ae as default};
|
|
1
|
+
import{a as dn}from"./chunk-TMS3I5A2.js";import{a as Tn}from"./chunk-TSDCJYMP.js";import"./chunk-NXEMSNQO.js";import"./chunk-V6U75SVY.js";import{c as _e,l as Cn}from"./chunk-SRILTSQM.js";import{b as un}from"./chunk-54IBJBVK.js";import{a as sn}from"./chunk-VOHSRCTH.js";import"./chunk-SDKAVOP6.js";import"./chunk-KDWGBKDI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-FHH444ZI.js";import{a as Fn}from"./chunk-S36F6ZJZ.js";import"./chunk-AC34YYIW.js";import"./chunk-5TT43ERP.js";import{a as rn}from"./chunk-Y3LMRA5G.js";import"./chunk-PAXRIMTV.js";import"./chunk-J6OYVDRR.js";import"./chunk-OMOPTBR2.js";import"./chunk-O6ZQRIZA.js";import"./chunk-MZAGGSG2.js";import{A as Ze,B as oe,C as en,E as nn,G as tn,K as on,L as _n,S as an,T as ln,v as ie,z as Ye}from"./chunk-E3UAEGAI.js";import{d as cn}from"./chunk-4KFQXVKU.js";import{e as te}from"./chunk-G5IUH2UI.js";import"./chunk-AAUAZ76N.js";import"./chunk-7BK2K5ML.js";import"./chunk-GIITUFAQ.js";import"./chunk-MI3BETEH.js";import{$b as l,Ab as V,Bb as U,Bc as j,Cb as E,Cc as $,Db as o,Eb as i,F as q,Fb as C,Gc as D,Hc as G,Ic as A,Jb as N,Kb as M,Kc as ee,Lb as f,Mb as R,Pa as J,Rc as ne,Sa as a,Tb as s,Ub as u,Vb as d,Wb as x,Xb as H,Yb as K,Zb as I,_ as L,da as m,ea as O,gb as We,ic as W,kc as h,lb as P,mb as je,nc as T,pa as k,pc as S,ra as Ke,sc as Q,tb as qe,tc as Y,ub as Qe,uc as Z,wb as p,xb as g,yb as z}from"./chunk-NFXXT6A3.js";import"./chunk-7CGTOI24.js";var pn=()=>[te,import("./chunk-SXNQOAUJ.js").then(e=>e.NgTemplateOutlet),oe,ie,nn,ln,an,import("./chunk-ZJAQQH7X.js").then(e=>e.BackupProgressComponent),import("./chunk-V42HCQ3A.js").then(e=>e.DurationFormatPipe),import("./chunk-4U5P2NHK.js").then(e=>e.BytesPipe),import("./chunk-GNMIMW7D.js").then(e=>e.RelativeTimePipe)],gn=()=>["/add-backup"],Sn=()=>["/restore"],En=e=>({$implicit:e}),mn=()=>["/backup/new"],On=e=>["/backup",e],Nn=e=>["/restore",e],Mn=e=>["/backup",e,"export"],In=e=>["/backup",e,"delete"],Pn=e=>["/backup",e,"database"],Dn=e=>["/backup",e,"commandline"],fn=e=>["/backup",e,"log"];function $n(e,t){e&1&&d(0,11,1)}function Rn(e,t){e&1&&d(0,11,2)}function hn(e,t){if(e&1&&d(0,11,3),e&2){let n=l(2);x(n.timeType()),H(0)}}function An(e,t){if(e&1){let n=R();o(0,"button",64),I("click",function(){let r=m(n).$implicit,F=l(3);return O(F.sortByColumn.set(r.value))}),d(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);h("active",_.orderBy()===n.value),a(),x(n.label),H(1)}}function Ln(e,t){if(e&1&&(o(0,"sh-menu",61)(1,"button",62),s(2,14),C(3,"strong")(4,"sh-icon"),u(),i(),N(5,63),V(6,An,2,3,"button",65,z),M(),i()),e&2){let n=l(2);a(4),x(n.orderBy()),H(2),a(2),U(n.sortOrderOptions())}}function xn(e,t){if(e&1){let n=R();o(0,"div",57)(1,"sh-button-group",58),Z("valueChange",function(r){m(n);let F=l();return Y(F.viewMode,r)||(F.viewMode=r),O(r)}),o(2,"button",59),s(3,9),C(4,"sh-icon"),u(),i(),o(5,"button",60),s(6,10),C(7,"sh-icon"),u(),i()(),o(8,"sh-menu",61)(9,"button",62),s(10,11),o(11,"strong"),p(12,$n,1,0)(13,Rn,1,0)(14,hn,1,1),i(),C(15,"sh-icon"),u(),i(),N(16,63),o(17,"button",64),I("click",function(){m(n);let r=l();return O(r.setTimeType("relative"))}),d(18,12),i(),o(19,"button",64),I("click",function(){m(n);let r=l();return O(r.setTimeType("actual"))}),d(20,13),i(),M(),i(),p(21,Ln,8,1,"sh-menu",61),i()}if(e&2){let n=l();a(),Q("value",n.viewMode),a(11),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function Hn(e,t){if(e&1){let n=R();o(0,"div",70)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()()(),o(7,"div",73)(8,"sh-chip",74),d(9,16),i()(),o(10,"div",57)(11,"button",75),I("click",function(){m(n);let r=l().$implicit,F=l(4);return O(F.openInConsole(r))}),s(12,17),C(13,"sh-icon"),u(),i()(),C(14,"app-backup-progress",76),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),E("backupId",n.Backup.ID)}}function kn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,23),i(),T(3),D(4,"relativeTime"),i()),e&2){let n=l(3).$implicit,_=l(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Gn(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function yn(e,t){e&1&&(N(0),T(1,"-"),M())}function Bn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function bn(e,t){e&1&&(N(0),T(1,"-"),M())}function vn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function wn(e,t){e&1&&(N(0),T(1,"-"),M())}function Xn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,19),i(),T(3),D(4,"relativeTime"),i(),p(5,kn,5,4,"p"),o(6,"p")(7,"span"),d(8,20),i(),p(9,Gn,2,4)(10,yn,2,0,"ng-container"),i(),o(11,"p")(12,"span"),d(13,21),i(),p(14,Bn,2,3)(15,bn,2,0,"ng-container"),i(),o(16,"p")(17,"span"),d(18,22),i(),p(19,vn,2,3)(20,wn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",A(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?5:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?9:10),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?14:15),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?19:20)}}function Jn(e,t){if(e&1&&C(0,"app-backup-progress",76),e&2){let n=l(2).$implicit;E("backupId",n.Backup.ID)}}function zn(e,t){e&1&&(o(0,"sh-chip",74),d(1,24),i())}function Vn(e,t){e&1&&f(0)}function Un(e,t){if(e&1&&(o(0,"div",71)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()(),p(7,Xn,21,8)(8,Jn,1,1,"app-backup-progress",76),i(),o(9,"div",73)(10,"sh-chip",77),d(11,18),i(),p(12,zn,2,0,"sh-chip",74),i(),o(13,"div",57),P(14,Vn,1,0,"ng-container",78),i()()),e&2){let n=l().$implicit,_=l(4),r=W(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let F=_.getBackupVersionCount(n);a(4),x(F)(F),H(11),a(),g(n.Backup.ExternalID?12:-1),a(2),E("ngTemplateOutlet",r)("ngTemplateOutletContext",$(9,En,n))}}function Kn(e,t){if(e&1&&p(0,Hn,15,4,"div",70)(1,Un,15,11,"div",71),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function Wn(e,t){if(e&1&&V(0,Kn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function jn(e,t){e&1&&(o(0,"div",69),s(1,25),o(2,"button",79),C(3,"sh-icon"),i(),u(),i()),e&2&&(a(2),E("routerLink",j(1,mn)))}function qn(e,t){if(e&1&&(o(0,"div",68),p(1,Wn,2,0)(2,jn,4,2,"div",69),i()),e&2){let n=l(2);h("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function Qn(e,t){e&1&&(s(0,26,1),f(1),u())}function Yn(e,t){e&1&&(s(0,27,1),f(1),u())}function Zn(e,t){e&1&&(s(0,28,1),f(1),u())}function et(e,t){e&1&&(s(0,29,1),f(1),u())}function nt(e,t){e&1&&(s(0,30,1),f(1),u())}function tt(e,t){e&1&&(s(0,31,1),f(1),u())}function it(e,t){e&1&&(s(0,32,1),f(1),u())}function ot(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function _t(e,t){e&1&&(N(0),T(1,"-"),M())}function at(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function lt(e,t){e&1&&(N(0),T(1,"-"),M())}function ct(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function rt(e,t){e&1&&(N(0),T(1,"-"),M())}function st(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function ut(e,t){e&1&&(N(0),T(1,"-"),M())}function Ft(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Ct(e,t){e&1&&(N(0),T(1,"-"),M())}function Tt(e,t){e&1&&f(0)}function dt(e,t){if(e&1&&(o(0,"tr")(1,"td"),T(2),i(),o(3,"td")(4,"sh-chip",90),C(5,"img",72),T(6),i()(),o(7,"td"),p(8,ot,2,4)(9,_t,2,0,"ng-container"),i(),o(10,"td"),p(11,at,2,4)(12,lt,2,0,"ng-container"),i(),o(13,"td"),p(14,ct,2,4)(15,rt,2,0,"ng-container"),i(),o(16,"td"),p(17,st,2,3)(18,ut,2,0,"ng-container"),i(),o(19,"td"),p(20,Ft,2,3)(21,Ct,2,0,"ng-container"),i(),o(22,"td")(23,"span"),d(24,35),i()(),o(25,"td"),P(26,Tt,1,0,"ng-container",78),i()()),e&2){let n=t.$implicit,_=l(3),r=W(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let F=_.getBackupVersionCount(n);a(4),x(F)(F),H(24),a(2),E("ngTemplateOutlet",r)("ngTemplateOutletContext",$(12,En,n))}}function Et(e,t){if(e&1){let n=R();o(0,"sh-table",80),Z("sortByColumnChange",function(r){m(n);let F=l(2);return Y(F.sortByColumn,r)||(F.sortByColumn=r),O(r)}),o(1,"tr",81)(2,"th",82),s(3,26),P(4,Qn,2,0,"ng-container",83),u(),i(),o(5,"th",84),s(6,27),P(7,Yn,2,0,"ng-container",83),u(),i(),o(8,"th",85),s(9,28),P(10,Zn,2,0,"ng-container",83),u(),i(),o(11,"th",86),s(12,29),P(13,et,2,0,"ng-container",83),u(),i(),o(14,"th",87),s(15,30),P(16,nt,2,0,"ng-container",83),u(),i(),o(17,"th",88),s(18,31),P(19,tt,2,0,"ng-container",83),u(),i(),o(20,"th",89),s(21,32),P(22,it,2,0,"ng-container",83),u(),i(),o(23,"th"),d(24,33),i(),o(25,"th"),d(26,34),i()(),V(27,dt,27,14,"tr",null,z),i()}if(e&2){let n=l(2),_=W(35);E("data",n.backups())("loading",n.backupsLoading()),Q("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),U(n.backups())}}function pt(e,t){if(e&1&&p(0,qn,3,3,"div",66)(1,Et,29,10,"sh-table",67),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function gt(e,t){e&1&&(o(0,"div",91),C(1,"sh-progress-bar",92),o(2,"div",53)(3,"h3"),d(4,36),i()()())}function St(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l(3);return O(r.abort())}),s(1,38),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function mt(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l(3);return O(r.stop())}),s(1,39),C(2,"sh-icon"),u(),i()}if(e&2){let n=l(3);h("small",n.viewMode()==="details")}}function Ot(e,t){e&1&&(s(0,37,1),C(1,"sh-icon"),u())}function Nt(e,t){e&1&&(s(0,37,2),C(1,"sh-icon"),u())}function Mt(e,t){if(e&1){let n=R();p(0,St,3,2,"button",93)(1,mt,3,2,"button",93),o(2,"button",94),I("click",function(){m(n);let r=l(2);return O(r.pauseResume())}),s(3,37),p(4,Ot,2,0)(5,Nt,2,0),u(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),h("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function It(e,t){e&1&&d(0,40,1)}function Pt(e,t){e&1&&(o(0,"sh-icon"),T(1,"check"),i())}function Dt(e,t){e&1&&(o(0,"sh-icon"),T(1,"dots-three-vertical"),i())}function ft(e,t){if(e&1){let n=R();o(0,"button",94),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.startBackup(r.Backup.ID))}),s(1,40),C(2,"sh-icon"),p(3,It,1,0),u(),i(),o(4,"button",95)(5,"sh-icon"),T(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",96),p(9,Pt,2,0,"sh-icon")(10,Dt,2,0,"sh-icon"),i(),N(11,63),o(12,"h3",97),T(13,"Operations"),i(),o(14,"button",98),s(15,41),C(16,"sh-icon"),u(),i(),o(17,"button",98),s(18,42),C(19,"sh-icon"),u(),i(),o(20,"button",98),s(21,43),C(22,"sh-icon"),u(),i(),C(23,"sh-divider"),o(24,"h3",97),d(25,44),i(),o(26,"button",98),s(27,45),C(28,"sh-icon"),u(),i(),o(29,"button",64),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.verifyFiles(r.Backup.ID))}),s(30,46),C(31,"sh-icon"),u(),i(),o(32,"button",64),I("click",function(){m(n);let r=l().$implicit,F=l();return O(F.compressBackup(r.Backup.ID))}),s(33,47),C(34,"sh-icon"),u(),i(),o(35,"button",98),s(36,48),C(37,"sh-icon"),u(),i(),C(38,"sh-divider"),o(39,"h3",97),d(40,49),i(),o(41,"button",98),s(42,50),C(43,"sh-icon"),u(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();h("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),E("routerLink",$(15,On,n.Backup.ID)),a(4),h("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",$(17,Nn,n.Backup.ID)),a(3),E("routerLink",$(19,Mn,n.Backup.ID)),a(3),E("routerLink",$(21,In,n.Backup.ID)),a(6),E("routerLink",$(23,Pn,n.Backup.ID)),a(9),E("routerLink",$(25,Dn,n.Backup.ID)),a(6),E("routerLink",$(27,fn,n.Backup.ID))}}function $t(e,t){if(e&1&&p(0,Mt,6,6)(1,ft,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function Rt(e,t){e&1&&(o(0,"sh-icon",99),T(1,"funnel-simple"),i(),o(2,"sh-icon",100),T(3,"sort-ascending"),i(),o(4,"sh-icon",101),T(5,"sort-descending"),i())}var ht={file:{Display:$localize`Local`,Icon:null}},ae=class e{#t=L(cn);#n=L(un);#e=L(sn);#o=L(Fn);#_=L(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=ne(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=ne(()=>this.runningTask()==this.#i());#i=k(-1);viewMode=rn("viewMode","list");sortByColumn=k(this.#e.orderBy());loadingId=k(null);successId=k(null);sortEffect=Ke(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#_.open(Tn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?_e(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=_e(t);if(!n)return"";let _=ht[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let r="http://null?"+t.split("?")[1],y=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,b]of Object.entries(Cn))if(y.endsWith(B))return b}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=We({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let r;r=$localize`Restores`;let F;F=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$localize`My backups`;let b;b=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let le;le=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ce;ce=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let re;re=$localize`Relative time`;let se;se=$localize`Actual time`;let ue;ue=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Fe;Fe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Ce;Ce=$localize`Externally managed`;let Te;Te=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let de;de=$localize` ${v}:ICU@@6502601490918455200: `;let Ee;Ee=$localize`Last successful backup:`;let pe;pe=$localize`Duration:`;let ge;ge=$localize`Source:`;let Se;Se=$localize`Destination:`;let me;me=$localize`Next scheduled run:`;let Oe;Oe=$localize`Externally managed`;let Ne;Ne=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let Me;Me=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ie;Ie=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Pe;Pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let De;De=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let fe;fe=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let $e;$e=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Re;Re=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let he;he=$localize`Version`;let Ae;Ae=$localize`Actions`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=K(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Le;Le=$localize` ${w}:ICU@@3521773141017690117: `;let xe;xe=$localize`Loading backups...`;let X;X=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,X=K(X);let He;He=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Ge;Ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let ye;ye=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let Be;Be=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let be;be=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let ve;ve=$localize`Advanced`;let we;we=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Xe;Xe=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Je;Je=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let ze;ze=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Ve;Ve=$localize`Reporting`;let Ue;return Ue=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,r,F,y,B,b,le,ce,re,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,Ae,Le,xe,X,He,ke,Ge,ye,Be,be,ve,we,Xe,Je,ze,Ve,Ue,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["type","button","shButton",""],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(4,"img",52),o(5,"div",53)(6,"h3"),d(7,2),i(),o(8,"p"),d(9,3),i()(),o(10,"button",54),s(11,4),C(12,"sh-icon"),u(),i()(),o(13,"sh-card",51),I("keydown.enter",function(F){return F.target.click()})("keydown.space",function(F){return F.target.click()}),C(14,"img",55),o(15,"div",53)(16,"h3"),d(17,5),i(),o(18,"p"),d(19,6),i()(),o(20,"button",54),s(21,7),C(22,"sh-icon"),u(),i()()(),o(23,"div",56)(24,"h2"),N(25),d(26,8),M(),p(27,xn,22,3,"div",57),i(),je(28,pt,2,1)(29,gt,5,0),qe(30,28,pn,null,29),i()(),P(32,$t,2,1,"ng-template",null,0,ee)(34,Rt,6,0,"ng-template",null,1,ee)),n&2&&(a(3),E("routerLink",j(4,gn)),a(10),E("routerLink",j(5,Sn)),a(14),g(_.backups().length>0?27:-1),a(3),Qe(!_.backupsLoading()))},dependencies:[te,dn,en,oe,ie,tn,on,_n,Ze],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe}from"./chunk-M5RTYP7N.js";import"./chunk-HHDCI6IF.js";import{a as Ce}from"./chunk-GO22QPW4.js";import{a as pe,b as z}from"./chunk-I625OICV.js";import"./chunk-XCVBN7EK.js";import{a as ue}from"./chunk-ADB5QRUO.js";import"./chunk-22PELS6R.js";import"./chunk-6Q6SSTBK.js";import{a as me}from"./chunk-MRSBKQQM.js";import"./chunk-35APLYI4.js";import"./chunk-LU7TIW3P.js";import{b as ge}from"./chunk-XZNYCTQB.js";import"./chunk-R6TFME5I.js";import"./chunk-AZRNX5LU.js";import{B as se,C as le,J as ce,L as de,v as oe,z as re}from"./chunk-NCXKMSRH.js";import{d as _e}from"./chunk-QAQMMCTH.js";import"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import{T as ee,U as te,ha as ne,ma as ie,qa as ae}from"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{$b as g,Ab as K,Bb as Q,Cb as p,Db as e,Eb as t,Fb as I,Gc as _,Hc as C,Ic as E,Jb as Y,Kb as Z,Mb as B,Rc as L,Sa as r,V as X,Vb as S,Zb as h,_ as x,da as y,ea as b,fa as V,ga as j,gb as H,kc as G,lb as P,nc as o,oc as m,pa as N,pc as u,qc as $,ra as W,wb as D,xb as F,yb as q}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";var U=class s{#e=x(z);#n=x(ge);#i=N([]);recentFiles=this.#i.asReadonly();#r=5;#s=N(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=W(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#l(i.CurrentFilename,i.CurrentFilesize)});#l(i,n){let a=new Date;this.#i.update(l=>l.length>0&&l[0].filename===i?l:[{filename:i,filesize:n,timestamp:a},...l].slice(0,this.#r))}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#c()},1e3)}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null)}#c(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let n=new Date,a=(n.getTime()-this.#a.getTime())/1e3;if(a<5)return;let l=i.ProcessedFileCount||0,d=i.ProcessedFileSize||0,c=l-this.#t.files,k=d-this.#t.bytes,M=c/a,O=k/a,A=(i.TotalFileCount||0)-l,f=(i.TotalFileSize||0)-d,T=null,v=null;M>0&&(T=A/M),O>0&&(v=f/O);let R=null,w="bytes";if(T!==null&&v!==null){let Se=Math.max(T,v);R=new Date(n.getTime()+Se*1e3),w=T>v?"files":"bytes"}else T!==null?(R=new Date(n.getTime()+T*1e3),w="files"):v!==null&&(R=new Date(n.getTime()+v*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:M,currentBytesPerSecond:O,estimatedCompletion:R,metric:w})}static \u0275fac=function(n){return new(n||s)};static \u0275prov=X({token:s,factory:s.\u0275fac,providedIn:"root"})};function xe(s,i){if(s&1&&(e(0,"div",42)(1,"span",20),o(2,"Processing"),t(),e(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),o(6,"file"),t(),e(7,"div",45)(8,"span",46),o(9),t(),e(10,"span",47),o(11),_(12,"bytes"),t()()()()()),s&2){let n,a,l,d=g(2);r(8),p("title",(n=d.statusData())==null?null:n.CurrentFilename),r(),u(" ",(a=d.statusData())==null?null:a.CurrentFilename," "),r(2),m(C(12,3,(l=d.statusData())==null?null:l.CurrentFilesize))}}function Me(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function Oe(s,i){s&1&&(e(0,"div",36),S(1,2),t())}function Te(s,i){if(s&1&&(e(0,"sh-list")(1,"div",48)(2,"span",20),o(3,"ETA"),t(),e(4,"span",21),o(5),_(6,"date"),e(7,"span",49),o(8),_(9,"relativeTime"),t()()(),e(10,"div",50)(11,"span",20),o(12,"Files/s"),t(),e(13,"span",21),o(14),_(15,"number"),t()(),e(16,"div",50)(17,"span",20),o(18,"Upload Speed"),t(),e(19,"span",21),o(20),_(21,"bytes"),t()()()),s&2){let n,a,l,d,c=g(2);r(5),u(" ",E(6,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," "),r(3),u("(",C(9,7,(a=c.etaData())==null?null:a.estimatedCompletion),")"),r(6),m(E(15,9,(l=c.etaData())==null?null:l.currentFilesPerSecond,"1.1-1")),r(6),u("",C(21,12,(d=c.etaData())==null?null:d.currentBytesPerSecond),"/s")}}function ve(s,i){if(s&1&&(e(0,"div",53)(1,"div",54)(2,"span",55),o(3),t(),e(4,"span",56),o(5),_(6,"bytes"),t()(),I(7,"sh-progress-bar",57),t()),s&2){let n=i.$implicit;r(2),p("title",n.BackendPath),r(),m(n.BackendPath),r(2),u("",C(6,4,n.BackendSpeed),"/s"),r(2),p("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function he(s,i){if(s&1&&(e(0,"div",51)(1,"sh-list"),P(2,ve,8,6,"div",52),t()()),s&2){let n,a=g(2);r(2),p("ngForOf",(n=a.statusData())==null?null:n.ActiveTransfers)}}function Ee(s,i){if(s&1){let n=B();e(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock"),t(),e(5,"h2"),o(6),t()()(),e(7,"div",26)(8,"div",27)(9,"span",28),o(10),_(11,"number"),t()(),I(12,"sh-progress-bar",29),e(13,"sh-list")(14,"div",30)(15,"span",20),o(16,"Files"),t(),e(17,"span",21),o(18),t()(),e(19,"div",30)(20,"span",20),o(21,"Size"),t(),e(22,"span",21),o(23),_(24,"bytes"),_(25,"bytes"),t()()()()(),e(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),o(30,"file"),t(),e(31,"h3"),o(32,"Activity"),t()()(),e(33,"div",31),P(34,xe,13,5,"div",32),e(35,"div",33)(36,"span",20),S(37,1),t(),e(38,"sh-list",34),K(39,Me,6,5,"div",35,q),D(41,Oe,2,0,"div",36),t()()()(),e(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),o(46,"gauge"),t(),e(47,"h3"),o(48,"Performance"),t()(),e(49,"div",37),o(50),_(51,"bytes"),t()(),e(52,"div",38),P(53,Te,22,14,"sh-list",25),e(54,"div",39)(55,"button",40),h("click",function(){y(n);let l=g();return b(l.toggleTransfers())}),o(56),t(),P(57,he,3,1,"div",41),t()()()}if(s&2){let n,a,l,d,c=g();r(6),m(c.statusText()),r(4),u("",E(11,13,c.progress(),"1.0-0"),"%"),r(2),p("value",c.progress()),r(6),$("",(n=c.statusData())==null?null:n.ProcessedFileCount," / ",(n=c.statusData())==null?null:n.TotalFileCount),r(5),$(" ",C(24,16,(a=c.statusData())==null?null:a.ProcessedFileSize)," / ",C(25,18,(a=c.statusData())==null?null:a.TotalFileSize)," "),r(11),p("ngIf",(l=c.statusData())==null?null:l.CurrentFilename),r(5),Q(c.recentFiles()),r(2),F(c.recentFiles().length===0?41:-1),r(9),u("",C(51,20,(d=c.statusData())==null?null:d.BackendSpeed),"/s"),r(3),p("ngIf",c.etaData()),r(3),u(" ",c.transfersExpanded()?"Hide Details":"Show Details"," "),r(),p("ngIf",c.transfersExpanded())}}function ye(s,i){if(s&1&&(e(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"calendar"),t(),e(5,"h3"),S(6,7),t()()(),e(7,"div",76)(8,"div",77)(9,"span",78),o(10),t(),e(11,"div",79)(12,"span",80),o(13),_(14,"date"),t(),e(15,"span",81),o(16),_(17,"relativeTime"),t()()(),e(18,"sh-icon",82),o(19,"caret-right"),t()()()),s&2){let n,a=g(2);r(10),m((n=a.nextBackup().backup)==null?null:n.Name),r(3),m(E(14,3,a.nextBackup().time,"medium")),r(3),u("(",C(17,6,a.nextBackup().time),")")}}function be(s,i){s&1&&(e(0,"span",74),S(1,8),t())}function Ne(s,i){if(s&1){let n=B();e(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),V(),e(4,"svg",62),I(5,"circle",63),t(),j(),e(6,"sh-icon",64),S(7,3),t()()(),e(8,"div",65)(9,"h2"),S(10,4),t(),e(11,"p",66),S(12,5),t()(),e(13,"div",67)(14,"button",68),h("click",function(){y(n);let l=g();return b(l.pauseResume())}),e(15,"sh-icon"),o(16),t(),o(17),t()()()(),P(18,ye,20,8,"sh-card",69),e(19,"sh-card",70)(20,"div",71)(21,"span",20),S(22,6),t(),e(23,"div",72)(24,"span",73),o(25),t(),D(26,be,2,0,"span",74),t()()()}if(s&2){let n,a=g();r(14),p("variant",a.clientIsRunning()?"primary":"secondary"),r(2),m(a.clientIsRunning()?"pause":"play"),r(),u(" ",a.clientIsRunning()?"Pause Execution":"Resume Execution"," "),r(),p("ngIf",a.nextBackup()),r(6),G("running",a.clientIsRunning()),r(),m((n=a.serverState())==null?null:n.ProgramState),r(),F(a.clientIsRunning()?-1:26)}}function Ie(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function ke(s,i){if(s&1&&(e(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock-counter-clockwise"),t(),e(5,"h3"),S(6,9),t()()(),e(7,"sh-list"),P(8,Ie,6,5,"div",84),t()()),s&2){let n=g();r(8),p("ngForOf",n.recentFiles())}}function Ae(s,i){if(s&1&&(e(0,"div",19)(1,"span",20),o(2,"Next Task:"),t(),e(3,"div",21)(4,"div"),o(5),t(),e(6,"div",49),o(7),_(8,"date"),_(9,"relativeTime"),t()()()),s&2){let n,a=g();r(5),m((n=a.nextBackup().backup)==null?null:n.Name),r(2),$(" ",E(8,3,a.nextBackup().time,"medium")," (",C(9,6,a.nextBackup().time),") ")}}function Re(s,i){if(s&1){let n=B();Y(0),e(1,"button",85),h("click",function(){y(n);let l=g();return b(l.stop())}),e(2,"sh-icon"),o(3,"stop"),t(),o(4," Stop "),t(),e(5,"button",85),h("click",function(){y(n);let l=g();return b(l.abort())}),e(6,"sh-icon"),o(7,"x-circle"),t(),o(8," Abort "),t(),Z()}}var J=class s{#e=x(z);#n=x(U);#i=x(_e);#r=x(re);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=N(!1);clientIsRunning=this.#e.clientIsRunning;statusText=L(()=>{let i=this.statusData()?.Phase;return i?pe[i]||i:""});progress=L(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=L(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView()}ngOnDestroy(){this.#n.deactivateView()}toggleTransfers(){this.transfersExpanded.update(i=>!i)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(Ce,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe()}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=H({type:s,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let n;n=$localize`Recently Processed`;let a;a=$localize`No recent files`;let l;l=$localize`check-bold`;let d;d=$localize`System Ready`;let c;c=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let M;M=$localize`Next Scheduled Task`;let O;O=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,n,a,l,d,c,k,M,O,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small","variant","ghost",1,"toggle-btn",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","variant"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(n,a){if(n&1&&(e(0,"div",10),D(1,Ee,58,22)(2,Ne,27,8),P(3,ke,9,1,"sh-card",11),e(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),o(8,"list"),t(),e(9,"h3"),S(10,0),t()()(),e(11,"div",16),I(12,"app-logs-live",17),t()(),e(13,"sh-card")(14,"div",18)(15,"h3"),o(16,"Server Status"),t(),e(17,"div",19)(18,"span",20),o(19,"State:"),t(),e(20,"span",21),o(21),t()(),P(22,Ae,10,8,"div",22),e(23,"div",23)(24,"button",24),h("click",function(){return a.pauseResume()}),e(25,"sh-icon"),o(26),t(),o(27),t(),P(28,Re,9,0,"ng-container",25),t()()()()),n&2){let l,d;G("idle",!a.isTaskRunning()),r(),F(a.isTaskRunning()?1:2),r(2),p("ngIf",!a.isTaskRunning()&&a.recentFiles().length>0),r(9),p("polling",a.isTaskRunning())("whenFilter",(l=a.taskStartTime())==null?null:l.getTime())("backupIdFilter",a.currentBackupId()),r(9),m((d=a.serverState())==null?null:d.ProgramState),r(),p("ngIf",a.nextBackup()),r(4),m(a.clientIsRunning()?"pause":"play_arrow"),r(),u(" ",a.clientIsRunning()?"Pause":"Resume"," "),r(),p("ngIf",a.isTaskRunning())}},dependencies:[ae,ee,te,le,de,se,oe,fe,ce,ie,ne,me,ue],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"],changeDetection:0})};export{J as default};
|
|
1
|
+
import{a as fe}from"./chunk-C56RQYG4.js";import"./chunk-RZTMWVAA.js";import{a as Ce}from"./chunk-TSDCJYMP.js";import{a as pe,b as z}from"./chunk-54IBJBVK.js";import"./chunk-VOHSRCTH.js";import{a as ue}from"./chunk-SDKAVOP6.js";import"./chunk-KDWGBKDI.js";import"./chunk-6Q6SSTBK.js";import{a as me}from"./chunk-FHH444ZI.js";import"./chunk-5TT43ERP.js";import"./chunk-Y3LMRA5G.js";import{b as ge}from"./chunk-OMOPTBR2.js";import"./chunk-O6ZQRIZA.js";import"./chunk-MZAGGSG2.js";import{B as se,C as le,J as ce,L as de,v as oe,z as re}from"./chunk-E3UAEGAI.js";import{d as _e}from"./chunk-4KFQXVKU.js";import"./chunk-G5IUH2UI.js";import"./chunk-AAUAZ76N.js";import"./chunk-7BK2K5ML.js";import{T as ee,U as te,ha as ne,ma as ie,qa as ae}from"./chunk-GIITUFAQ.js";import"./chunk-MI3BETEH.js";import{$b as g,Ab as K,Bb as Q,Cb as p,Db as e,Eb as t,Fb as I,Gc as _,Hc as C,Ic as E,Jb as Y,Kb as Z,Mb as B,Rc as L,Sa as r,V as X,Vb as S,Zb as h,_ as x,da as y,ea as b,fa as V,ga as j,gb as H,kc as G,lb as P,nc as o,oc as m,pa as N,pc as u,qc as $,ra as W,wb as D,xb as F,yb as q}from"./chunk-NFXXT6A3.js";import"./chunk-7CGTOI24.js";var U=class s{#e=x(z);#n=x(ge);#i=N([]);recentFiles=this.#i.asReadonly();#r=5;#s=N(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=W(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#l(i.CurrentFilename,i.CurrentFilesize)});#l(i,n){let a=new Date;this.#i.update(l=>l.length>0&&l[0].filename===i?l:[{filename:i,filesize:n,timestamp:a},...l].slice(0,this.#r))}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#c()},1e3)}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null)}#c(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let n=new Date,a=(n.getTime()-this.#a.getTime())/1e3;if(a<5)return;let l=i.ProcessedFileCount||0,d=i.ProcessedFileSize||0,c=l-this.#t.files,k=d-this.#t.bytes,M=c/a,O=k/a,A=(i.TotalFileCount||0)-l,f=(i.TotalFileSize||0)-d,T=null,v=null;M>0&&(T=A/M),O>0&&(v=f/O);let R=null,w="bytes";if(T!==null&&v!==null){let Se=Math.max(T,v);R=new Date(n.getTime()+Se*1e3),w=T>v?"files":"bytes"}else T!==null?(R=new Date(n.getTime()+T*1e3),w="files"):v!==null&&(R=new Date(n.getTime()+v*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:M,currentBytesPerSecond:O,estimatedCompletion:R,metric:w})}static \u0275fac=function(n){return new(n||s)};static \u0275prov=X({token:s,factory:s.\u0275fac,providedIn:"root"})};function xe(s,i){if(s&1&&(e(0,"div",42)(1,"span",20),o(2,"Processing"),t(),e(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),o(6,"file"),t(),e(7,"div",45)(8,"span",46),o(9),t(),e(10,"span",47),o(11),_(12,"bytes"),t()()()()()),s&2){let n,a,l,d=g(2);r(8),p("title",(n=d.statusData())==null?null:n.CurrentFilename),r(),u(" ",(a=d.statusData())==null?null:a.CurrentFilename," "),r(2),m(C(12,3,(l=d.statusData())==null?null:l.CurrentFilesize))}}function Me(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function Oe(s,i){s&1&&(e(0,"div",36),S(1,2),t())}function Te(s,i){if(s&1&&(e(0,"sh-list")(1,"div",48)(2,"span",20),o(3,"ETA"),t(),e(4,"span",21),o(5),_(6,"date"),e(7,"span",49),o(8),_(9,"relativeTime"),t()()(),e(10,"div",50)(11,"span",20),o(12,"Files/s"),t(),e(13,"span",21),o(14),_(15,"number"),t()(),e(16,"div",50)(17,"span",20),o(18,"Upload Speed"),t(),e(19,"span",21),o(20),_(21,"bytes"),t()()()),s&2){let n,a,l,d,c=g(2);r(5),u(" ",E(6,4,(n=c.etaData())==null?null:n.estimatedCompletion,"mediumTime")," "),r(3),u("(",C(9,7,(a=c.etaData())==null?null:a.estimatedCompletion),")"),r(6),m(E(15,9,(l=c.etaData())==null?null:l.currentFilesPerSecond,"1.1-1")),r(6),u("",C(21,12,(d=c.etaData())==null?null:d.currentBytesPerSecond),"/s")}}function ve(s,i){if(s&1&&(e(0,"div",53)(1,"div",54)(2,"span",55),o(3),t(),e(4,"span",56),o(5),_(6,"bytes"),t()(),I(7,"sh-progress-bar",57),t()),s&2){let n=i.$implicit;r(2),p("title",n.BackendPath),r(),m(n.BackendPath),r(2),u("",C(6,4,n.BackendSpeed),"/s"),r(2),p("value",(n.BackendFileProgress||0)/(n.BackendFileSize||1)*100)}}function he(s,i){if(s&1&&(e(0,"div",51)(1,"sh-list"),P(2,ve,8,6,"div",52),t()()),s&2){let n,a=g(2);r(2),p("ngForOf",(n=a.statusData())==null?null:n.ActiveTransfers)}}function Ee(s,i){if(s&1){let n=B();e(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock"),t(),e(5,"h2"),o(6),t()()(),e(7,"div",26)(8,"div",27)(9,"span",28),o(10),_(11,"number"),t()(),I(12,"sh-progress-bar",29),e(13,"sh-list")(14,"div",30)(15,"span",20),o(16,"Files"),t(),e(17,"span",21),o(18),t()(),e(19,"div",30)(20,"span",20),o(21,"Size"),t(),e(22,"span",21),o(23),_(24,"bytes"),_(25,"bytes"),t()()()()(),e(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),o(30,"file"),t(),e(31,"h3"),o(32,"Activity"),t()()(),e(33,"div",31),P(34,xe,13,5,"div",32),e(35,"div",33)(36,"span",20),S(37,1),t(),e(38,"sh-list",34),K(39,Me,6,5,"div",35,q),D(41,Oe,2,0,"div",36),t()()()(),e(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),o(46,"gauge"),t(),e(47,"h3"),o(48,"Performance"),t()(),e(49,"div",37),o(50),_(51,"bytes"),t()(),e(52,"div",38),P(53,Te,22,14,"sh-list",25),e(54,"div",39)(55,"button",40),h("click",function(){y(n);let l=g();return b(l.toggleTransfers())}),o(56),t(),P(57,he,3,1,"div",41),t()()()}if(s&2){let n,a,l,d,c=g();r(6),m(c.statusText()),r(4),u("",E(11,13,c.progress(),"1.0-0"),"%"),r(2),p("value",c.progress()),r(6),$("",(n=c.statusData())==null?null:n.ProcessedFileCount," / ",(n=c.statusData())==null?null:n.TotalFileCount),r(5),$(" ",C(24,16,(a=c.statusData())==null?null:a.ProcessedFileSize)," / ",C(25,18,(a=c.statusData())==null?null:a.TotalFileSize)," "),r(11),p("ngIf",(l=c.statusData())==null?null:l.CurrentFilename),r(5),Q(c.recentFiles()),r(2),F(c.recentFiles().length===0?41:-1),r(9),u("",C(51,20,(d=c.statusData())==null?null:d.BackendSpeed),"/s"),r(3),p("ngIf",c.etaData()),r(3),u(" ",c.transfersExpanded()?"Hide Details":"Show Details"," "),r(),p("ngIf",c.transfersExpanded())}}function ye(s,i){if(s&1&&(e(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"calendar"),t(),e(5,"h3"),S(6,7),t()()(),e(7,"div",76)(8,"div",77)(9,"span",78),o(10),t(),e(11,"div",79)(12,"span",80),o(13),_(14,"date"),t(),e(15,"span",81),o(16),_(17,"relativeTime"),t()()(),e(18,"sh-icon",82),o(19,"caret-right"),t()()()),s&2){let n,a=g(2);r(10),m((n=a.nextBackup().backup)==null?null:n.Name),r(3),m(E(14,3,a.nextBackup().time,"medium")),r(3),u("(",C(17,6,a.nextBackup().time),")")}}function be(s,i){s&1&&(e(0,"span",74),S(1,8),t())}function Ne(s,i){if(s&1){let n=B();e(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),V(),e(4,"svg",62),I(5,"circle",63),t(),j(),e(6,"sh-icon",64),S(7,3),t()()(),e(8,"div",65)(9,"h2"),S(10,4),t(),e(11,"p",66),S(12,5),t()(),e(13,"div",67)(14,"button",68),h("click",function(){y(n);let l=g();return b(l.pauseResume())}),e(15,"sh-icon"),o(16),t(),o(17),t()()()(),P(18,ye,20,8,"sh-card",69),e(19,"sh-card",70)(20,"div",71)(21,"span",20),S(22,6),t(),e(23,"div",72)(24,"span",73),o(25),t(),D(26,be,2,0,"span",74),t()()()}if(s&2){let n,a=g();r(14),p("variant",a.clientIsRunning()?"primary":"secondary"),r(2),m(a.clientIsRunning()?"pause":"play"),r(),u(" ",a.clientIsRunning()?"Pause Execution":"Resume Execution"," "),r(),p("ngIf",a.nextBackup()),r(6),G("running",a.clientIsRunning()),r(),m((n=a.serverState())==null?null:n.ProgramState),r(),F(a.clientIsRunning()?-1:26)}}function Ie(s,i){if(s&1&&(e(0,"div",35)(1,"span",46),o(2),t(),e(3,"span",47),o(4),_(5,"bytes"),t()()),s&2){let n=i.$implicit;r(),p("title",n.filename),r(),m(n.filename),r(2),m(C(5,3,n.filesize))}}function ke(s,i){if(s&1&&(e(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),o(4,"clock-counter-clockwise"),t(),e(5,"h3"),S(6,9),t()()(),e(7,"sh-list"),P(8,Ie,6,5,"div",84),t()()),s&2){let n=g();r(8),p("ngForOf",n.recentFiles())}}function Ae(s,i){if(s&1&&(e(0,"div",19)(1,"span",20),o(2,"Next Task:"),t(),e(3,"div",21)(4,"div"),o(5),t(),e(6,"div",49),o(7),_(8,"date"),_(9,"relativeTime"),t()()()),s&2){let n,a=g();r(5),m((n=a.nextBackup().backup)==null?null:n.Name),r(2),$(" ",E(8,3,a.nextBackup().time,"medium")," (",C(9,6,a.nextBackup().time),") ")}}function Re(s,i){if(s&1){let n=B();Y(0),e(1,"button",85),h("click",function(){y(n);let l=g();return b(l.stop())}),e(2,"sh-icon"),o(3,"stop"),t(),o(4," Stop "),t(),e(5,"button",85),h("click",function(){y(n);let l=g();return b(l.abort())}),e(6,"sh-icon"),o(7,"x-circle"),t(),o(8," Abort "),t(),Z()}}var J=class s{#e=x(z);#n=x(U);#i=x(_e);#r=x(re);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=N(!1);clientIsRunning=this.#e.clientIsRunning;statusText=L(()=>{let i=this.statusData()?.Phase;return i?pe[i]||i:""});progress=L(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=L(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView()}ngOnDestroy(){this.#n.deactivateView()}toggleTransfers(){this.transfersExpanded.update(i=>!i)}isTaskRunning(){return!!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(Ce,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe()}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe()}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=H({type:s,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let n;n=$localize`Recently Processed`;let a;a=$localize`No recent files`;let l;l=$localize`check-bold`;let d;d=$localize`System Ready`;let c;c=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let M;M=$localize`Next Scheduled Task`;let O;O=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,n,a,l,d,c,k,M,O,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small","variant","ghost",1,"toggle-btn",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","variant"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(n,a){if(n&1&&(e(0,"div",10),D(1,Ee,58,22)(2,Ne,27,8),P(3,ke,9,1,"sh-card",11),e(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),o(8,"list"),t(),e(9,"h3"),S(10,0),t()()(),e(11,"div",16),I(12,"app-logs-live",17),t()(),e(13,"sh-card")(14,"div",18)(15,"h3"),o(16,"Server Status"),t(),e(17,"div",19)(18,"span",20),o(19,"State:"),t(),e(20,"span",21),o(21),t()(),P(22,Ae,10,8,"div",22),e(23,"div",23)(24,"button",24),h("click",function(){return a.pauseResume()}),e(25,"sh-icon"),o(26),t(),o(27),t(),P(28,Re,9,0,"ng-container",25),t()()()()),n&2){let l,d;G("idle",!a.isTaskRunning()),r(),F(a.isTaskRunning()?1:2),r(2),p("ngIf",!a.isTaskRunning()&&a.recentFiles().length>0),r(9),p("polling",a.isTaskRunning())("whenFilter",(l=a.taskStartTime())==null?null:l.getTime())("backupIdFilter",a.currentBackupId()),r(9),m((d=a.serverState())==null?null:d.ProgramState),r(),p("ngIf",a.nextBackup()),r(4),m(a.clientIsRunning()?"pause":"play_arrow"),r(),u(" ",a.clientIsRunning()?"Pause":"Resume"," "),r(),p("ngIf",a.isTaskRunning())}},dependencies:[ae,ee,te,le,de,se,oe,fe,ce,ie,ne,me,ue],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"],changeDetection:0})};export{J as default};
|