@duplicati/ngclient 0.0.163 → 0.0.165
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/{chunk-ZDBKQQ47.js → chunk-2DP4QU4T.js} +1 -1
- package/chunk-2DSLXKCS.js +1 -0
- package/{chunk-TZQE4VY2.js → chunk-2NUXSSQT.js} +1 -1
- package/{chunk-7V6AACW7.js → chunk-2QQJ6ZBU.js} +1 -1
- package/chunk-43UBTE3L.js +1 -0
- package/{chunk-YATBNEED.js → chunk-4M7H3XII.js} +1 -1
- package/{chunk-AL7GMUVT.js → chunk-5KMPTDRJ.js} +1 -1
- package/{chunk-5KAFOFRJ.js → chunk-5NPUZRFY.js} +1 -1
- package/chunk-5U6T552I.js +1 -0
- package/{chunk-KCVV72VV.js → chunk-A66RJUYO.js} +1 -1
- package/{chunk-EBVPGAHS.js → chunk-AAIMJHAS.js} +1 -1
- package/{chunk-HJAQV4HF.js → chunk-BB73BKGN.js} +1 -1
- package/{chunk-G6RLXZXM.js → chunk-CENUQU54.js} +1 -1
- package/{chunk-6QSMEZZ4.js → chunk-D2ZTG4GG.js} +1 -1
- package/{chunk-5PANYSIG.js → chunk-D7OP5FPA.js} +1 -1
- package/{chunk-U5APXPQC.js → chunk-DQ7EARGM.js} +1 -1
- package/{chunk-IXLGVEIK.js → chunk-E3KF5SRU.js} +2 -2
- package/{chunk-FFL4DKFK.js → chunk-E6DCTQ34.js} +1 -1
- package/{chunk-FEJ33TSO.js → chunk-EM7XX5OF.js} +1 -1
- package/chunk-F3EXRAZJ.js +1 -0
- package/chunk-FG7TM7PO.js +1 -0
- package/{chunk-OMKP4YQX.js → chunk-H4H72SDD.js} +1 -1
- package/chunk-I3AX7HPO.js +1 -0
- package/{chunk-SVQCV5AE.js → chunk-IEGVSOLM.js} +1 -1
- package/{chunk-D2T243VR.js → chunk-IFCA5KWR.js} +1 -1
- package/{chunk-R7B32VI4.js → chunk-IKPQDSQK.js} +1 -1
- package/{chunk-O5W6EGCB.js → chunk-IME3RCXO.js} +1 -1
- package/{chunk-4HEWGBUJ.js → chunk-JEWYZWQN.js} +1 -1
- package/chunk-JIVJVJKU.js +1 -0
- package/{chunk-LC4PL7V2.js → chunk-K6IL54XE.js} +1 -1
- package/{chunk-QY6647RY.js → chunk-KFYMEXS6.js} +1 -1
- package/chunk-KGO3OR7H.js +1 -0
- package/{chunk-FLSO56F3.js → chunk-KIUZUG7C.js} +1 -1
- package/{chunk-XTFTWEJS.js → chunk-KLODM6IK.js} +1 -1
- package/{chunk-7ZE4C4XQ.js → chunk-LEYSCNJE.js} +1 -1
- package/{chunk-L34PDBPD.js → chunk-ORLZQJMN.js} +1 -1
- package/{chunk-UYQXV7FY.js → chunk-P2GZAEQX.js} +1 -1
- package/{chunk-YOP2YAQF.js → chunk-PFZG7ACX.js} +1 -1
- package/{chunk-FO5YOQUM.js → chunk-PZOMPDFS.js} +1 -1
- package/{chunk-IDTGMCDE.js → chunk-Q6RATRPG.js} +1 -1
- package/{chunk-QSPA3G65.js → chunk-QBHHGHBJ.js} +1 -1
- package/{chunk-2ASSYS3L.js → chunk-QNEJVXLY.js} +1 -1
- package/{chunk-3UJSVCAS.js → chunk-RVELYERL.js} +1 -1
- package/chunk-SDIOWQX7.js +1 -0
- package/{chunk-G3QBP5CU.js → chunk-SQSTMZR3.js} +1 -1
- package/chunk-TCDG7C5J.js +1 -0
- package/chunk-TGNUULAU.js +1 -0
- package/chunk-TVD2HREV.js +1 -0
- package/{chunk-OYO6MNWR.js → chunk-TX7FNDPL.js} +1 -1
- package/{chunk-5P2YZRI5.js → chunk-UEUGGMU7.js} +1 -1
- package/{chunk-EUVXYJ2O.js → chunk-ULC4PUPL.js} +1 -1
- package/chunk-UVPLU2YS.js +1 -0
- package/{chunk-5XN6KKQ5.js → chunk-VLCXKEIA.js} +3 -3
- package/chunk-WNP2PFJP.js +1 -0
- package/{chunk-Q7SVWHVY.js → chunk-XAUZOGDI.js} +1 -1
- package/{chunk-VITGSIEL.js → chunk-XRI2BFC2.js} +1 -1
- package/{chunk-YB374JOK.js → chunk-Y27QHU4A.js} +1 -1
- package/{chunk-Q6KQWWNZ.js → chunk-YGVXQBSL.js} +1 -1
- package/chunk-YIMKL4H6.js +1 -0
- package/chunk-Z34TVTJN.js +1 -0
- package/{chunk-52VBZ35Q.js → chunk-ZNZH3TU5.js} +1 -1
- package/{chunk-2RJJX7C2.js → chunk-ZSP3PG56.js} +1 -1
- package/{chunk-3OT227W4.js → chunk-ZTM5RK6J.js} +1 -1
- package/index.html +2 -2
- package/main-NIJHUKOR.js +1 -0
- package/package.json +1 -1
- package/styles-JSM72RCO.css +1 -0
- package/chunk-53OIXPHF.js +0 -1
- package/chunk-7I3YOHEE.js +0 -1
- package/chunk-7XAN363E.js +0 -1
- package/chunk-A4RKBIZK.js +0 -1
- package/chunk-AKJZOLGH.js +0 -1
- package/chunk-JKXAMBD7.js +0 -1
- package/chunk-LMEZWWBD.js +0 -1
- package/chunk-QU7TANXU.js +0 -1
- package/chunk-R6CC4KYP.js +0 -1
- package/chunk-R7CYCJUU.js +0 -1
- package/chunk-RAIB7LN4.js +0 -1
- package/chunk-V7NZ5WF5.js +0 -1
- package/chunk-XUN5TTJC.js +0 -1
- package/chunk-YPAJPRDF.js +0 -1
- package/chunk-YWDTUV3V.js +0 -1
- package/chunk-ZCH336WN.js +0 -1
- package/main-TUINGPOM.js +0 -1
- package/styles-FD7LUDV4.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as We}from"./chunk-QSPA3G65.js";import{a as Ve}from"./chunk-AE7T2DAH.js";import{b as $e}from"./chunk-TC7HZO7D.js";import{A as Re,B as Ie,G as te,I as Le,K as Ae,O as Be,V as ke,a as Oe,c as U,e as Y,i as Z,k as ye,s as ee,u as xe,y as we,z as De}from"./chunk-RAIB7LN4.js";import{ea as Fe}from"./chunk-NXROYR6L.js";import{$b as p,Ab as he,Ac as Me,B as pe,Bb as _e,Bc as Ne,Cb as O,Cc as Q,Db as c,Dc as ve,Eb as d,Fb as X,H as ne,Kc as Se,Lb as ie,Mb as L,Rc as D,Sa as h,Sc as R,Tb as ge,Ub as me,Vb as A,Wb as fe,Wc as se,Xb as Ce,Xc as C,Yc as le,Zb as x,_ as j,ac as q,bc as w,cb as J,ea as N,fa as v,gc as oe,hb as W,hc as Te,ic as re,jc as K,kc as y,n as ce,nc as b,oc as Ee,pa as P,pc as Pe,qc as be,r as H,sc as B,tc as k,ub as ue,uc as $,x as de,xb as S,yb as F}from"./chunk-ZBK64QS2.js";import{a as G,b as z}from"./chunk-EUDKD2JW.js";var qe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ke=["label","[prefix]","[suffix]"];function Qe(o,t){if(o&1&&b(0),o&2){let e=t.$implicit,n=p();be("",e.label,"",n.hasPerSecond()?"/s":"")}}var Ue=["throttle-upload","throttle-download"],Ye=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Ze=o=>{if(!o||typeof o!="string"||o.length===0)return{size:0,unit:"MB"};let t=o.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"}},Ge=class o{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Ye);readonly=P(!1);hasPerSecond=D(()=>{let t=this.inputType();return t&&Ue.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=R(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Ze(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||o)};static \u0275cmp=J({type:o,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[Me([{provide:Oe,useExisting:o,multi:!0}])],ngContentSelectors:Ke,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&&(q(qe),c(0,"div",0),w(1,0,["ngProjectAs","label",5,["label"]]),d(),c(2,"sh-form-field")(3,"input",1),$("ngModelChange",function(r){return k(n.timespan,r)||(n.timespan=r),r}),d(),w(4,1),w(5,2),d(),c(6,"sh-select",2)(7,"input",3),$("ngModelChange",function(r){return k(n.unit,r)||(n.unit=r),r}),d(),W(8,Qe,1,2,"ng-template"),d()),e&2&&(h(2),ue("readonly",n.readonly()||void 0),h(),O("id",n.customId()),B("ngModel",n.timespan),O("disabled",n.readonly()),h(3),K("--miw",0),O("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),h(),B("ngModel",n.unit))},dependencies:[Be,te,ee,U,ye,Y,Z],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 et=["treeContainer"],tt=["formRef"],nt=[[["label"]],[["label"]],[["input"]]],it=["label","label","input"],ot=o=>({children:o,level:0}),ze=o=>({$implicit:o}),rt=(o,t)=>({children:o,level:t}),st=()=>({maxWidth:"700px",width:"100%"}),lt=(o,t)=>t.id;function at(o,t){if(o&1){let e=L();c(0,"sh-button-group")(1,"button",19),x("click",function(){N(e);let i=p();return v(i.pathDiscoveryMethod.set("browse"))}),A(2,4),d(),c(3,"button",19),x("click",function(){N(e);let i=p();return v(i.pathDiscoveryMethod.set("path"))}),A(4,5),d()()}if(o&2){let e=p();h(),y("active",e.pathDiscoveryMethod()==="browse"),h(2),y("active",e.pathDiscoveryMethod()==="path")}}function ct(o,t){o&1&&X(0,"sh-progress-bar",12)}function dt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-down"),d())}function pt(o,t){o&1&&X(0,"sh-icon",24)}function ut(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-right"),d())}function ht(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-open"),d())}function _t(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-user"),d())}function gt(o,t){o&1&&(c(0,"sh-icon",22),b(1,"file"),d())}function mt(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder"),d())}function ft(o,t){if(o&1&&(S(0,dt,2,0,"sh-icon",24)(1,pt,1,0,"sh-icon",24)(2,ut,2,0,"sh-icon",24),S(3,ht,2,0,"sh-icon",22)(4,_t,2,0,"sh-icon",22)(5,gt,2,0,"sh-icon",22)(6,mt,2,0,"sh-icon",22)),o&2){let e=p(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2),h(3),F(e.children.length?3:e.id==="%HOME%"?4:e.cls==="file"?5:6)}}function Ct(o,t){o&1&&(c(0,"sh-icon",22),b(1,"desktop-tower"),d())}function Tt(o,t){o&1&&ie(0)}function Et(o,t){if(o&1&&W(0,Tt,1,0,"ng-container",13),o&2){let e=p(2).$implicit,n=p().$implicit;p();let i=re(7);O("ngTemplateOutlet",i)("ngTemplateOutletContext",Q(5,ze,ve(2,rt,e.children,n.level+1)))}}function Pt(o,t){if(o&1){let e=L();c(0,"div",20,3),x("click",function(){N(e);let i=p().$implicit,r=p(2);return v(r.toggleNode(i.id,i))}),c(2,"div",21),S(3,ft,7,2)(4,Ct,2,0,"sh-icon",22),d(),c(5,"div",23),x("click",function(i){N(e);let r=p().$implicit,a=p(2);return v(a.toggleSelectedNode(i,r))}),b(6),d()(),S(7,Et,1,7,"ng-container")}if(o&2){let e=p().$implicit,n=p().$implicit,i=p();y("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),h(2),y("file",e.cls==="file"),h(),F(e.id!=="/"?3:4),h(3),Pe(" ",e.text," "),h(),F(e.children.length>0?7:-1)}}function bt(o,t){if(o&1&&S(0,Pt,8,17),o&2){let e=t.$implicit,n=p(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Mt(o,t){if(o&1&&(c(0,"sh-list"),he(1,bt,1,1,null,null,lt),d()),o&2){let e=t.$implicit;K("padding-left",e.level*.25,"rem"),h(),_e(e.children)}}function Nt(o,t){o&1&&ie(0)}function vt(o,t){if(o&1){let e=L();c(0,"sh-toggle",25),x("click",function(){N(e);let i=p();return v(i._showHiddenNodes.set(!i._showHiddenNodes()))}),A(1,6),d()}if(o&2){let e=p();y("active",e._showHiddenNodes()),h(),fe(e.showFiles()?"files":"folders"),Ce(1)}}function St(o,t){if(o&1){let e=L();c(0,"button",26),x("click",function(){N(e);let i=p();return v(i.openCreateFolderDialog())}),A(1,7),d()}if(o&2){let e=p();O("disabled",!e.isCurrentPathFolder())}}function Ft(o,t){if(o&1){let e=L();c(0,"sh-dialog",27),$("isOpenChange",function(i){N(e);let r=p();return k(r.createFolderDialogOpen,i)||(r.createFolderDialogOpen=i),v(i)}),c(1,"header",28)(2,"h2"),A(3,8),d()(),c(4,"div",29)(5,"div"),b(6," Folder will be created under "),c(7,"pre"),b(8),d()(),c(9,"sh-form-field")(10,"textarea",30),$("ngModelChange",function(i){N(e);let r=p();return k(r.createFolderPath,i)||(r.createFolderPath=i),v(i)}),d()()(),c(11,"footer",31)(12,"button",32),x("click",function(){N(e);let i=p();return v(i.closeCreateFolderDialog(!1))}),b(13,"Cancel"),d(),c(14,"button",33),x("click",function(){N(e);let i=p();return v(i.closeCreateFolderDialog(!0))}),ge(15,9),X(16,"sh-icon"),me(),d()()()}if(o&2){let e,n=p();B("isOpen",n.createFolderDialogOpen),O("options",Ne(5,st)),h(8),Ee(n.currentPath()),h(2),B("ngModel",n.createFolderPath),h(4),O("disabled",!((e=n.createFolderPath())!=null&&e.length))}}var He=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(He||{}),M="/",ae=class o{#t=j($e);#i=j(Ve);#c=j(De);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);includes=se();excludes=se();_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=le("treeContainer");formRef=le("formRef");pathDiscoveryMethod=P("browse");isLoading=P(!1);currentPath=P("/");#o=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=D(()=>this.#i.systemInfo()?.DirectorySeparator??"");filterGroups=this.#i.filterGroups();isByBackupSettings=D(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=D(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=He;treeStructure=D(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==M),n=structuredClone(e);for(let l=0;l<n.length;l++){let f=n[l].slice(1);if(f.startsWith("{")&&f.endsWith("}")){let _=f.slice(1,-1),g=this.filterGroups?.FilterGroups[_];if(g&&g.length){let T=g.map(E=>`-${E}`);n.splice(l,1,...T)}}}let i=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),m=this.pathDelimiter(),s=[];return r.length>0?s=r.map(l=>{let u=this.#r(n,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:u,isIndeterminate:!1,cls:this.#e(l,m)?"folder":"file"}}):s=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],s.map(l=>{let u=new Map;if(!l.id)return;let f=l.id;a&&(l.accepted=!0),u.set(f,l);let _=r.length>0?i.filter(g=>g.parentPath.startsWith(f)):i;for(let g of _){if(!g.id)continue;let T=g.id;if(!g.cls||u.has(T))continue;let E=u.get(g.parentPath),V=g.hidden===!0&&t?0:this.#r(n,T,g.cls,E),I=z(G({},g),{isIndeterminate:this.isIndeterminate(n,T),evalState:V,children:[]});a&&(I.accepted=this.matchAccepts(a,I)),u.set(T,I),E&&E.children.push(I)}return l}),s});#d(t){let e=this.pathDelimiter();return t?t.endsWith(e)||t===M?t:t+e:M}#r(t,e,n,i){if(i&&i.evalState===-1)return-2;let r=0,a=this.pathDelimiter(),m=t.filter(u=>!u.startsWith("-")&&!u.startsWith("+")),s=t.filter(u=>u.startsWith("-")||u.startsWith("+")),l=this.multiSelect();if(m.length===0)return r;for(let u=0;u<m.length;u++){let f=m[u];if(e===f){r=1;break}if(!l||!this.#e(f,a))continue;if(e?.startsWith(f)){r=1;break}}if(s.length===0)return r;for(let u=0;u<s.length;u++){let f=s[u],_=f.slice(1),g=f.startsWith("-")?-1:1;if(this.#e(_,a)){if(n!=="folder")continue;if(e===_){r=g;break}}if(_.startsWith("*")&&_.endsWith(`*${a}`)){if(n!=="folder")continue;let E=_.slice(1,-2);if(E==="")break;if(e?.includes(E+a)){r=g;break}}if(_.startsWith("[.*")&&_.endsWith(`[^\\${a}]*]`)){if(n!=="file")continue;let E=_.slice(3,-7);if(new RegExp(E).test(e)){r=g;break}}if(_.startsWith("[")&&_.endsWith("]")){let E=_.slice(1,-1),V=this.translateCSharpRegex(E);if(new RegExp(`${V}`).test(e)){r=g;break}}if(_.startsWith("*.")){if(n!=="file"||_.replace("*.","").length===0)continue;if(this.#s(e,_,!0)){r=g;break}}if(_==="")continue;if(_===e){r=g;break}if(this.#s(e,_,!0)){r=g;break}}return r}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,r,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#e(n,this.pathDelimiter())).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith(this.pathDelimiter())||t.startsWith("%")&&t.endsWith("%")&&!t.includes(this.pathDelimiter()):!1}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#o();t==="browse"&&e&&this.currentPath.set(e.value)});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(r=>i.endsWith(r)):!1}currentPathEffect=R(()=>{let t=this.#o();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#p(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.#o.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#_(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:i.text,iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#n(null,e[0])):this.#n(null,M)}}getParentPath(t){let e=this.pathDelimiter(),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),a=this.isChildOfSelected(e)?`-${e.id}`:e.id,m=this.#e(e.id,this.pathDelimiter());if(this.multiSelect())if(i.includes(e.id))this.currentPath.set(i.filter(s=>s!==e.id&&!(m&&s.startsWith(a))).join("\0"));else if(i.some(s=>s==a))this.currentPath.set(i.filter(s=>s!==a).join("\0"));else{let s=m?i.filter(l=>!l.startsWith(e.id)):i;this.currentPath.set([...s,a].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.#e(n,this.pathDelimiter())).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.#n(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.#d(e),r=n+i;this.#t.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+r}}).subscribe({next:()=>{this.currentPath.set(r),this.#n(null,n),setTimeout(()=>{this.#l()},500),this.createFolderDialogOpen.set(!1)},error:a=>{let m=a?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),s=m?m[1]:a?.message||$localize`An error occurred while trying to create the folder.`;this.#c.open(We,{data:{title:$localize`Cannot create folder`,message:s,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#p(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}#u(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#h(t){let e=this.backupSettings();if(this.#i.hasV2ListOperations())return this.#t.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(H(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n).pipe(H(i=>i.Files??[]))}}#a(t){return this.isByBackupSettings()?this.#h(t):this.#u(t)}#_(t){let e=this.pathDelimiter(),n=t.split("\0").filter(s=>s.startsWith("-")).map(s=>s.slice(1,-1)),r=t.split("\0").filter(s=>!s.startsWith("-")).filter(Boolean).map(s=>{let l=s.split(e);return l.at(-1)!==""&&l.pop(),l}),a=[M];r.forEach(s=>{s.forEach((l,u)=>{let f=s.slice(0,u+1).join(e);f!==""&&(a.includes(f)||a.push(f))})}),this.isLoading.set(!0);let m=a.map(s=>this.#a(s).pipe(H(l=>({status:"success",value:l,url:s})),pe(l=>ce({status:"error",value:l,url:s}))));de(m).pipe(ne(()=>this.isLoading.set(!1))).subscribe({next:s=>{let l=s.filter(f=>f.status==="success"),u=s.filter(f=>f.status==="error");this.treeNodes.update(f=>{let _=l.flatMap(T=>Array.isArray(T.value)?T.value.map(E=>z(G({},E),{parentPath:T.url})):[]),g=[...new Map([...f,..._].map(T=>[T.id,T])).values()];return this.#l(),this.hideShortcuts()?g.filter(T=>!T.id.startsWith("%")):g})}})}#e(t,e){return t.startsWith("%")&&t.endsWith("%")||t.endsWith(e)}#n(t=null,e=M){let n=this.pathDelimiter();this.isLoading.set(!0),this.#a(e).pipe(ne(()=>this.isLoading.set(!1))).subscribe({next:i=>{let r=this.isByBackupSettings()?i.map(a=>({text:a.Path.split(n).filter(m=>m!=="").pop(),id:a.Path,cls:this.#e(a.Path,n)?"folder":"file",leaf:t!==null,resolvedpath:a.Path,hidden:!1})):i;this.treeNodes.update(a=>{let m=r.map(l=>{let u=this.#e(l.id,n)?"folder":"file";return z(G({},l),{cls:u,parentPath:e})}),s=[...new Map([...a,...m].map(l=>[l.id,l])).values()];return this.hideShortcuts()?s.filter(l=>!l.id.startsWith("%")):s})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=J({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(oe(n.treeContainerRef,et,5),oe(n.formRef,tt,5)),e&2&&Te(2)},hostVars:2,hostBindings:function(e,n){e&2&&y("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"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:it,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 r;r=$localize`Enter new folder path`;let a;return a=$localize` Create folder ${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,r,a,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"active"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["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&&(q(nt),S(0,at,5,4,"sh-button-group"),c(1,"div",10),w(2,0,["ngProjectAs","label",5,["label"]]),c(3,"div",11,0),S(5,ct,1,0,"sh-progress-bar",12),W(6,Mt,3,2,"ng-template",null,1,Se)(8,Nt,1,0,"ng-container",13),d(),c(9,"div",14),S(10,vt,2,3,"sh-toggle",15),S(11,St,2,1,"button",16),d()(),c(12,"div",17,2)(14,"sh-form-field"),w(15,1,["ngProjectAs","label",5,["label"]]),w(16,2,["ngProjectAs","input",5,["input"]]),d()(),S(17,Ft,17,6,"sh-dialog",18)),e&2){let i=re(7);F(n.multiSelect()?-1:0),h(),y("hidden",n.pathDiscoveryMethod()!=="browse"),h(2),y("visualize-accepted",n.accepts()),h(2),F(n.isLoading()?5:-1),h(3),O("ngTemplateOutlet",i)("ngTemplateOutletContext",Q(15,ze,Q(13,ot,n.treeStructure()))),h(2),F(!n.accepts()&&!n.isByBackupSettings()?10:-1),h(),F(n.enableCreateFolder()?11:-1),h(),y("hidden",n.pathDiscoveryMethod()!=="path"),h(5),F(n.createFolderDialogOpen()?17:-1)}},dependencies:[Ie,Re,ke,xe,te,Le,Ae,we,Fe,ee,U,Y,Z],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][_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}'],changeDetection:0})};export{Ye as a,Ze as b,Ge as c,ae as d};
|
|
1
|
+
import{a as We}from"./chunk-QBHHGHBJ.js";import{a as Ve}from"./chunk-AE7T2DAH.js";import{b as $e}from"./chunk-TC7HZO7D.js";import{A as Re,B as Ie,G as te,I as Le,K as Ae,O as Be,V as ke,a as Oe,c as U,e as Y,i as Z,k as ye,s as ee,u as xe,y as we,z as De}from"./chunk-TGNUULAU.js";import{ea as Fe}from"./chunk-NXROYR6L.js";import{$b as u,Ab as he,Ac as Me,B as ue,Bb as _e,Bc as Ne,Cb as O,Cc as Q,Db as c,Dc as ve,Eb as d,Fb as X,H as ie,Kc as Se,Lb as ne,Mb as L,Rc as D,Sa as h,Sc as R,Tb as ge,Ub as fe,Vb as A,Wb as me,Wc as se,Xb as Ce,Xc as C,Yc as le,Zb as x,_ as j,ac as q,bc as w,cb as J,ea as N,fa as v,gc as oe,hb as W,hc as Te,ic as re,jc as K,kc as y,n as ce,nc as b,oc as Ee,pa as P,pc as Pe,qc as be,r as H,sc as B,tc as k,ub as pe,uc as $,x as de,xb as S,yb as F}from"./chunk-ZBK64QS2.js";import{a as G,b as z}from"./chunk-EUDKD2JW.js";var qe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ke=["label","[prefix]","[suffix]"];function Qe(o,t){if(o&1&&b(0),o&2){let e=t.$implicit,i=u();be("",e.label,"",i.hasPerSecond()?"/s":"")}}var Ue=["throttle-upload","throttle-download"],Ye=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Ze=o=>{if(!o||typeof o!="string"||o.length===0)return{size:0,unit:"MB"};let t=o.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"}},Ge=class o{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Ye);readonly=P(!1);hasPerSecond=D(()=>{let t=this.inputType();return t&&Ue.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=R(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Ze(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||o)};static \u0275cmp=J({type:o,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[Me([{provide:Oe,useExisting:o,multi:!0}])],ngContentSelectors:Ke,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,i){e&1&&(q(qe),c(0,"div",0),w(1,0,["ngProjectAs","label",5,["label"]]),d(),c(2,"sh-form-field")(3,"input",1),$("ngModelChange",function(r){return k(i.timespan,r)||(i.timespan=r),r}),d(),w(4,1),w(5,2),d(),c(6,"sh-select",2)(7,"input",3),$("ngModelChange",function(r){return k(i.unit,r)||(i.unit=r),r}),d(),W(8,Qe,1,2,"ng-template"),d()),e&2&&(h(2),pe("readonly",i.readonly()||void 0),h(),O("id",i.customId()),B("ngModel",i.timespan),O("disabled",i.readonly()),h(3),K("--miw",0),O("options",i.sizeOptions())("readonly",i.readonly())("isClearable",!1),h(),B("ngModel",i.unit))},dependencies:[Be,te,ee,U,ye,Y,Z],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 et=["treeContainer"],tt=["formRef"],it=[[["label"]],[["label"]],[["input"]]],nt=["label","label","input"],ot=o=>({children:o,level:0}),ze=o=>({$implicit:o}),rt=(o,t)=>({children:o,level:t}),st=()=>({maxWidth:"700px",width:"100%"}),lt=(o,t)=>t.id;function at(o,t){if(o&1){let e=L();c(0,"sh-button-group")(1,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("browse"))}),A(2,4),d(),c(3,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("path"))}),A(4,5),d()()}if(o&2){let e=u();h(),y("active",e.pathDiscoveryMethod()==="browse"),h(2),y("active",e.pathDiscoveryMethod()==="path")}}function ct(o,t){o&1&&X(0,"sh-progress-bar",12)}function dt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-down"),d())}function ut(o,t){o&1&&X(0,"sh-icon",24)}function pt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-right"),d())}function ht(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-open"),d())}function _t(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-user"),d())}function gt(o,t){o&1&&(c(0,"sh-icon",22),b(1,"file"),d())}function ft(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder"),d())}function mt(o,t){if(o&1&&(S(0,dt,2,0,"sh-icon",24)(1,ut,1,0,"sh-icon",24)(2,pt,2,0,"sh-icon",24),S(3,ht,2,0,"sh-icon",22)(4,_t,2,0,"sh-icon",22)(5,gt,2,0,"sh-icon",22)(6,ft,2,0,"sh-icon",22)),o&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2),h(3),F(e.children.length?3:e.id==="%HOME%"?4:e.cls==="file"?5:6)}}function Ct(o,t){o&1&&(c(0,"sh-icon",22),b(1,"desktop-tower"),d())}function Tt(o,t){o&1&&ne(0)}function Et(o,t){if(o&1&&W(0,Tt,1,0,"ng-container",13),o&2){let e=u(2).$implicit,i=u().$implicit;u();let n=re(7);O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(5,ze,ve(2,rt,e.children,i.level+1)))}}function Pt(o,t){if(o&1){let e=L();c(0,"div",20,3),x("click",function(){N(e);let n=u().$implicit,r=u(2);return v(r.toggleNode(n.id,n))}),c(2,"div",21),S(3,mt,7,2)(4,Ct,2,0,"sh-icon",22),d(),c(5,"div",23),x("click",function(n){N(e);let r=u().$implicit,a=u(2);return v(a.toggleSelectedNode(n,r))}),b(6),d()(),S(7,Et,1,7,"ng-container")}if(o&2){let e=u().$implicit,i=u().$implicit,n=u();y("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",i.level===0),h(2),y("file",e.cls==="file"),h(),F(e.id!=="/"?3:4),h(3),Pe(" ",e.text," "),h(),F(e.children.length>0?7:-1)}}function bt(o,t){if(o&1&&S(0,Pt,8,17),o&2){let e=t.$implicit,i=u(2);F(e.hidden&&i._showHiddenNodes()||!e.hidden?0:-1)}}function Mt(o,t){if(o&1&&(c(0,"sh-list"),he(1,bt,1,1,null,null,lt),d()),o&2){let e=t.$implicit;K("padding-left",e.level*.25,"rem"),h(),_e(e.children)}}function Nt(o,t){o&1&&ne(0)}function vt(o,t){if(o&1){let e=L();c(0,"sh-toggle",25),x("click",function(){N(e);let n=u();return v(n._showHiddenNodes.set(!n._showHiddenNodes()))}),A(1,6),d()}if(o&2){let e=u();y("active",e._showHiddenNodes()),h(),me(e.showFiles()?"files":"folders"),Ce(1)}}function St(o,t){if(o&1){let e=L();c(0,"button",26),x("click",function(){N(e);let n=u();return v(n.openCreateFolderDialog())}),A(1,7),d()}if(o&2){let e=u();O("disabled",!e.isCurrentPathFolder())}}function Ft(o,t){if(o&1){let e=L();c(0,"sh-dialog",27),$("isOpenChange",function(n){N(e);let r=u();return k(r.createFolderDialogOpen,n)||(r.createFolderDialogOpen=n),v(n)}),c(1,"header",28)(2,"h2"),A(3,8),d()(),c(4,"div",29)(5,"div"),b(6," Folder will be created under "),c(7,"pre"),b(8),d()(),c(9,"sh-form-field")(10,"textarea",30),$("ngModelChange",function(n){N(e);let r=u();return k(r.createFolderPath,n)||(r.createFolderPath=n),v(n)}),d()()(),c(11,"footer",31)(12,"button",32),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!1))}),b(13,"Cancel"),d(),c(14,"button",33),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!0))}),ge(15,9),X(16,"sh-icon"),fe(),d()()()}if(o&2){let e,i=u();B("isOpen",i.createFolderDialogOpen),O("options",Ne(5,st)),h(8),Ee(i.currentPath()),h(2),B("ngModel",i.createFolderPath),h(4),O("disabled",!((e=i.createFolderPath())!=null&&e.length))}}var He=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(He||{}),M="/",ae=class o{#t=j($e);#n=j(Ve);#c=j(De);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);includes=se();excludes=se();_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=le("treeContainer");formRef=le("formRef");pathDiscoveryMethod=P("browse");isLoading=P(!1);currentPath=P("/");#o=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=D(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=D(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=D(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=He;treeStructure=D(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==M),i=structuredClone(e);for(let l=0;l<i.length;l++){let m=i[l].slice(1);if(m.startsWith("{")&&m.endsWith("}")){let _=m.slice(1,-1),g=this.filterGroups?.FilterGroups[_];if(g&&g.length){let T=g.map(E=>`-${E}`);i.splice(l,1,...T)}}}let n=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),f=this.pathDelimiter(),s=[];return r.length>0?s=r.map(l=>{let p=this.#r(i,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:p,isIndeterminate:!1,cls:this.#e(l,f)?"folder":"file"}}):s=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],s.map(l=>{let p=new Map;if(!l.id)return;let m=l.id;a&&(l.accepted=!0),p.set(m,l);let _=r.length>0?n.filter(g=>g.parentPath.startsWith(m)):n;for(let g of _){if(!g.id)continue;let T=g.id;if(!g.cls||p.has(T))continue;let E=p.get(g.parentPath),V=g.hidden===!0&&t?0:this.#r(i,T,g.cls,E),I=z(G({},g),{isIndeterminate:this.isIndeterminate(i,T),evalState:V,children:[]});a&&(I.accepted=this.matchAccepts(a,I)),p.set(T,I),E&&E.children.push(I)}return l}),s});#d(t){let e=this.pathDelimiter();return t?t.endsWith(e)||t===M?t:t+e:M}#r(t,e,i,n){if(n&&n.evalState===-1)return-2;let r=0,a=this.pathDelimiter(),f=t.filter(p=>!p.startsWith("-")&&!p.startsWith("+")),s=t.filter(p=>p.startsWith("-")||p.startsWith("+")),l=this.multiSelect();if(f.length===0)return r;for(let p=0;p<f.length;p++){let m=f[p];if(e===m){r=1;break}if(!l||!this.#e(m,a))continue;if(e?.startsWith(m)){r=1;break}}if(s.length===0)return r;for(let p=0;p<s.length;p++){let m=s[p],_=m.slice(1),g=m.startsWith("-")?-1:1;if(this.#e(_,a)){if(i!=="folder")continue;if(e===_){r=g;break}}if(_.startsWith("*")&&_.endsWith(`*${a}`)){if(i!=="folder")continue;let E=_.slice(1,-2);if(E==="")break;if(e?.includes(E+a)){r=g;break}}if(_.startsWith("[.*")&&_.endsWith(`[^\\${a}]*]`)){if(i!=="file")continue;let E=_.slice(3,-7);if(new RegExp(E).test(e)){r=g;break}}if(_.startsWith("[")&&_.endsWith("]")){let E=_.slice(1,-1),V=this.translateCSharpRegex(E);if(new RegExp(`${V}`).test(e)){r=g;break}}if(_.startsWith("*.")){if(i!=="file"||_.replace("*.","").length===0)continue;if(this.#s(e,_,!0)){r=g;break}}if(_==="")continue;if(_===e){r=g;break}if(this.#s(e,_,!0)){r=g;break}}return r}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let i=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(i,(n,r,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(i=>!i.startsWith("-")&&this.#e(i,this.pathDelimiter())).some(i=>i.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith(this.pathDelimiter())||t.startsWith("%")&&t.endsWith("%")&&!t.includes(this.pathDelimiter()):!1}#s(t,e,i=!1){let n=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${n}${i?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#o();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===M)return!0;let i=t.split(",");if(i.length===0)return!0;let n="."+e.id.slice(e.id.indexOf("."));return n?i.some(r=>n.endsWith(r)):!1}currentPathEffect=R(()=>{let t=this.#o();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#u(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.#o.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#_(t);else{let e=this.rootPaths(),i=this.initialNodes();e&&e.length>0?(i&&i.length>0&&this.treeNodes.set(i.map(n=>({id:n.id,leaf:n.leaf,cls:n.cls,text:n.text,iconCls:n.iconCls,fileSize:n.fileSize,resolvedpath:n.resolvedpath,parentPath:this.getParentPath(n.id??"")}))),this.#i(null,e[0])):this.#i(null,M)}}getParentPath(t){let e=this.pathDelimiter(),i=t.split(e);return i.length<=1?M:(i.pop(),i.length!==0&&i.pop(),i.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 n=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),a=this.isChildOfSelected(e)?`-${e.id}`:e.id,f=this.#e(e.id,this.pathDelimiter());if(this.multiSelect())if(n.includes(e.id))this.currentPath.set(n.filter(s=>s!==e.id&&!(f&&s.startsWith(a))).join("\0"));else if(n.some(s=>s==a))this.currentPath.set(n.filter(s=>s!==a).join("\0"));else{let s=f?n.filter(l=>!l.startsWith(e.id)):n;this.currentPath.set([...s,a].join("\0"))}else n.includes(e.id)?this.currentPath.set(n.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(i=>i!==""&&i!==M&&this.#e(i,this.pathDelimiter())).some(i=>t.id?.startsWith(i)||`-${t.id}`.startsWith(i))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(i=>i.filter(n=>!n.id?.startsWith(e.id)||n.id===e.id)):this.#i(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 i=this.currentPath(),n=this.#d(e),r=i+n;this.#t.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+r}}).subscribe({next:()=>{this.currentPath.set(r),this.#i(null,i),setTimeout(()=>{this.#l()},500),this.createFolderDialogOpen.set(!1)},error:a=>{let f=a?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),s=f?f[1]:a?.message||$localize`An error occurred while trying to create the folder.`;this.#c.open(We,{data:{title:$localize`Cannot create folder`,message:s,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#u(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}#p(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#h(t){let e=this.backupSettings();if(this.#n.hasV2ListOperations())return this.#t.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(H(i=>i.Data??[]));{let i={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(i).pipe(H(n=>n.Files??[]))}}#a(t){return this.isByBackupSettings()?this.#h(t):this.#p(t)}#_(t){let e=this.pathDelimiter(),i=t.split("\0").filter(s=>s.startsWith("-")).map(s=>s.slice(1,-1)),r=t.split("\0").filter(s=>!s.startsWith("-")).filter(Boolean).map(s=>{let l=s.split(e);return l.at(-1)!==""&&l.pop(),l}),a=[M];r.forEach(s=>{s.forEach((l,p)=>{let m=s.slice(0,p+1).join(e);m!==""&&(a.includes(m)||a.push(m))})}),this.isLoading.set(!0);let f=a.map(s=>this.#a(s).pipe(H(l=>({status:"success",value:l,url:s})),ue(l=>ce({status:"error",value:l,url:s}))));de(f).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:s=>{let l=s.filter(m=>m.status==="success"),p=s.filter(m=>m.status==="error");this.treeNodes.update(m=>{let _=l.flatMap(T=>Array.isArray(T.value)?T.value.map(E=>z(G({},E),{parentPath:T.url})):[]),g=[...new Map([...m,..._].map(T=>[T.id,T])).values()];return this.#l(),this.hideShortcuts()?g.filter(T=>!T.id.startsWith("%")):g})}})}#e(t,e){return t.startsWith("%")&&t.endsWith("%")||t.endsWith(e)}#i(t=null,e=M){let i=this.pathDelimiter();this.isLoading.set(!0),this.#a(e).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.map(a=>({text:a.Path.split(i).filter(f=>f!=="").pop(),id:a.Path,cls:this.#e(a.Path,i)?"folder":"file",leaf:t!==null,resolvedpath:a.Path,hidden:!1})):n;this.treeNodes.update(a=>{let f=r.map(l=>{let p=this.#e(l.id,i)?"folder":"file";return z(G({},l),{cls:p,parentPath:e})}),s=[...new Map([...a,...f].map(l=>[l.id,l])).values()];return this.hideShortcuts()?s.filter(l=>!l.id.startsWith("%")):s})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=J({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,i){e&1&&(oe(i.treeContainerRef,et,5),oe(i.formRef,tt,5)),e&2&&Te(2)},hostVars:2,hostBindings:function(e,i){e&2&&y("disabled",i.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"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:nt,decls:18,vars:17,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let i;i=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let n;n=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;return a=$localize` Create folder ${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,i,n,r,a,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"active"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){if(e&1&&(q(it),S(0,at,5,4,"sh-button-group"),c(1,"div",10),w(2,0,["ngProjectAs","label",5,["label"]]),c(3,"div",11,0),S(5,ct,1,0,"sh-progress-bar",12),W(6,Mt,3,2,"ng-template",null,1,Se)(8,Nt,1,0,"ng-container",13),d(),c(9,"div",14),S(10,vt,2,3,"sh-toggle",15),S(11,St,2,1,"button",16),d()(),c(12,"div",17,2)(14,"sh-form-field"),w(15,1,["ngProjectAs","label",5,["label"]]),w(16,2,["ngProjectAs","input",5,["input"]]),d()(),S(17,Ft,17,6,"sh-dialog",18)),e&2){let n=re(7);F(i.multiSelect()?-1:0),h(),y("hidden",i.pathDiscoveryMethod()!=="browse"),h(2),y("visualize-accepted",i.accepts()),h(2),F(i.isLoading()?5:-1),h(3),O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(15,ze,Q(13,ot,i.treeStructure()))),h(2),F(!i.accepts()&&!i.isByBackupSettings()?10:-1),h(),F(i.enableCreateFolder()?11:-1),h(),y("hidden",i.pathDiscoveryMethod()!=="path"),h(5),F(i.createFolderDialogOpen()?17:-1)}},dependencies:[Ie,Re,ke,xe,te,Le,Ae,we,Fe,ee,U,Y,Z],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][_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}'],changeDetection:0})};export{Ye as a,Ze as b,Ge as c,ae as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b}from"./chunk-YIMKL4H6.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-SQSTMZR3.js";import"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import"./chunk-TGNUULAU.js";import"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-CENUQU54.js";import"./chunk-DQAT6VCF.js";import{g as q}from"./chunk-YIMKL4H6.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import{b as Z}from"./chunk-ORLZQJMN.js";import"./chunk-D7OP5FPA.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-JEWYZWQN.js";import{a as V}from"./chunk-TX7FNDPL.js";import"./chunk-A66RJUYO.js";import{a as H}from"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import{a as j}from"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{b as B}from"./chunk-TC7HZO7D.js";import{C as W,K as X,N as z,u as J}from"./chunk-TGNUULAU.js";import{b as w}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import{qa as k}from"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Cb as C,Db as o,Eb as s,Fb as R,Gc as T,Hc as d,Jb as P,Kb as m,Rc as b,Sa as a,Tb as y,Ub as D,Vb as r,Wb as v,Xb as x,_ as c,cb as A,ga as u,ha as f,nc as M,pa as I,qc as N,xb as O,yb as p}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(o(0,"div",17),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(o(0,"div",18),u(),o(1,"svg",19),R(2,"circle",20),s(),f(),o(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(o(0,"sh-card",10),P(1,16),r(2,2),m(),O(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();a(3),p(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),T(1,"number"),T(2,"number")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileCount)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(P(0),r(1,8),m())}function ne(n,t){if(n&1&&(M(0),T(1,"bytes"),T(2,"bytes")),n&2){let e,i=g(2);N(" ",d(1,2,(e=i.statusData())==null?null:e.ProcessedFileSize)," of ",d(2,4,(e=i.statusData())==null?null:e.TotalFileSize)," ")}}function ie(n,t){n&1&&(P(0),r(1,9),m())}function oe(n,t){if(n&1&&(o(0,"sh-card",10)(1,"h3"),y(2,5),R(3,"sh-spinner",23),D(),s(),o(4,"div",24),R(5,"sh-progress-bar",25),o(6,"p")(7,"span"),r(8,6),s(),O(9,ee,3,6)(10,te,2,0,"ng-container"),s(),o(11,"p")(12,"span"),r(13,7),s(),O(14,ne,3,6)(15,ie,2,0,"ng-container"),s()()()),n&2){let e,i,l,E,S=g();a(3),v((e=S.statusData())==null?null:e.statusText),x(2),a(2),C("value",(i=S.statusData())==null?null:i.OverallProgress),a(4),p((l=S.statusData())!=null&&l.ProcessedFileCount?9:10),a(5),p((E=S.statusData())!=null&&E.ProcessedFileSize?14:15)}}var G=class n{#o=c(B);#s=c(H);#t=c(V);#n=c(q);#r=c(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=I("");#e=null;lastRestoreStarted=b(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#o.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#i(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#_(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#i(e)})}#i(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let i;i=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let S;S=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let $;return $=$localize`N/A`,[t,e,i,l,E,S,h,F,L,$,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,i){if(e&1&&(o(0,"section"),O(1,Y,5,1,"sh-card",10)(2,oe,16,4,"sh-card",10),o(3,"sh-card",11)(4,"h3"),r(5,0),s(),o(6,"div",12),R(7,"app-notifications",13),s()(),o(8,"sh-card",14)(9,"h3"),r(10,1),s(),R(11,"app-logs-live",15),s()()),e&2){let l;a(),p(i.restoreResult()!=""?1:2),a(6),C("notificationFilterPredicate",i.notificationFilterPredicate()),a(4),C("asSimpleList",!0)("polling",i.restoreResult()=="")("whenFilter",(l=i.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",i.backupId())}},dependencies:[K,X,z,J,W,Z,j,k],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;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}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-RIX6H2ZX.js";import{a as W}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-RIX6H2ZX.js";import{a as W}from"./chunk-KLODM6IK.js";import{d as U}from"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import{B as j,D as B,G as Q,b as $,c as A,d as v,e as k,f as x,j as J,o as X,q as V,r as q,t as z,u as H,w as K}from"./chunk-TGNUULAU.js";import{d as R}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as h,Db as o,Eb as i,Fb as r,H as S,Mb as E,Sa as l,Sc as D,Tb as g,Ub as d,Vb as M,Yc as y,Zb as C,_ as p,cb as T,ea as F,fa as f,gc as O,hc as P,kc as w,nc as b,oc as G,pa as a,xb as L,yb as I}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Z=["passwordInput"];function ee(m,t){m&1&&(o(0,"sh-alert",6),M(1,4),i())}var _=new q,N=class m{#e=p(R);#n=p(U);rememberMe=W("rememberMe",!1,!0);failedLogin=a(!1);successLogin=a(!1);isLoading=a(!1);loginForm=_.group({user:_.control(""),pass:_.control("",v.required),rememberMe:_.control(this.rememberMe())});showPassword=a(!1);passwordInput=y("passwordInput");passwordEffect=D(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(t=>this.rememberMe.set(t??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let t=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&t&&(this.isLoading.set(!0),this.#n.login(t,this.rememberMe()).pipe(S(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||m)};static \u0275cmp=T({type:m,selectors:[["app-login"]],viewQuery:function(n,e){n&1&&O(e.passwordInput,Z,5),n&2&&P()},decls:24,vars:6,consts:()=>{let t;t=$localize`Enter your password`;let n;n=$localize` Password ${"\uFFFD#10\uFFFD"}:START_LINK:${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#10\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize` Keep me logged in ${"\uFFFD#21\uFFFD\uFFFD/#21\uFFFD"}:TAG_INPUT:`;let c;return c=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],n,e,s,c,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",t,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,e){if(n&1){let s=E();o(0,"form",5),C("submit",function(){return F(s),f(e.submit())}),L(1,ee,2,0,"sh-alert",6),o(2,"div",7),r(3,"app-logo"),i(),o(4,"div",8)(5,"div",9),r(6,"input",10),o(7,"sh-form-field")(8,"label",11),g(9,1),o(10,"a",12),r(11,"sh-icon"),i(),d(),i(),r(12,"input",13,0),o(14,"sh-icon",14),C("click",function(){return F(s),f(e.showPassword.set(!e.showPassword()))}),b(15),i()(),o(16,"button",15),g(17,2),r(18,"sh-icon"),d(),i()(),o(19,"sh-checkbox",16),g(20,3),r(21,"input",17),d(),i(),o(22,"div",18),r(23,"label",19),i()()()}n&2&&(h("formGroup",e.loginForm),l(),I(e.failedLogin()&&!e.successLogin()?1:-1),l(11),h("type",e.showPassword()?"text":"password"),l(3),G(e.showPassword()?"eye":"eye-slash"),l(),w("loader",e.isLoading()))},dependencies:[z,J,A,$,k,x,X,V,Y,Q,H,j,K,B],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-LEYSCNJE.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-IKPQDSQK.js")},{path:"live",loadComponent:()=>import("./chunk-IFCA5KWR.js")}]}],t=o;export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-35ZUPRX7.js";import{a as H}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-35ZUPRX7.js";import{a as H}from"./chunk-E6DCTQ34.js";import{a as q}from"./chunk-POJT4MSX.js";import"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-TC7HZO7D.js";import{B as J,C as K,G as X,K as j,c as A,e as I,i as U,s as V,u as G,w as W}from"./chunk-TGNUULAU.js";import{d as B}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as s,Cb as D,Db as r,Eb as l,Fb as S,Fc as v,Mb as m,Rc as P,Sa as a,Sc as L,Tb as h,Ub as E,Vb as T,Xc as $,Yb as N,Zb as F,_ as p,cb as M,ea as C,fa as u,mc as x,nc as _,pa as f,sc as y,tc as w,uc as k,xb as c,yb as d}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Q=(t,n,e,o,i)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":o,"is-registered":i});function Y(t,n){t&1&&T(0,0,1)}function Z(t,n){t&1&&T(0,0,2)}function ee(t,n){if(t&1){let e=m();r(0,"button",8),F("click",function(){C(e);let i=s(2);return u(i.cancel())}),_(1,"Cancel registration"),l()}}function te(t,n){if(t&1&&(r(0,"div",5)(1,"p"),h(2,0),c(3,Y,1,0)(4,Z,1,0),E(),l(),S(5,"sh-progress-bar",6),c(6,ee,2,0,"button",7),l()),t&2){let e=s();a(3),d(e.state()==="unknown"?3:4),a(3),d((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ne(t,n){if(t&1){let e=m();r(0,"sh-form-field")(1,"label",9),T(2,1),l(),r(3,"input",10),k("ngModelChange",function(i){C(e);let g=s();return w(g.customRegisterUrl,i)||(g.customRegisterUrl=i),u(i)}),l()(),r(4,"button",11),F("click",function(){C(e);let i=s();return u(i.registerViaCustomUrl())}),T(5,2),l()}if(t&2){let e=s();a(3),y("ngModel",e.customRegisterUrl),a(),D("disabled",!e.customRegisterUrlValid())}}function ie(t,n){if(t&1){let e=m();r(0,"p"),_(1,"Visit console to finish connection"),l(),r(2,"button",8),F("click",function(){C(e);let i=s(2);return u(i.finishConnection())}),_(3,"Finish connection"),l()}}function oe(t,n){if(t&1){let e=m();r(0,"p"),_(1,"Something failed during registration we're missing claimUrl, please try again"),l(),r(2,"button",8),F("click",function(){C(e);let i=s(2);return u(i.retryWhenFaulted())}),_(3,"Retry"),l()}}function re(t,n){if(t&1&&c(0,ie,4,0)(1,oe,4,0),t&2){let e=s();d(e.claimUrl()!==null?0:1)}}function le(t,n){t&1&&(h(0,3,1),S(1,"p"),E())}function ae(t,n){t&1&&(h(0,3,2),S(1,"p"),E())}function se(t,n){if(t&1){let e=m();r(0,"sh-alert",12),h(1,3),c(2,le,2,0,"p")(3,ae,2,0,"p"),E(),l(),r(4,"button",8),F("click",function(){C(e);let i=s();return u(i.retryWhenFaulted())}),_(5," Retry "),r(6,"sh-icon"),_(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),d(e.typeParam()==="link"?2:3)}}function ce(t,n){t&1&&(r(0,"h3"),_(1,"Successfully connected"),l(),r(2,"p"),_(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=p(B);#n=p(z);#e=p(H);#i=p(q);isOldOpen=f(!1);typeParam=$.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=P(()=>{let n=this.#i.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=f(!1);customRegisterUrlValid=P(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=f(null);didTry=f(!1);stateEffect=L(()=>{let n=this.#e.registerUrl(),e=this.state(),o=this.typeParam(),i=this.registeringCounter();e==="inactive"&&o==="logon"&&n!==""&&(this.didTry()||(this.#e.beginRemoteRegistration(),this.didTry.set(!0))),e==="registering"?(i===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((i??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#t.navigate([""])});ngOnInit(){this.#e.refreshRemoteControlStatus()}finishConnection(){let n=this.#e.claimUrl();this.#n.open(n,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=M({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let o;o=$localize` Connect machine to console `;let i;return i=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,i=N(i),[n,e,o,i,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click","disabled"],[1,"error"]]},template:function(e,o){if(e&1&&(r(0,"sh-card",4),c(1,te,7,2,"div",5),c(2,ne,6,2),c(3,re,2,1),c(4,se,8,1),c(5,ce,4,0),l()),e&2){let i=o.state()==="unknown"||o.typeParam()!=="link"&&o.state()==="inactive"||o.state()==="registering",g=o.typeParam()==="link"&&o.state()==="inactive",O=o.state()==="connected"||o.state()==="disabled"||o.state()==="connecting",b=o.state()==="registeringfaulted";x(v(7,Q,i,g,O,b,o.state()==="registered")),a(),d(i?1:-1),a(),d(g?2:-1),a(),d(o.state()==="registered"?3:-1),a(),d(b?4:-1),a(),d(O?5:-1)}},dependencies:[V,A,I,U,X,J,j,K,W,G],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width: 768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}"],changeDetection:0})};export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as _}from"./chunk-
|
|
1
|
+
import{u as _}from"./chunk-TGNUULAU.js";import{Db as o,Eb as n,Sa as r,Xc as C,Zb as m,_c as u,ac as f,bc as a,cb as g,kc as h,nc as s,xb as d,yb as p}from"./chunk-ZBK64QS2.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],M=["[title]","[description]","[action]","*"];function P(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"sh-icon"),s(1,"caret-down"),n())}var l=class e{isActive=u(!1);disallowToggle=C(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&h("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,P,1,0),d(5,T,2,0,"sh-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-ZNZH3TU5.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as se}from"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import{a as le,b as m}from"./chunk-WJDMMKWE.js";import{a as b}from"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{b as oe}from"./chunk-TC7HZO7D.js";import{B as ae,G as ie,X as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-TGNUULAU.js";import{b as q,e as j}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as d,D as G,Db as n,Eb as i,F as g,Fb as c,G as L,H as p,Rc as E,Sa as _,Sc as P,Tb as u,Ub as h,Vb as A,Wb as H,Xb as J,Zb as T,_ as F,cb as V,kc as C,mc as K,nc as D,pa as s,r as y,sc as X,tc as z,uc as W,xb as w,yb as U}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Xe}from"./chunk-ZNZH3TU5.js";import{a as ee}from"./chunk-J34TTKLN.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as Ke}from"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import{b as Je,c as ce}from"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{b as de}from"./chunk-TC7HZO7D.js";import{B as se,E as Be,F as be,K as Fe,T as ke,U as Ue,u as H}from"./chunk-TGNUULAU.js";import{b as ye,e as xe}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import{la as V,oa as re}from"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as C,Ab as b,Bb as k,Cb as z,Db as o,Eb as i,Fb as s,Gc as u,Hc as L,Ic as S,Jb as G,Jc as h,Kb as P,Mb as U,Rc as ve,Sa as a,Tb as N,Ub as m,Vb as l,Wb as d,Xb as c,Xc as le,Yb as R,Zb as I,_ as x,cb as X,ea as D,fa as M,kc as $,nc as E,oc as K,pa as A,pc as f,qc as Ie,r as J,rc as $e,vc as fe,wc as he,xb as g,xc as w,yb as T,zb as B}from"./chunk-ZBK64QS2.js";import{a as _e}from"./chunk-EUDKD2JW.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.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)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.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)}"],changeDetection:0})};export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-SQSTMZR3.js";import{a as m}from"./chunk-6Q6SSTBK.js";import{a as k}from"./chunk-AE7T2DAH.js";import{a as r}from"./chunk-KLODM6IK.js";import{b}from"./chunk-TC7HZO7D.js";import{F as i,H as u,R as c,Rc as p,Sc as d,V as o,_ as s,pa as a}from"./chunk-ZBK64QS2.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=d(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-SQSTMZR3.js";import{b as y}from"./chunk-WJDMMKWE.js";import{a as b}from"./chunk-AE7T2DAH.js";import"./chunk-IEGVSOLM.js";import{b as x}from"./chunk-TC7HZO7D.js";import{B as U,K as $,u as k}from"./chunk-TGNUULAU.js";import"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Cb as L,Db as a,Eb as r,Fb as d,H as g,Mb as E,Pa as O,Rc as I,Sa as l,Tb as M,Ub as R,Vb as T,Wb as f,Xb as F,Zb as N,_ as p,cb as P,ea as m,fa as C,kc as v,nc as u,oc as D,pa as S,r as G,xb as s,yb as _}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),n&2){let e,t,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((t=i.serverState())==null?null:t.UpdatedVersion),F(1)}}function J(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();v("loader",t.checkingForUpdates()),l(2),_((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(n,o){n&1&&d(0,"sh-progress-bar",3)}var h=class n{#e=p(x);#t=p(w);#n=p(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=I(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(t.isLoading()?0:-1),l(5),f(t.duplicatiVersion()),F(5),l(2),_(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(t.generalInfo())}},dependencies:[$,U,k],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-ZNZH3TU5.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import{T as S}from"./chunk-TGNUULAU.js";import{c as u,e as N,f as c}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Db as e,Eb as t,Fb as T,Vb as n,cb as g}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as V}from"./chunk-DQAT6VCF.js";import{B as A,I as D,S as F,u as k}from"./chunk-
|
|
1
|
+
import{a as V}from"./chunk-DQAT6VCF.js";import{B as A,I as D,S as F,u as k}from"./chunk-TGNUULAU.js";import{la as $}from"./chunk-NXROYR6L.js";import{$b as d,Ab as S,Bb as f,Cb as M,Db as o,Eb as i,Fb as P,Gc as R,Ic as y,Mb as N,Sa as l,Sc as v,Vb as m,Xc as u,Zb as G,_ as O,cb as x,ea as I,fa as h,jc as w,kc as E,nc as s,oc as L,pa as T,pc as _,xb as g,yb as p,zb as C}from"./chunk-ZBK64QS2.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function J(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,J,2,1,"li",null,C),i()()),n&2){let e=d(2).$implicit,a=d(2);l(2),f(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function j(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,X,2,1,"li",null,C),i()()),n&2){let e=d(2).$implicit,a=d(2);l(2),f(a.breakIntoLines(e.Message))}}function z(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),g(13,U,4,0,"code"),g(14,j,4,0,"code"),i()()),n&2){let e=d().$implicit;l(4),_("ID: ",e.ID),l(2),_("Type: ",e.Type),l(2),_("Tag: ",e.Tag),l(2),_("TaskID: ",e.TaskID),l(2),_("MessageID: ",e.MessageID),l(),p(e.Exception?13:-1),l(),p(e.Message?14:-1)}}function W(n,t){if(n&1){let e=N();o(0,"tr",10),G("click",function(){let r=I(e).$index,c=d(2);return h(c.toggleRow(r))}),o(1,"td"),s(2),R(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"sh-icon"),s(9,"caret-down"),i()()()(),g(10,z,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,r=d(2);l(2),L(y(3,5,e.When,"medium")),l(3),L(r.subStringMessage(e.Message)),l(2),E("rotated-icon",a===r.openRowIndex()),l(3),p(a===r.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"sh-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),P(6,"th",8),i(),S(7,W,11,8,null,null,C),o(9,"div",9),m(10,3),i()()),n&2){let e=d();w("grid-template-columns","auto 1fr auto"),E("type-b",e.asSimpleList()),M("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var b=class n{#e=O(V);whenFilter=u();backupIdFilter=u();asSimpleList=u();polling=u();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=v(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=T(null);whenEffect=v(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=v(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=x({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&E("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let r;return r=$localize`No data available`,[t,e,a,r,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["table-header",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&g(0,B,2,0,"div",4)(1,H,11,6,"sh-table",5),e&2&&p(a.logLevel()==="Disabled"?0:1)},dependencies:[F,k,D,A,$],styles:["[_nghost-%COMP%]{display:block;padding:0 2rem}.simple-list[_nghost-%COMP%] sh-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-2);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{b as a};
|