@duplicati/ngclient 0.0.51 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/{chunk-QVBSCQE5.js → chunk-357MEO73.js} +1 -1
- package/{chunk-PG6H3R6N.js → chunk-52PLNEEU.js} +1 -1
- package/{chunk-5CNGSXWF.js → chunk-6XUGGGJW.js} +1 -1
- package/{chunk-2JNOYYQN.js → chunk-7RHSTKHT.js} +1 -1
- package/{chunk-3RFC4Q5V.js → chunk-7ZY4AW73.js} +1 -1
- package/chunk-AH6CKHEO.js +1 -0
- package/{chunk-VQMEOBKY.js → chunk-ASLXFJ7P.js} +1 -1
- package/{chunk-FNBPWR4X.js → chunk-BL5WAVG2.js} +1 -1
- package/chunk-DNXP5WQT.js +1 -0
- package/{chunk-TFD4HD6F.js → chunk-E6NXFEY6.js} +1 -1
- package/{chunk-WDHZG25P.js → chunk-ETMR6JG6.js} +1 -1
- package/{chunk-CKTCGJPR.js → chunk-FDP453LU.js} +1 -1
- package/chunk-FUENP7LQ.js +1 -0
- package/chunk-GUN4SA7I.js +1 -0
- package/chunk-HGKCNEQ4.js +1 -0
- package/{chunk-6XZQG7L7.js → chunk-HRUCGEQL.js} +1 -1
- package/{chunk-LQL7UFPH.js → chunk-HW2X3WEE.js} +1 -1
- package/{chunk-WMC5H5UV.js → chunk-IQNE6QMR.js} +1 -1
- package/{chunk-YK6SXMBM.js → chunk-JRLAYIPU.js} +1 -1
- package/{chunk-DV7N4NYO.js → chunk-JXIGJTFX.js} +1 -1
- package/chunk-K4MW4VO5.js +1 -0
- package/{chunk-MWCNA7Y5.js → chunk-MRRA6ZB2.js} +1 -1
- package/{chunk-FALW4SDX.js → chunk-NZ5QQIUJ.js} +1 -1
- package/chunk-NZJCL3BX.js +1 -0
- package/{chunk-LDPVZ7HY.js → chunk-O2H7Y4ND.js} +1 -1
- package/chunk-OSW3OQOK.js +1 -0
- package/chunk-PFQRJ432.js +1 -0
- package/chunk-QVWFLRMY.js +1 -0
- package/{chunk-OJUBI3TM.js → chunk-R5ARSI2W.js} +1 -1
- package/{chunk-4765QCNT.js → chunk-TLM42G2X.js} +1 -1
- package/{chunk-YWZWJHRE.js → chunk-TOUGWZ56.js} +1 -1
- package/chunk-VBS3YNVR.js +1 -0
- package/chunk-VOU7RGKU.js +1 -0
- package/{chunk-OYSDTWXA.js → chunk-XWIXIQIA.js} +1 -1
- package/{chunk-Z7UXXM2M.js → chunk-XWRLDJ4Y.js} +1 -1
- package/chunk-YFA44VRS.js +1 -0
- package/{chunk-MJJYBD2L.js → chunk-ZS2AJHUM.js} +1 -1
- package/index.html +2 -2
- package/{main-PXBN3JIX.js → main-2QEWSHOD.js} +1 -1
- package/package.json +1 -1
- package/styles-AIQ3E4AK.css +1 -0
- package/chunk-2UNV5KQ7.js +0 -1
- package/chunk-5FSG4VRJ.js +0 -1
- package/chunk-7PE677UQ.js +0 -1
- package/chunk-EMJLB63Y.js +0 -1
- package/chunk-FFD5RG7J.js +0 -1
- package/chunk-FJKXE3RZ.js +0 -1
- package/chunk-IE4GYLKI.js +0 -1
- package/chunk-JRYVI7GA.js +0 -1
- package/chunk-N23IUXUM.js +0 -1
- package/chunk-U4SEXW7F.js +0 -1
- package/chunk-VOVR4GPX.js +0 -1
- package/chunk-WVBAR46B.js +0 -1
- package/chunk-XMM537S7.js +0 -1
- package/styles-QS7LVTVV.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as B}from"./chunk-PSJAIBCQ.js";import{a as D,u as U}from"./chunk-
|
|
1
|
+
import{b as B}from"./chunk-PSJAIBCQ.js";import{a as D,u as U}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import{pa as R}from"./chunk-X566VMXX.js";import{Ab as a,Bb as u,E as S,Fb as v,Ka as T,Nb as p,Oa as l,Rb as A,Sb as c,Va as d,X as O,bb as f,ca as M,da as L,ec as _,fc as g,hb as E,jc as $,kc as k,lc as y,qb as m,rb as P,sb as h,sc as G,uc as w,vb as b,wb as N,xb as x,yb as I,zb as o}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{console.log(n),this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
|
|
2
2
|
`),t="";for(let i=0;i<e.length;i++)t+=`<li>${e[i]}</li>`;return t}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["app-logs"]],decls:15,vars:2,consts:()=>{let n;n=$localize`Timestamp`;let e;e=$localize`Backup ID`;let t;t=$localize`Message`;let i;return i=$localize`No data available`,[n,e,t,i,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol",3,"innerHTML"]]},template:function(e,t){e&1&&(o(0,"h3"),_(1,"Logs"),a(),o(2,"spk-table",4),y("dataChange",function(r){return k(t.logs,r)||(t.logs=r),r}),o(3,"tr",5)(4,"th"),p(5,0),a(),o(6,"th"),p(7,1),a(),o(8,"th"),p(9,2),a(),u(10,"th"),a(),x(11,z,13,9,null,null,N),o(13,"div",6),p(14,3),a()()),e&2&&(l(2),$("data",t.logs),m("loading",t.logsLoading()),l(9),I(t.logs()))},dependencies:[U,R,D],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-QXNJFFEM.js";import{b as A}from"./chunk-PSJAIBCQ.js";import{c as I,d as y}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as w,c as V,g as x,l as X,y as U}from"./chunk-
|
|
1
|
+
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-QXNJFFEM.js";import{b as A}from"./chunk-PSJAIBCQ.js";import{c as I,d as y}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as w,c as V,g as x,l as X,y as U}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import{Ab as r,Bb as _,E as g,L as T,Lb as C,Mb as O,Nb as f,Oa as F,Qb as N,Rb as m,Va as p,X as u,bb as R,ec as M,hb as S,oc as k,qb as c,sb as D,vb as E,zb as i}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new v,d=class l{#t=u(V);#e=u(A);#o=u(I);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>this.#e.postApiV1Backups({requestBody:e.data,temporary:!0})),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{console.log("/restore-draft",e.ID),this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=N(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),M(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",k(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[L,G,b,$,h,P,B,y,U,X,w,x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-JWC6WDAE.js";import"./chunk-XCS7POXG.js";import"./chunk-PSJAIBCQ.js";import"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{g as h}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-JWC6WDAE.js";import"./chunk-XCS7POXG.js";import"./chunk-PSJAIBCQ.js";import"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{g as h}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import{Ab as i,Bb as g,Nb as l,Oa as u,Tb as C,Ub as c,X as m,bb as s,ec as O,hb as _,vb as f,zb as t}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-R5ARSI2W.js";import"./chunk-VJJVFTK5.js";import"./chunk-TLM42G2X.js";import"./chunk-NZ5QQIUJ.js";import"./chunk-TYEKJAUH.js";import"./chunk-QTTCN7A7.js";import"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as W}from"./chunk-
|
|
1
|
+
import{g as W}from"./chunk-R5ARSI2W.js";import"./chunk-VJJVFTK5.js";import"./chunk-TLM42G2X.js";import"./chunk-NZ5QQIUJ.js";import{b as E}from"./chunk-TYEKJAUH.js";import"./chunk-QTTCN7A7.js";import{a as G}from"./chunk-GUN4SA7I.js";import"./chunk-O47LGUY4.js";import"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import{a as $,b as P,d as L,e as M}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{p as N,t as I}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-R6C4MOOH.js";import"./chunk-X566VMXX.js";import"./chunk-BI7LIYF6.js";import{Ab as i,Bb as n,Jc as A,Lb as F,Mb as r,Oa as R,Sb as u,X as T,bb as m,hb as f,oc as p,pc as l,qb as _,vb as C,zb as o}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var y=()=>["/restore-from-files/destination"],v=()=>["/restore-from-files/encryption"],h=()=>["/restore-from-files/select-files"],K=()=>["/restore-from-files/options"],X=e=>["/restore-draft",e],w=e=>["/restore-draft",e,"options"],b=e=>["/restore",e],x=e=>["/restore",e,"options"];function z(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,y)),R(3),_("routerLink",p(5,v)),R(3),_("routerLink",p(6,h)),R(3),_("routerLink",p(7,K)))}function j(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,X,t.backupId())),R(3),_("routerLink",l(4,w,t.backupId()))}}function B(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}var c=class e{#t=T($);#e=T(W);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=A(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore-flow"]],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let O;O=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let g;g=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let D;return D=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,O,g,k,D,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),f(2,z,12,8)(3,j,6,6)(4,B,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),C(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[I,N,G,P,L,M],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as $}from"./chunk-TYEKJAUH.js";import{a as R}from"./chunk-GUN4SA7I.js";import"./chunk-O47LGUY4.js";import"./chunk-QXNJFFEM.js";import{b as k}from"./chunk-PSJAIBCQ.js";import{a as A,d as N}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as B,g as O}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-R6C4MOOH.js";import"./chunk-X566VMXX.js";import"./chunk-BI7LIYF6.js";import{Ab as a,Bb as r,Hc as M,Lb as _,Mb as c,Nb as u,Oa as i,Qb as T,Rb as I,Va as l,X as m,bb as C,ec as E,gc as L,hb as p,vb as s,wb as f,xb as S,yb as g,zb as F}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-JWC6WDAE.js";import{b as h,c as N,d as S,e as b,h as w,l as y,o as L,p as M,r as P}from"./chunk-QXNJFFEM.js";import"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-JWC6WDAE.js";import"./chunk-XCS7POXG.js";import{b as h,c as N,d as S,e as b,h as w,l as y,o as L,p as M,r as P}from"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import{c as C}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as v,g as O,l as E}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import{Ab as i,Bb as f,E as p,Oa as m,Rb as _,Va as d,X as s,bb as c,ec as n,qb as u,sb as g,zb as t}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var G=new M,a=class l{#e=s(C);#t=s(F);isLoading=d(!1);loginForm=G.group({pass:G.control("",N.required)});submit(){let e=this.loginForm.value.pass;e&&(this.isLoading.set(!0),this.#t.login(e).pipe(p(()=>this.isLoading.set(!1))).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=c({type:l,selectors:[["app-login"]],decls:13,vars:3,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],[1,"login-row"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,r){o&1&&(t(0,"form",0),_("submit",function(){return r.submit()}),t(1,"div",1)(2,"spk-form-field")(3,"label",2),n(4," Password "),t(5,"a",3)(6,"spk-icon"),n(7,"question"),i()()(),f(8,"input",4),i(),t(9,"button",5),n(10," Login "),t(11,"spk-icon"),n(12,"arrow-right"),i()()()()),o&2&&(u("formGroup",r.loginForm),m(9),g("loader",r.isLoading()))},dependencies:[P,w,h,S,b,y,L,E,v,O],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:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-YFA44VRS.js";import{Ab as n,Oa as g,Rb as h,Tb as _,Ub as a,Ya as d,bb as p,ec as s,hb as m,pa as r,sb as f,vb as C,zb as o}from"./chunk-NHACGZPI.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,l){e&1&&s(0,"Title")}function T(e,l){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var c=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-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%] spk-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{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as a,p as b}from"./chunk-TOUGWZ56.js";import"./chunk-TLM42G2X.js";import"./chunk-NZ5QQIUJ.js";import"./chunk-DNHLTHLR.js";import"./chunk-TYEKJAUH.js";import"./chunk-QTTCN7A7.js";import"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as g}from"./chunk-
|
|
1
|
+
import{q as g}from"./chunk-TOUGWZ56.js";import"./chunk-TLM42G2X.js";import"./chunk-NZ5QQIUJ.js";import"./chunk-DNHLTHLR.js";import{b as k}from"./chunk-TYEKJAUH.js";import"./chunk-QTTCN7A7.js";import{a as I}from"./chunk-GUN4SA7I.js";import{a as N}from"./chunk-O47LGUY4.js";import"./chunk-QXNJFFEM.js";import{b as O}from"./chunk-PSJAIBCQ.js";import{a as P,b as h,d as E,e as B}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{o as $,p as M,t as b}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-R6C4MOOH.js";import"./chunk-X566VMXX.js";import"./chunk-BI7LIYF6.js";import{Ab as p,B as m,Bb as n,Jc as A,Lb as d,Mb as c,Oa as r,X as F,bb as f,hb as C,nc as R,qb as u,qc as _,vb as D,zb as s}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=F(P);#e=F(g);#a=F(N);#i=F(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(l=>l.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k}from"./chunk-GUN4SA7I.js";import"./chunk-O47LGUY4.js";import"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import{d as S}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as T,g as M,h as f}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-R6C4MOOH.js";import"./chunk-X566VMXX.js";import"./chunk-BI7LIYF6.js";import{Ab as n,Bb as _,Lb as s,Mb as l,Nb as i,Oa as c,bb as D,oc as d,qb as r,zb as e}from"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as a,n as b}from"./chunk-TOUGWZ56.js";import"./chunk-TLM42G2X.js";import"./chunk-NZ5QQIUJ.js";import"./chunk-DNHLTHLR.js";import"./chunk-TYEKJAUH.js";import"./chunk-QTTCN7A7.js";import"./chunk-QXNJFFEM.js";import"./chunk-PSJAIBCQ.js";import"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import"./chunk-X566VMXX.js";import"./chunk-NHACGZPI.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ye}from"./chunk-NZ5QQIUJ.js";import{b as ve,c as ee}from"./chunk-TYEKJAUH.js";import{a as Ie}from"./chunk-FH6MENLO.js";import{a as fe}from"./chunk-GUN4SA7I.js";import"./chunk-O47LGUY4.js";import"./chunk-QXNJFFEM.js";import{b as Q}from"./chunk-PSJAIBCQ.js";import{a as Pe,d as De}from"./chunk-B5F2IYXZ.js";import"./chunk-UMMURHDH.js";import{a as k,g as Y,k as Re,o as Z,v as Me}from"./chunk-YFA44VRS.js";import"./chunk-U5DDVNLJ.js";import{a as $e}from"./chunk-R6C4MOOH.js";import{pa as J,sa as H}from"./chunk-X566VMXX.js";import"./chunk-BI7LIYF6.js";import{Ab as n,Bb as s,Cb as x,Db as b,Fb as j,Lb as T,Mb as A,Nb as r,Oa as i,Ob as p,Pb as F,Qb as y,Rb as R,Sb as E,Va as L,X as f,bb as I,ca as z,da as V,ec as u,fc as M,gc as q,hb as O,ic as Ne,p as $,pa as W,qb as v,sb as S,sc as d,tc as c,uc as C,vb as g,wb as N,xb as P,yb as D,zb as t}from"./chunk-NHACGZPI.js";import{a as w}from"./chunk-C6Q5SG76.js";function be(o,a){o&1&&s(0,"spk-progress-bar",31)}function Be(o,a){o&1&&s(0,"div",34)}function he(o,a){o&1&&s(0,"div",35)}function Ke(o,a){o&1&&s(0,"div",36)}function Ue(o,a){if(o&1&&u(0),o&2){let e=E().$implicit;q(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function Xe(o,a){if(o&1&&(t(0,"details",45)(1,"summary"),T(2,15),s(3,"spk-icon"),t(4,"div",46),s(5,"spk-icon",39),n(),A(),n(),t(6,"div",47)(7,"p"),r(8,16),d(9,"date"),n(),t(10,"p"),r(11,17),d(12,"date"),n(),t(13,"p"),r(14,18),d(15,"durationFormat"),n(),t(16,"p"),r(17,19),n(),s(18,"spk-divider"),t(19,"p"),r(20,20),n(),t(21,"p"),r(22,21),n()()(),t(23,"details",45)(24,"summary")(25,"spk-icon"),u(26,"file-archive"),n(),u(27," Compression phase "),t(28,"div",46)(29,"spk-icon",39),u(30,"caret-down"),n()()(),t(31,"div",47)(32,"p"),r(33,22),d(34,"date"),n(),t(35,"p"),r(36,23),d(37,"date"),n(),t(38,"p"),r(39,24),d(40,"durationFormat"),n(),s(41,"spk-divider"),t(42,"p"),r(43,25),d(44,"bytes"),n(),t(45,"p"),r(46,26),d(47,"bytes"),n(),t(48,"p"),r(49,27),d(50,"bytes"),n(),s(51,"spk-divider"),t(52,"p"),r(53,28),n(),t(54,"p"),r(55,29),n()()()),o&2){let e=E(2).$implicit;i(9),p(C(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),F(8),i(3),p(C(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),F(11),i(3),p(c(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),F(14),i(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),F(17),i(3),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),F(20),i(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),F(22),i(12),p(C(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),F(33),i(3),p(C(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),F(36),i(3),p(c(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),F(39),i(4),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(c(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),F(43),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(c(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),F(46),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(c(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),F(49),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),F(53),i(2),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),F(55)}}function we(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function ze(o,a){if(o&1&&(t(0,"details",45)(1,"summary"),T(2,30),s(3,"spk-icon"),t(4,"div",46),s(5,"spk-icon",39),n(),A(),n(),t(6,"div",47),P(7,we,3,3,"code",null,N),n()()),o&2){let e=E(2).$implicit;i(5),p(e.data.VerificationsActualLength),F(2),i(2),D(e.data.Verifications)}}function Ve(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function We(o,a){o&1&&(t(0,"p"),u(1,"No errors"),n())}function je(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function qe(o,a){if(o&1&&(t(0,"section",40)(1,"app-toggle-card",41),x(2,42),t(3,"h3"),r(4,0),n(),b(),x(5,43),t(6,"p"),r(7,1),d(8,"date"),n(),t(9,"p"),r(10,2),d(11,"date"),n(),t(12,"p"),r(13,3),d(14,"durationFormat"),n(),b(),n(),t(15,"app-toggle-card",41),x(16,42),t(17,"h3"),r(18,4),n(),b(),x(19,43),t(20,"p"),r(21,5),d(22,"bytes"),n(),t(23,"p"),r(24,6),d(25,"bytes"),n(),t(26,"p"),r(27,7),d(28,"bytes"),n(),t(29,"p"),r(30,8),d(31,"bytes"),n(),t(32,"p"),r(33,9),n(),t(34,"p"),r(35,10),n(),t(36,"p"),r(37,11),n(),b(),n(),t(38,"div",44),s(39,"spk-divider"),O(40,Xe,56,39)(41,ze,9,1,"details",45),t(42,"details",45)(43,"summary"),T(44,12),s(45,"spk-icon"),t(46,"div",46),s(47,"spk-icon",39),n(),A(),n(),t(48,"div",47),P(49,Ve,3,3,"code",null,N),n()(),t(51,"details",45)(52,"summary"),T(53,13),s(54,"spk-icon"),t(55,"div",46),s(56,"spk-icon",39),n(),A(),n(),t(57,"div",47),O(58,We,2,0,"p"),P(59,je,3,3,"code",null,N),n()(),s(61,"spk-divider"),t(62,"details")(63,"summary"),T(64,14),s(65,"spk-icon"),t(66,"div",46),s(67,"spk-icon",39),n(),A(),n(),t(68,"code")(69,"button",48),u(70,"Copy"),n(),u(71),d(72,"json"),n()()()()),o&2){let e=E().$implicit;i(),v("disallowToggle",!0),i(7),p(C(8,22,e.data==null?null:e.data.BeginTime,"medium")),F(7),i(3),p(C(11,25,e.data==null?null:e.data.EndTime,"medium")),F(10),i(3),p(c(14,28,e.data==null?null:e.data.Duration)),F(13),i(),v("disallowToggle",!0),i(7),p(e.data==null?null:e.data.ExaminedFiles)(c(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),F(21),i(3),p(e.data==null?null:e.data.OpenedFiles)(c(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),F(24),i(3),p(e.data==null?null:e.data.AddedFiles)(c(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),F(27),i(3),p(e.data==null?null:e.data.ModifiedFiles)(c(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),F(30),i(2),p(e.data==null?null:e.data.DeletedFiles),F(33),i(2),p(e.data==null?null:e.data.TooLargeFiles),F(35),i(2),p(e.data==null?null:e.data.FilesWithError),F(37),i(3),g((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),i(),g((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),i(6),p(e.data==null?null:e.data.WarningsActualLength),F(44),i(2),D(e.data==null?null:e.data.Warnings),i(7),p(e.data==null?null:e.data.ErrorsActualLength),F(53),i(2),g((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),i(),D(e.data==null?null:e.data.Errors),i(12),q(" ",c(72,38,e.data)," ")}}function Je(o,a){if(o&1){let e=j();t(0,"article",32)(1,"header",33),R("click",function(){let m=z(e).$implicit,G=E();return V(G.toggleOpenEntry(m.id))}),O(2,Be,1,0,"div",34)(3,he,1,0,"div",35)(4,Ke,1,0,"div",36),t(5,"h3"),u(6),d(7,"date"),n(),t(8,"p"),u(9),O(10,Ue,1,1),n(),s(11,"div",37),t(12,"div",38)(13,"spk-icon",39),u(14,"caret-down"),n()()(),O(15,qe,73,40,"section",40),n()}if(o&2){let e=a.$implicit,l=E();i(2),g(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),i(4),M(C(7,7,e.timestamp,"medium")),i(3),q(" ",e.data==null?null:e.data.MainOperation," "),i(),g(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),i(3),S("open",e.id===l.openEntry()),i(2),g(e.id===l.openEntry()?15:-1)}}var ne=class o{#e=f(Q);backupId=W.required();openEntry=L(null);pagination=L({offset:0,pagesize:100});resource=ee({request:()=>w({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe($(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let m;m=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let G;G=$localize`Source files`;let oe;oe=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let ae;ae=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let le;le=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let _e;_e=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let re;re=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let se;se=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let pe;pe=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let B;B=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,B=y(B);let h;h=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,h=y(h);let K;K=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,K=y(K);let U;U=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,U=y(U);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let de;de=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ue;ue=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ce;ce=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Te;Te=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let X;return X=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,X=y(X),[a,e,l,m,G,oe,ae,le,_e,re,se,pe,B,h,K,U,Fe,de,ue,ce,ge,Ee,me,Oe,Ce,Le,Te,Ae,Ge,Se,X,[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"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(O(0,be,1,0,"spk-progress-bar",31),P(1,Je,16,10,"article",32,N)),e&2&&(g(l.resource.isLoading()?0:-1),i(),D(l.resource.value()))},dependencies:[ye,Re,Z,Y,k,$e,J,Ie,H],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-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.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-level-60)}.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-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}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%] spk-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%] spk-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-level-20)}.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-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--warn-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--tertiary-500)}"],changeDetection:0})};function He(o,a){o&1&&s(0,"spk-progress-bar",0)}function Qe(o,a){if(o&1&&(t(0,"section",5)(1,"code"),u(2),d(3,"json"),n()()),o&2){let e=E().$implicit;i(2),M(c(3,1,e.data))}}function Ye(o,a){if(o&1){let e=j();t(0,"article",1)(1,"header",2),R("click",function(){let m=z(e).$implicit,G=E();return V(G.toggleOpenEntry(m.id))}),t(2,"h3"),u(3),d(4,"date"),n(),t(5,"div",3)(6,"spk-icon",4),u(7,"caret-down"),n()()(),O(8,Qe,4,3,"section",5),n()}if(o&2){let e=a.$implicit,l=E();i(3),Ne("",C(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),i(3),S("open",e.id===l.openEntry()),i(2),g(e.id===l.openEntry()?8:-1)}}var te=class o{#e=f(Q);backupId=W.required();openEntry=L(null);pagination=L({offset:0,pagesize:100});resource=ee({request:()=>w({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe($(e=>(console.log(e),e.map((l,m)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null})))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(O(0,He,1,0,"spk-progress-bar",0),P(1,Ye,9,9,"article",1,N)),e&2&&(g(l.resource.isLoading()?0:-1),i(),D(l.resource.value()))},dependencies:[H,Z,k,J],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-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.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-level-60)}.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}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function Ze(o,a){if(o&1&&s(0,"app-general-log",7),o&2){let e=E();v("backupId",e.backupId())}}function en(o,a){if(o&1&&s(0,"app-remote-log",7),o&2){let e=E();v("backupId",e.backupId())}}var ie=class o{#e=f(Pe);backupId=ve(this.#e.params.pipe($(a=>a.id)));activeTab=L("general");static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-log"]],decls:13,vars:6,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;return l=$localize` Destination `,[a,e,l,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"primary"],["tab","",3,"click"],[3,"backupId"]]},template:function(e,l){e&1&&(s(0,"app-status-bar"),t(1,"section")(2,"div",3)(3,"button",4),T(4,0),s(5,"spk-icon"),A(),n()(),t(6,"spk-tabs",5)(7,"button",6),R("click",function(){return l.activeTab.set("general")}),r(8,1),n(),t(9,"button",6),R("click",function(){return l.activeTab.set("destination")}),r(10,2),n()(),O(11,Ze,1,1,"app-general-log",7)(12,en,1,1,"app-remote-log",7),n()),e&2&&(i(7),S("active",l.activeTab()==="general"),i(2),S("active",l.activeTab()==="destination"),i(2),g(l.activeTab()==="general"?11:-1),i(),g(l.activeTab()==="destination"?12:-1))},dependencies:[Me,ne,te,De,fe,k,Y],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0})};export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as De}from"./chunk-VJJVFTK5.js";import{a as Y}from"./chunk-4765QCNT.js";import{a as ye}from"./chunk-FALW4SDX.js";import{b as w}from"./chunk-TYEKJAUH.js";import{a as Ne,b as M,d as h,e as k,h as L,j as Pe,l as $,o as y,p as D,r as A}from"./chunk-QXNJFFEM.js";import{b as I}from"./chunk-PSJAIBCQ.js";import{a as P,c as d}from"./chunk-B5F2IYXZ.js";import{a as b,g as v,l as Ie,o as Me,p as he,q as ke,r as Le,w as $e}from"./chunk-FFD5RG7J.js";import{pa as z}from"./chunk-X566VMXX.js";import{Ab as a,B as le,Bb as l,Cb as W,Db as B,E as f,Fb as X,Hc as Ce,Jc as Re,K as pe,L as _e,Lb as c,Mb as u,Nb as T,Oa as S,Ob as Ee,Pb as Te,R as ce,Rb as O,Sb as j,Va as _,X as p,bb as N,c as ne,ca as C,da as R,ec as V,hb as U,hc as Oe,l as re,nc as de,p as se,qb as m,sb as ue,sc as ge,uc as fe,v as ae,vb as x,wb as Fe,xb as Se,yb as me,zb as r}from"./chunk-NHACGZPI.js";var Ae=new D,we=()=>Ae.group({passphrase:Ae.control("")}),q=class s{#t=p(I);#e=p(g);#o=p(d);#i=p(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let o=this.#e.destinationTargetUrl();if(!o)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:o,Settings:t}},temporary:!0}).pipe(f(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let n=i.ID;this.#e.getBackup(n),this.#o.navigate([`/restore-draft/${n}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let o;o=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",o,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),T(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&m("formGroup",t.encryptionForm)},dependencies:[A,L,M,h,k,$,y,Ie,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function We(s,o){s&1&&l(0,"spk-progress-bar",7)}function Be(s,o){if(s&1&&(r(0,"spk-option",13),V(1),ge(2,"date"),a()),s&2){let e=o.$implicit;m("value",e.Version),S(),Oe(" ",e.Version,": ",fe(2,3,e.Time,"d MMM y, h:mm")," ")}}function Xe(s,o){s&1&&l(0,"spk-progress-bar",7)}function Ve(s,o){if(s&1&&(r(0,"app-file-tree",14)(1,"label",15),T(2,4),a(),l(3,"input",16),a()),s&2){let e=j(2);m("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function ze(s,o){if(s&1&&(r(0,"spk-select",11),l(1,"input",12),Se(2,Be,3,6,"spk-option",13,Fe),a(),U(4,Xe,1,0,"spk-progress-bar",7)(5,Ve,4,4,"app-file-tree",14)),s&2){let e=j();m("displayFn",e.displayFn())("hideClearButton",!0),S(2),me(e.versionOptions()),S(2),x(e.isDraft()&&e.isRepairing()||!e.rootPathLoaded()?4:-1),S(),x(e.rootPathLoaded()&&(e.isDraft()&&!e.isRepairing()||!e.isDraft())?5:-1)}}var K=new D,Ge=()=>K.group({filesToRestore:K.control(""),selectedOption:K.control(null),passphrase:K.control(null)}),J=class s{#t=p(I);#e=p(g);#o=p(d);#i=p(P);#n=p(z);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectedOptionSignal=w(this.selectFilesForm.controls.selectedOption.valueChanges);backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;backupSettings=Ce(()=>{let o=this.backupId(),e=this.selectFilesFormSignal(),t=e?.selectedOption?parseInt(e?.selectedOption):null;if(typeof t!="number"||!o)return null;let n=this.versionOptions()?.find(F=>F.Version===t)?.Time??null;return n?{id:o,time:n}:null});isRepairing=_(!1);repairEffect=Re(()=>{let o=this.#e.isDraft(),e=this.selectedOptionSignal();if(o&&e){let t=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:t,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(f(()=>this.isRepairing.set(!1))).subscribe()}});rootPathLoaded=_(!1);rootPath=De([this.selectFilesFormSignal,this.backupId],ne(pe([null,null]),_e(([o,e])=>{let t=o?.selectedOption?parseInt(o?.selectedOption):null,i=e;if(typeof t!="number"||!i)return re("/");let n=this.versionOptions()?.find(F=>F.Version===t);return this.#t.getApiV1BackupByIdFiles({id:i,time:n?.Time??"",prefixOnly:!1,folderContents:!0}).pipe(se(F=>(this.rootPathLoaded.set(!0),F.Files[0].Path)))})));displayFn(){let o=this.versionOptions();return e=>{if(!e)return"";let t=o?.find(i=>i.Version?.toString()===e);return t?`${t.Version}: ${this.#n.transform(t.Time,"d MMM y, h:mm")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-select-files"]],features:[de([z])],decls:13,vars:3,consts:()=>{let o;o=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],o,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let i=X();r(0,"form",5,0),O("submit",function(){return C(i),R(t.next())}),r(2,"h3",6),T(3,1),a(),U(4,We,1,0,"spk-progress-bar",7)(5,ze,6,4),r(6,"div",8)(7,"button",9),O("click",function(){return C(i),R(t.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",10),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(m("formGroup",t.selectFilesForm),S(4),x(t.versionOptionsLoading()?4:5),S(5),Ee(t.isFileRestore()?"Back":"Exit"),Te(8))},dependencies:[A,L,M,h,k,$,y,z,Y,v,ke,b,Le,Me],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var g=class s{#t=p(d);#e=p(I);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=Ge();optionsForm=xe();encryptionForm=we();optionsFormSignal=w(this.optionsForm.valueChanges);selectFilesFormSignal=w(this.selectFilesForm.valueChanges);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);init(o,e=!1,t=!1){this.backupId.set(o),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(o,!0)}updateTargetUrl(o){this.destinationTargetUrl.set(o)}submit(){this.isSubmitting.set(!0);let o=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,i=this.versionOptions()?.find(n=>n.Version===t.selectedOption);this.#e.postApiV1BackupByIdRestore({id:o??"",requestBody:{paths:t.filesToRestore?.split("\0").map(n=>`${n}*`)??[],passphrase:t.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(f(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:n=>{console.error("restore error",n)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(o,e=!1){this.versionOptionsLoading.set(!0),ae([this.#e.getApiV1BackupById({id:o}),this.#e.getApiV1BackupByIdFilesets({id:o})]).pipe(le(1),f(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,i])=>{this.versionOptions.set(i),this.backup.set(t),e&&i.length>0&&this.selectFilesForm.controls.selectedOption.setValue(i[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var G=new D,xe=()=>G.group({restoreFrom:G.control("orignal"),restoreFromPath:G.control(""),handleExisting:G.control("overwrite"),permissions:G.control(!1)}),Q=class s{#t=p(g);#e=p(d);#o=p(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-options"]],decls:39,vars:6,consts:()=>{let o;o=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let F;F=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize`Permissions`;let te;te=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ie;return ie=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],o,e,t,i,n,F,Z,ee,te,oe,ie,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let i=X();r(0,"form",12,0),O("submit",function(){return C(i),R(t.submit())}),r(2,"h3",13),T(3,1),a(),r(4,"app-toggle-card",14),W(5,15),T(6,2),B(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),V(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),W(18,15),T(19,5),B(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),W(27,15),T(28,8),B(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),O("click",function(){return C(i),R(t.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;m("formGroup",t.optionsForm),S(4),m("disallowToggle",!0),S(9),m("disabled",((i=t.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),m("disallowToggle",!0),S(19),ue("loader",t.isSubmitting())}},dependencies:[A,L,M,Ne,Pe,h,k,$,y,ye,Y,$e,he,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{xe as a,Q as b,we as c,q as d,Ge as e,J as f,g};
|
|
1
|
+
import{a as De}from"./chunk-VJJVFTK5.js";import{a as Y}from"./chunk-TLM42G2X.js";import{a as ye}from"./chunk-NZ5QQIUJ.js";import{b as w}from"./chunk-TYEKJAUH.js";import{a as Ne,b as M,d as h,e as k,h as L,j as Pe,l as $,o as y,p as D,r as A}from"./chunk-QXNJFFEM.js";import{b as I}from"./chunk-PSJAIBCQ.js";import{a as P,c as d}from"./chunk-B5F2IYXZ.js";import{a as b,g as v,l as Ie,o as Me,p as he,q as ke,r as Le,w as $e}from"./chunk-YFA44VRS.js";import{pa as z}from"./chunk-X566VMXX.js";import{Ab as a,B as le,Bb as l,Cb as W,Db as B,E as f,Fb as X,Hc as Ce,Jc as Re,K as pe,L as _e,Lb as c,Mb as u,Nb as T,Oa as S,Ob as Ee,Pb as Te,R as ce,Rb as O,Sb as j,Va as _,X as p,bb as N,c as ne,ca as C,da as R,ec as V,hb as U,hc as Oe,l as re,nc as de,p as se,qb as m,sb as ue,sc as ge,uc as fe,v as ae,vb as x,wb as Fe,xb as Se,yb as me,zb as r}from"./chunk-NHACGZPI.js";var Ae=new D,we=()=>Ae.group({passphrase:Ae.control("")}),q=class s{#t=p(I);#e=p(g);#o=p(d);#i=p(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let o=this.#e.destinationTargetUrl();if(!o)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:o,Settings:t}},temporary:!0}).pipe(f(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let n=i.ID;this.#e.getBackup(n),this.#o.navigate([`/restore-draft/${n}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let o;o=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",o,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),T(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&m("formGroup",t.encryptionForm)},dependencies:[A,L,M,h,k,$,y,Ie,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function We(s,o){s&1&&l(0,"spk-progress-bar",7)}function Be(s,o){if(s&1&&(r(0,"spk-option",13),V(1),ge(2,"date"),a()),s&2){let e=o.$implicit;m("value",e.Version),S(),Oe(" ",e.Version,": ",fe(2,3,e.Time,"d MMM y, h:mm")," ")}}function Xe(s,o){s&1&&l(0,"spk-progress-bar",7)}function Ve(s,o){if(s&1&&(r(0,"app-file-tree",14)(1,"label",15),T(2,4),a(),l(3,"input",16),a()),s&2){let e=j(2);m("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function ze(s,o){if(s&1&&(r(0,"spk-select",11),l(1,"input",12),Se(2,Be,3,6,"spk-option",13,Fe),a(),U(4,Xe,1,0,"spk-progress-bar",7)(5,Ve,4,4,"app-file-tree",14)),s&2){let e=j();m("displayFn",e.displayFn())("hideClearButton",!0),S(2),me(e.versionOptions()),S(2),x(e.isDraft()&&e.isRepairing()||!e.rootPathLoaded()?4:-1),S(),x(e.rootPathLoaded()&&(e.isDraft()&&!e.isRepairing()||!e.isDraft())?5:-1)}}var K=new D,Ge=()=>K.group({filesToRestore:K.control(""),selectedOption:K.control(null),passphrase:K.control(null)}),J=class s{#t=p(I);#e=p(g);#o=p(d);#i=p(P);#n=p(z);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectedOptionSignal=w(this.selectFilesForm.controls.selectedOption.valueChanges);backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;backupSettings=Ce(()=>{let o=this.backupId(),e=this.selectFilesFormSignal(),t=e?.selectedOption?parseInt(e?.selectedOption):null;if(typeof t!="number"||!o)return null;let n=this.versionOptions()?.find(F=>F.Version===t)?.Time??null;return n?{id:o,time:n}:null});isRepairing=_(!1);repairEffect=Re(()=>{let o=this.#e.isDraft(),e=this.selectedOptionSignal();if(o&&e){let t=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:t,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(f(()=>this.isRepairing.set(!1))).subscribe()}});rootPathLoaded=_(!1);rootPath=De([this.selectFilesFormSignal,this.backupId],ne(pe([null,null]),_e(([o,e])=>{let t=o?.selectedOption?parseInt(o?.selectedOption):null,i=e;if(typeof t!="number"||!i)return re("/");let n=this.versionOptions()?.find(F=>F.Version===t);return this.#t.getApiV1BackupByIdFiles({id:i,time:n?.Time??"",prefixOnly:!1,folderContents:!0}).pipe(se(F=>(this.rootPathLoaded.set(!0),F.Files[0].Path)))})));displayFn(){let o=this.versionOptions();return e=>{if(!e)return"";let t=o?.find(i=>i.Version?.toString()===e);return t?`${t.Version}: ${this.#n.transform(t.Time,"d MMM y, h:mm")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-select-files"]],features:[de([z])],decls:13,vars:3,consts:()=>{let o;o=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],o,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let i=X();r(0,"form",5,0),O("submit",function(){return C(i),R(t.next())}),r(2,"h3",6),T(3,1),a(),U(4,We,1,0,"spk-progress-bar",7)(5,ze,6,4),r(6,"div",8)(7,"button",9),O("click",function(){return C(i),R(t.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",10),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(m("formGroup",t.selectFilesForm),S(4),x(t.versionOptionsLoading()?4:5),S(5),Ee(t.isFileRestore()?"Back":"Exit"),Te(8))},dependencies:[A,L,M,h,k,$,y,z,Y,v,ke,b,Le,Me],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var g=class s{#t=p(d);#e=p(I);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=Ge();optionsForm=xe();encryptionForm=we();optionsFormSignal=w(this.optionsForm.valueChanges);selectFilesFormSignal=w(this.selectFilesForm.valueChanges);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);init(o,e=!1,t=!1){this.backupId.set(o),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(o,!0)}updateTargetUrl(o){this.destinationTargetUrl.set(o)}submit(){this.isSubmitting.set(!0);let o=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,i=this.versionOptions()?.find(n=>n.Version===t.selectedOption);this.#e.postApiV1BackupByIdRestore({id:o??"",requestBody:{paths:t.filesToRestore?.split("\0").map(n=>`${n}*`)??[],passphrase:t.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(f(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:n=>{console.error("restore error",n)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(o,e=!1){this.versionOptionsLoading.set(!0),ae([this.#e.getApiV1BackupById({id:o}),this.#e.getApiV1BackupByIdFilesets({id:o})]).pipe(le(1),f(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,i])=>{this.versionOptions.set(i),this.backup.set(t),e&&i.length>0&&this.selectFilesForm.controls.selectedOption.setValue(i[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var G=new D,xe=()=>G.group({restoreFrom:G.control("orignal"),restoreFromPath:G.control(""),handleExisting:G.control("overwrite"),permissions:G.control(!1)}),Q=class s{#t=p(g);#e=p(d);#o=p(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=N({type:s,selectors:[["app-options"]],decls:39,vars:6,consts:()=>{let o;o=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let F;F=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize`Permissions`;let te;te=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ie;return ie=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],o,e,t,i,n,F,Z,ee,te,oe,ie,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let i=X();r(0,"form",12,0),O("submit",function(){return C(i),R(t.submit())}),r(2,"h3",13),T(3,1),a(),r(4,"app-toggle-card",14),W(5,15),T(6,2),B(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),V(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),W(18,15),T(19,5),B(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),W(27,15),T(28,8),B(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),O("click",function(){return C(i),R(t.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;m("formGroup",t.optionsForm),S(4),m("disallowToggle",!0),S(9),m("disabled",((i=t.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),m("disallowToggle",!0),S(19),ue("loader",t.isSubmitting())}},dependencies:[A,L,M,Ne,Pe,h,k,$,y,ye,Y,$e,he,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{xe as a,Q as b,we as c,q as d,Ge as e,J as f,g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ce}from"./chunk-QTTCN7A7.js";import{q as de}from"./chunk-QXNJFFEM.js";import{b as ae}from"./chunk-PSJAIBCQ.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-FFD5RG7J.js";import{ia as le}from"./chunk-X566VMXX.js";import{Ab as g,Bb as Z,E as B,Eb as G,Fb as k,Hc as A,Jc as w,Nb as R,Oa as f,Ob as ee,Pb as te,Rb as N,Sb as p,Tb as ne,Ub as I,Va as x,Wa as H,X as D,bb as K,bc as q,ca as F,cc as ie,da as O,dc as X,ec as y,gc as oe,hb as v,oa as V,pa as C,pc as L,qb as j,qc as re,rb as U,sb as P,v as z,vb as b,vc as se,xb as J,yb as Y,zb as _}from"./chunk-NHACGZPI.js";import{a as W,b as $}from"./chunk-C6Q5SG76.js";var Pe=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(r,t)=>t.id,Se=r=>({children:r,level:0}),me=r=>({$implicit:r}),Fe=(r,t)=>({children:r,level:t});function Oe(r,t){if(r&1){let e=k();_(0,"spk-button-group")(1,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("browse"))}),R(2,4),g(),_(3,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("path"))}),R(4,5),g()()}if(r&2){let e=p();f(),P("active",e.pathDiscoveryMethod()==="browse"),f(2),P("active",e.pathDiscoveryMethod()==="path")}}function Ne(r,t){r&1&&Z(0,"spk-progress-bar",9)}function ye(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder-open"),g())}function we(r,t){r&1&&(_(0,"spk-icon"),y(1,"file"),g())}function ke(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder"),g())}function Re(r,t){if(r&1&&v(0,ye,2,0,"spk-icon",16)(1,we,2,0,"spk-icon")(2,ke,2,0,"spk-icon",16),r&2){let e=p(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(r,t){r&1&&(_(0,"spk-icon",16),y(1,"desktop-tower"),g())}function Le(r,t){r&1&&G(0)}function Ae(r,t){if(r&1&&v(0,Le,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,re(2,Fe,e.children,n.level+1)))}}function We(r,t){if(r&1){let e=k();_(0,"div",14,3),N("click",function(){F(e);let s=p().$implicit,i=p(2);return O(i.toggleNode(s.id,s))}),_(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),g(),_(5,"div",17),N("click",function(s){F(e);let i=p().$implicit,o=p(2);return O(o.toggleSelectedNode(s,i))}),y(6),g()(),v(7,Ae,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p(2);P("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),f(3),b(e.id!=="/"?3:4),f(3),oe(" ",e.text," "),f(),b(e.children.length>0?7:-1)}}function $e(r,t){if(r&1&&v(0,We,8,13),r&2){let e=t.$implicit,n=p(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(r,t){if(r&1&&(_(0,"spk-list"),J(1,$e,1,1,null,null,Me),g()),r&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),f(),Y(e.children)}}function De(r,t){r&1&&G(0)}function Ve(r,t){if(r&1){let e=k();_(0,"spk-toggle",18),N("click",function(){F(e);let s=p();return O(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),g()}if(r&2){let e=p();P("active",e._showHiddenNodes()),f(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class r{#t=D(ae);#r=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let u=n[a].slice(1);if(u.startsWith("{")&&u.endsWith("}")){let h=u.slice(1,-1),d=this.filterGroups?.FilterGroups[h];if(d&&d.length){let T=d.map(E=>`-${E}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),m=this.accepts(),l=o?{id:o,resolvedpath:o,text:o?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let u=a.id.replace(o??"","").split("/").filter(Boolean),h="",d=l;for(let T of u){if(h+="/"+T,!i.has(h)){let E=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),M={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:E,parentPath:h,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":h,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(M.accepted=this.matchAccepts(m,M)),i.set(h,M),d.children.push(M)}d=i.get(h)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let a=o[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),u=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=u==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=u==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(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.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(console.log(t),this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(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 s=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):s.some(o=>o.startsWith(i))?this.currentPath.set(s.filter(o=>o!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(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}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),s=n.map(o=>o.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(o=>{o.forEach((m,l)=>{let a=o.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(o=>this.#i(o))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(m=>{let l=o.flatMap(c=>c.map(u=>{let h=u.id,d=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),E="/"+(h&&h.split("/").filter(Boolean).join("/")),M=n.findIndex(S=>this.multiSelect()?E.startsWith(S):E===S)>-1,Ee=n.findIndex(S=>S===h)>-1,ve=e.findIndex(S=>S===E)>-1;return $(W({},u),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:M&&!ve||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(W({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=K({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,Pe,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&P("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Oe,5,4,"spk-button-group"),_(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),_(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),g(),v(9,Ve,2,3,"spk-toggle",11),g(),_(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),g()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),f(),P("hidden",n.pathDiscoveryMethod()!=="browse"),f(2),P("visualize-accepted",n.accepts()),f(2),b(n.isLoading()?5:-1),f(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),f(),b(n.accepts()?-1:9),f(),P("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],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%] spk-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-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-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%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-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%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};
|
|
1
|
+
import{a as ce}from"./chunk-QTTCN7A7.js";import{q as de}from"./chunk-QXNJFFEM.js";import{b as ae}from"./chunk-PSJAIBCQ.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-YFA44VRS.js";import{ia as le}from"./chunk-X566VMXX.js";import{Ab as g,Bb as Z,E as B,Eb as G,Fb as k,Hc as A,Jc as w,Nb as R,Oa as f,Ob as ee,Pb as te,Rb as N,Sb as p,Tb as ne,Ub as I,Va as x,Wa as H,X as D,bb as K,bc as q,ca as F,cc as ie,da as O,dc as X,ec as y,gc as oe,hb as v,oa as V,pa as C,pc as L,qb as j,qc as re,rb as U,sb as P,v as z,vb as b,vc as se,xb as J,yb as Y,zb as _}from"./chunk-NHACGZPI.js";import{a as W,b as $}from"./chunk-C6Q5SG76.js";var Pe=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(r,t)=>t.id,Se=r=>({children:r,level:0}),me=r=>({$implicit:r}),Fe=(r,t)=>({children:r,level:t});function Oe(r,t){if(r&1){let e=k();_(0,"spk-button-group")(1,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("browse"))}),R(2,4),g(),_(3,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("path"))}),R(4,5),g()()}if(r&2){let e=p();f(),P("active",e.pathDiscoveryMethod()==="browse"),f(2),P("active",e.pathDiscoveryMethod()==="path")}}function Ne(r,t){r&1&&Z(0,"spk-progress-bar",9)}function ye(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder-open"),g())}function we(r,t){r&1&&(_(0,"spk-icon"),y(1,"file"),g())}function ke(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder"),g())}function Re(r,t){if(r&1&&v(0,ye,2,0,"spk-icon",16)(1,we,2,0,"spk-icon")(2,ke,2,0,"spk-icon",16),r&2){let e=p(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(r,t){r&1&&(_(0,"spk-icon",16),y(1,"desktop-tower"),g())}function Le(r,t){r&1&&G(0)}function Ae(r,t){if(r&1&&v(0,Le,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,re(2,Fe,e.children,n.level+1)))}}function We(r,t){if(r&1){let e=k();_(0,"div",14,3),N("click",function(){F(e);let s=p().$implicit,i=p(2);return O(i.toggleNode(s.id,s))}),_(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),g(),_(5,"div",17),N("click",function(s){F(e);let i=p().$implicit,o=p(2);return O(o.toggleSelectedNode(s,i))}),y(6),g()(),v(7,Ae,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p(2);P("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),f(3),b(e.id!=="/"?3:4),f(3),oe(" ",e.text," "),f(),b(e.children.length>0?7:-1)}}function $e(r,t){if(r&1&&v(0,We,8,13),r&2){let e=t.$implicit,n=p(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(r,t){if(r&1&&(_(0,"spk-list"),J(1,$e,1,1,null,null,Me),g()),r&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),f(),Y(e.children)}}function De(r,t){r&1&&G(0)}function Ve(r,t){if(r&1){let e=k();_(0,"spk-toggle",18),N("click",function(){F(e);let s=p();return O(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),g()}if(r&2){let e=p();P("active",e._showHiddenNodes()),f(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class r{#t=D(ae);#r=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let u=n[a].slice(1);if(u.startsWith("{")&&u.endsWith("}")){let h=u.slice(1,-1),d=this.filterGroups?.FilterGroups[h];if(d&&d.length){let T=d.map(E=>`-${E}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),m=this.accepts(),l=o?{id:o,resolvedpath:o,text:o?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let u=a.id.replace(o??"","").split("/").filter(Boolean),h="",d=l;for(let T of u){if(h+="/"+T,!i.has(h)){let E=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),M={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:E,parentPath:h,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":h,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(M.accepted=this.matchAccepts(m,M)),i.set(h,M),d.children.push(M)}d=i.get(h)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let a=o[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),u=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=u==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=u==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(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.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(console.log(t),this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(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 s=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):s.some(o=>o.startsWith(i))?this.currentPath.set(s.filter(o=>o!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(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}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),s=n.map(o=>o.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(o=>{o.forEach((m,l)=>{let a=o.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(o=>this.#i(o))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(m=>{let l=o.flatMap(c=>c.map(u=>{let h=u.id,d=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),E="/"+(h&&h.split("/").filter(Boolean).join("/")),M=n.findIndex(S=>this.multiSelect()?E.startsWith(S):E===S)>-1,Ee=n.findIndex(S=>S===h)>-1,ve=e.findIndex(S=>S===E)>-1;return $(W({},u),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:M&&!ve||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(W({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=K({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,Pe,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&P("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Oe,5,4,"spk-button-group"),_(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),_(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),g(),v(9,Ve,2,3,"spk-toggle",11),g(),_(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),g()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),f(),P("hidden",n.pathDiscoveryMethod()!=="browse"),f(2),P("visualize-accepted",n.accepts()),f(2),b(n.isLoading()?5:-1),f(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),f(),b(n.accepts()?-1:9),f(),P("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],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%] spk-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-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-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%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-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%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};
|