@duplicati/ngclient 0.0.235 → 0.0.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/{chunk-xD8qjoz4.js → chunk-0pQRcAhF.js} +1 -1
  2. package/{chunk-BEUeHgR9.js → chunk-1DRz_1dv.js} +1 -1
  3. package/{chunk-C185qUb-.js → chunk-2QKZNH3T.js} +1 -1
  4. package/{chunk-DWCofCiP.js → chunk-3iAIXnG6.js} +9 -9
  5. package/{chunk-fDWfSg6Y.js → chunk-5q0UK__c.js} +1 -1
  6. package/{chunk-6-sszNfh.js → chunk-644SEuYO.js} +1 -1
  7. package/{chunk-B_I_9Y7k.js → chunk-6oGy_iFC.js} +1 -1
  8. package/{chunk-CFgDqLU0.js → chunk-8A93BNds.js} +1 -1
  9. package/{chunk-D6y9RCQD.js → chunk-9Pc-waxi.js} +1 -1
  10. package/{chunk-iU19kwHx.js → chunk-B20GDhu-.js} +1 -1
  11. package/{chunk-C1py21yb.js → chunk-B5S2d_Pm.js} +1 -1
  12. package/{chunk-CsVpmA6t.js → chunk-BFsdrFDX.js} +1 -1
  13. package/{chunk-CSrYlKTK.js → chunk-BG8y51P2.js} +1 -1
  14. package/{chunk-BjqgOGb9.js → chunk-BIZHZ66x.js} +1 -1
  15. package/{chunk-7T5O8Syb.js → chunk-BM5sEnUl.js} +1 -1
  16. package/{chunk-DB0aGcRM.js → chunk-BO1Nqy2x.js} +1 -1
  17. package/{chunk-D04TnMUn.js → chunk-BSB0qCYy.js} +1 -1
  18. package/{chunk-DkVHfoYw.js → chunk-BSCOyYHH.js} +1 -1
  19. package/{chunk-NiMN4Rl6.js → chunk-BWDCVcaP.js} +1 -1
  20. package/{chunk-Btvi2S15.js → chunk-BZPh4AYw.js} +1 -1
  21. package/chunk-Bc_wPl6H.js +1 -0
  22. package/{chunk-Dbq-qyNL.js → chunk-Bdg6GNH8.js} +1 -1
  23. package/{chunk-DBkkb6OR.js → chunk-Be4WXTyA.js} +1 -1
  24. package/{chunk-iGzJokt-.js → chunk-Bfg1Kjif.js} +1 -1
  25. package/{chunk-CGnjVnmu.js → chunk-BmOgPfpY.js} +1 -1
  26. package/{chunk-CxbeRJcJ.js → chunk-BpG_gjhd.js} +1 -1
  27. package/{chunk-CdzKkYEw.js → chunk-BszFCrvn.js} +1 -1
  28. package/{chunk-D5V6OY_2.js → chunk-Bx7WLGmZ.js} +1 -1
  29. package/{chunk-DneBfCBh.js → chunk-BxBZMjtQ.js} +1 -1
  30. package/{chunk-Cj_yOpND.js → chunk-BxLcE6zQ.js} +1 -1
  31. package/{chunk-29_4gGIi.js → chunk-Bz49u_nH.js} +1 -1
  32. package/{chunk-DA7rrIf8.js → chunk-BzRnxKOJ.js} +1 -1
  33. package/{chunk-D6IQFx6m.js → chunk-C0w3mWOI.js} +1 -1
  34. package/{chunk-BWvawawS.js → chunk-C1PIQTOq.js} +1 -1
  35. package/{chunk-BGuvkLC9.js → chunk-C8Zr0vl3.js} +1 -1
  36. package/{chunk-BDJqKfxm.js → chunk-C9fglVxt.js} +1 -1
  37. package/{chunk-B891gwjc.js → chunk-CBaqwuDY.js} +1 -1
  38. package/{chunk-xI8Kkqgy.js → chunk-CC4z1keD.js} +1 -1
  39. package/{chunk-Dv_fBX0w.js → chunk-CH0tv6BB.js} +1 -1
  40. package/{chunk-_OzpLe0L.js → chunk-CMLjueVV.js} +1 -1
  41. package/{chunk-C1-31fA7.js → chunk-CNwmuSlJ.js} +1 -1
  42. package/{chunk-DFLxy15J.js → chunk-COhlvPYj.js} +1 -1
  43. package/{chunk-D38QrkIM.js → chunk-CRhQXQUC.js} +1 -1
  44. package/{chunk-DSeMtMg3.js → chunk-CSPT2xlQ.js} +1 -1
  45. package/{chunk-D7UddV5F.js → chunk-CUlaXyK0.js} +1 -1
  46. package/{chunk-CnZx831x.js → chunk-CUo9Jt8-.js} +1 -1
  47. package/chunk-CWCU9i20.js +1 -0
  48. package/{chunk-CQVPqpMp.js → chunk-CYA8bL3v.js} +1 -1
  49. package/{chunk-3YzyUT-a.js → chunk-CZu3210D.js} +1 -1
  50. package/{chunk-DuRr4rDS.js → chunk-CaQaYVo7.js} +1 -1
  51. package/{chunk-gId840Er.js → chunk-CgrVW_eL.js} +1 -1
  52. package/{chunk-DYV1Pbu1.js → chunk-Ci645E9t.js} +1 -1
  53. package/{chunk-DKRWta24.js → chunk-CpY-WOcD.js} +2 -2
  54. package/{chunk-C4Uv1C-T.js → chunk-CqNJ2t71.js} +1 -1
  55. package/chunk-D0owcdvy.js +1 -0
  56. package/{chunk-C0KXp4hd.js → chunk-D39Om4Mk.js} +1 -1
  57. package/{chunk-ClFp7JLZ.js → chunk-D72BQ7G7.js} +1 -1
  58. package/{chunk-C0XQD9NK.js → chunk-DCP61JTN.js} +1 -1
  59. package/{chunk-CKUlUN3q.js → chunk-DF2Ac802.js} +1 -1
  60. package/{chunk-m8vMm7S6.js → chunk-DLYD6dRM.js} +1 -1
  61. package/{chunk-Cm7JSdTO.js → chunk-DM-zhIVI.js} +1 -1
  62. package/{chunk-D2P9ER0I.js → chunk-DOUmqK2E.js} +1 -1
  63. package/{chunk-B61kkU_h.js → chunk-DQ3vKQCE.js} +1 -1
  64. package/{chunk-CzoH_Agx.js → chunk-DR-utttZ.js} +1 -1
  65. package/{chunk-ayE11Iz-.js → chunk-DWyjU7VC.js} +1 -1
  66. package/{chunk-Bgd5lu61.js → chunk-DgUP0uNQ.js} +1 -1
  67. package/{chunk-BEzhTDp8.js → chunk-Dgq3OqWW.js} +1 -1
  68. package/{chunk-IqMUABbN.js → chunk-Djpe9Lo0.js} +1 -1
  69. package/{chunk-OQ_HQ9EL.js → chunk-DkT-0-DS.js} +1 -1
  70. package/{chunk-D9jPw9Ov.js → chunk-Dn7TWCfq.js} +1 -1
  71. package/{chunk-Css7wqTG.js → chunk-DxIS2uYj.js} +1 -1
  72. package/{chunk-DXLQftDm.js → chunk-DyDoCZiX.js} +1 -1
  73. package/chunk-DzP0W6ua.js +1 -0
  74. package/{chunk-DmCJ7w-M.js → chunk-Ied7KwvV.js} +1 -1
  75. package/{chunk-BJOhC2d8.js → chunk-Mj9aFt3b.js} +1 -1
  76. package/{chunk-DaXXLSfy.js → chunk-OEmUbdHQ.js} +1 -1
  77. package/{chunk-zOY5leQB.js → chunk-OpdQrdKp.js} +1 -1
  78. package/{chunk-CLlZiOaO.js → chunk-VrjhL6gl.js} +1 -1
  79. package/{chunk-CzsiJ0k-.js → chunk-Z-8b6Hyr.js} +1 -1
  80. package/{chunk-W1dL7dqQ.js → chunk-bJwp1ogZ.js} +2 -2
  81. package/{chunk-Kq2ZFJSk.js → chunk-hTxREuXu.js} +1 -1
  82. package/{chunk-BWSg9cLt.js → chunk-mVyxhVwu.js} +1 -1
  83. package/{chunk-BOKNwzSl.js → chunk-oBjabFaf.js} +1 -1
  84. package/{chunk-Bq_vr6Q3.js → chunk-qUlwoHQn.js} +1 -1
  85. package/{chunk-Brfc2m61.js → chunk-vtWJkNZ_.js} +1 -1
  86. package/{chunk-DHkdQ4u3.js → chunk-zcgLq6FT.js} +1 -1
  87. package/index.html +1 -1
  88. package/{main-2ZYVV4C4.js → main-X6MUEPX4.js} +2 -2
  89. package/package.json +1 -1
  90. package/chunk-BSCc2xDv.js +0 -1
  91. package/chunk-D4g_OF7M.js +0 -1
  92. package/chunk-DE8p9-HP.js +0 -1
  93. package/chunk-NAAMYA7J.js +0 -1
@@ -1,2 +1,2 @@
1
- import {r}from'./chunk-BEUeHgR9.js';import {J as J$1}from'./chunk-CGnjVnmu.js';import {c}from'./chunk-BJOhC2d8.js';import {L as Le,N as Ne}from'./chunk-fDWfSg6Y.js';import {x}from'./chunk-D38QrkIM.js';import {T,ab as J,f,a6 as be,E as E1,ac as I1,G as Ge,B as w1,N as Nt$1,aj as m,ak as l,Q as Qa,ad as sy,au as h,aI as pt$1,b1 as Bs,b2 as iy,bD as wy,C as Zu,g as gw,v,a as N,a0 as de,bS as ei,u as ue,aJ as m$1,S as lC,l as lT,Z as Zi,Y as uC,b4 as cg,W as Wl,b_ as gC,c as uT,b as bE,K as Kg,z as vg,b0 as eb,O as qg,R as hC,b$ as Us,az as Yu,i as ET,n as lm,P as Pd,h as aC,p as qC,L as Ld,o as oC,y as cm,d as Ig,a1 as pT,ah as Yg,a2 as hT,bT as wg,av as Vg,aw as iC,w as Hg,H as HC,J as im,t as bD,F as Fg,j as jg,a3 as XC,aD as sm,M as MD,aO as sb,aa as Yl,aU as ub,aH as tb,as as Yp,c0 as db}from'./main-2ZYVV4C4.js';import {d}from'./chunk-BGuvkLC9.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt$1}from'./chunk-iGzJokt-.js';import {$}from'./chunk-Cm7JSdTO.js';function ht(o){let t=o.replace(/^@/,""),e=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return t=t.replace(e,(n,i,r)=>`(${r})`),t.replace(/\\/g,"\\\\")}function rt(o,t){let e=ht(t),n=e.startsWith("^")&&e.endsWith("$")?e:`^(${e})$`;return new RegExp(n).test(o)}function ae(o,t){let e=t.replace(/[\\.+^${}()|[\]*?]/g,n=>n==="*"?".*":n==="?"?".":"\\"+n);return new RegExp(`^${e}$`).test(o)}var pt=["treeContainer"],gt=["formRef"],_t=[[["label"]],[["label"]],[["input"]]],ft=["label","label","input"],ot=["ngProjectAs","label",5,["label"]],mt=["ngProjectAs","input",5,["input"]],Ct=o=>({children:o,level:0}),lt=o=>({$implicit:o}),Pt=(o,t)=>({children:o,level:t}),Et=()=>({maxWidth:"700px",width:"100%"}),Mt=(o,t)=>t.id;function Tt(o,t){if(o&1){let e=ET();Zi(0,"sh-button-group",22),lm("valueChange",function(i){Pd(e);let r=aC();return qC(r.pathDiscoveryMethod,i)||(r.pathDiscoveryMethod=i),Ld(i)}),Zi(1,"button",23),oC(2,4),Wl(),Zi(3,"button",24),oC(4,5),Wl()();}if(o&2){let e=aC();cm("value",e.pathDiscoveryMethod);}}function yt(o,t){o&1&&Ig(0,"sh-progress-bar",14);}function bt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"spinner"),Wl());}function St(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"arrow-down"),Wl());}function Nt(o,t){if(o&1){let e=ET();Zi(0,"div",26),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.loadMore(i,r))}),Zi(1,"div",27),Ig(2,"sh-icon",28),lT(3,bt,2,0,"sh-icon",29)(4,St,2,0,"sh-icon",29),Wl(),Zi(5,"div",30)(6,"span"),HC(7),Wl()()();}if(o&2){let e=aC().$implicit,n=aC(2);Kg("loading",n.isLoading()===e.id),bE(3),uT(n.isLoading()===e.id?3:4),bE(4),im(e.text);}}function vt(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"caret-down"),Wl());}function Ft(o,t){o&1&&Ig(0,"sh-icon",28);}function Ot(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"spinner"),Wl());}function xt(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"caret-right"),Wl());}function Rt(o,t){if(o&1&&Ig(0,"img",34),o&2){let e=aC(3).$implicit;vg("src",e.customIcon,Yp);}}function wt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder-open"),Wl());}function Dt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder-user"),Wl());}function It(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"file"),Wl());}function Lt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder"),Wl());}function kt(o,t){if(o&1&&(lT(0,vt,2,0,"sh-icon",28)(1,Ft,1,0,"sh-icon",28)(2,Ot,2,0,"sh-icon",28)(3,xt,2,0,"sh-icon",28),lT(4,Rt,1,1,"img",34)(5,wt,2,0,"sh-icon",29)(6,Dt,2,0,"sh-icon",29)(7,It,2,0,"sh-icon",29)(8,Lt,2,0,"sh-icon",29)),o&2){let e=aC(2).$implicit,n=aC(2);uT(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),bE(4),uT(e.customIcon?4:e.children.length?5:e.id==="%HOME%"?6:e.cls==="file"?7:8);}}function At(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"desktop-tower"),Wl());}function $t(o,t){if(o&1&&(Zi(0,"span",33),HC(1),sb(2,"bytes"),Wl()),o&2){let e=aC(2).$implicit;bE(),Yl("\xA0(",ub(2,1,e.fileSize,true,true),")");}}function Wt(o,t){o&1&&wg(0);}function Bt(o,t){if(o&1&&cg(0,Wt,1,0,"ng-container",15),o&2){let e=aC(2).$implicit,n=aC().$implicit;aC();let i=gC(7);vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(5,lt,tb(2,Pt,e.children,n.level+1)));}}function Vt(o,t){if(o&1){let e=ET();Zi(0,"div",31,3),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.toggleSelectedNode(i,r))}),Zi(2,"div",32),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.toggleNode(i,r.id,r))}),lT(3,kt,9,2)(4,At,2,0,"sh-icon",29),Wl(),Zi(5,"div",30)(6,"span"),HC(7),Wl(),lT(8,$t,3,5,"span",33),Wl()(),lT(9,Bt,1,7,"ng-container");}if(o&2){let e=aC().$implicit,n=aC().$implicit,i=aC();Kg("accepted",e.accepted===true)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),bE(2),Kg("file",e.cls==="file"),bE(),uT(e.id!=="/"?3:4),bE(4),im(e.text),bE(),uT(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),bE(),uT(e.children.length>0?9:-1);}}function Gt(o,t){if(o&1&&lT(0,Nt,8,4,"div",25)(1,Vt,10,24),o&2){let e=t.$implicit,n=aC(2);uT(e.isLoadMore?0:e.hidden&&n._showHiddenNodes()||!e.hidden?1:-1);}}function Ht(o,t){if(o&1&&(Zi(0,"sh-list"),pT(1,Gt,2,1,null,null,Mt),Wl()),o&2){let e=t.$implicit;Yg("padding-left",e.level*.25,"rem"),bE(),hT(e.children);}}function zt(o,t){o&1&&wg(0);}function jt(o,t){if(o&1){let e=ET();Zi(0,"sh-toggle",35),lm("checkedChange",function(i){Pd(e);let r=aC();return qC(r._showHiddenNodes,i)||(r._showHiddenNodes=i),Ld(i)}),oC(1,6),Wl();}if(o&2){let e=aC();cm("checked",e._showHiddenNodes),bE(),Vg(e.showFiles()?"files":"folders"),iC(1);}}function Ut(o,t){if(o&1){let e=ET();Zi(0,"button",36),Hg("click",function(){Pd(e);let i=aC();return Ld(i.openCreateFolderDialog())}),oC(1,7),Wl();}if(o&2){let e=aC();vg("disabled",!e.isCurrentPathFolder());}}function Jt(o,t){if(o&1&&(Zi(0,"sh-alert",20),HC(1),Wl()),o&2){let e=aC();vg("color","error"),bE(),im(e.errorMessage());}}function Xt(o,t){if(o&1){let e=ET();Zi(0,"sh-dialog",37),lm("isOpenChange",function(i){Pd(e);let r=aC();return qC(r.createFolderDialogOpen,i)||(r.createFolderDialogOpen=i),Ld(i)}),Zi(1,"header",38)(2,"h2"),oC(3,8),Wl()(),Zi(4,"div",39)(5,"div",40)(6,"p"),oC(7,9),Wl(),Zi(8,"div",41)(9,"pre"),HC(10),Wl()()(),Zi(11,"sh-form-field")(12,"textarea",42),lm("ngModelChange",function(i){Pd(e);let r=aC();return qC(r.createFolderPath,i)||(r.createFolderPath=i),Ld(i)}),Wl(),bD(),Wl()(),Zi(13,"footer",43)(14,"button",44),Hg("click",function(){Pd(e);let i=aC();return Ld(i.closeCreateFolderDialog(false))}),HC(15,"Cancel"),Wl(),Zi(16,"button",45),Hg("click",function(){Pd(e);let i=aC();return Ld(i.closeCreateFolderDialog(true))}),Fg(17,10),Ig(18,"sh-icon"),jg(),Wl()()();}if(o&2){let e=aC();cm("isOpen",e.createFolderDialogOpen),vg("options",XC(6,Et)),bE(10),sm("",e.currentPathResolved(),"",e.createFolderPath()?"/"+e.createFolderPath():""),bE(2),cm("ngModel",e.createFolderPath),MD(),bE(4),vg("disabled",!e.createFolderPath()?.length);}}var ct=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(ct||{}),st=o=>o===-1||o===-2?-2:null,y="/",at="\0load-more",j=true,le=class o{#n=T(J);#e=T(f);#S=T(be);#f=T(r);multiSelect=E1(false);disabled=E1(false);showFiles=E1(false);selectFiles=E1(false);onlySelectFolder=E1(false);accepts=E1(null);startingPath=E1(null);rootPaths=E1([]);initialNodes=E1([]);backupSettings=E1(null);pathRefreshTrigger=E1(false);showHiddenNodes=E1(false);enableCreateFolder=E1(false);hideShortcuts=E1(false);resolvePaths=E1(false);customRemoteMode=E1(null);showUnrootedSources=E1(false);backupId=E1("");connectionStringId=E1(null);sourcePrefix=E1("");destinationUrl=E1("");loadExtendedData=E1(true);hasExtendedData=I1();searchMode=E1(false);searchResults=E1([]);_showHiddenNodes=Ge(false);createFolderDialogOpen=Ge(false);createFolderPath=Ge(null);errorMessage=Ge(null);anyRemoteSourcesLoaded=Ge(false);treeContainerRef=w1("treeContainer");formRef=w1("formRef");pathDiscoveryMethod=Ge("browse");isLoading=Ge(null);currentPath=Ge("");#h=Ge(null);treeSearchQuery=Ge("");treeNodes=Ge([]);pathDelimiter=Nt$1(()=>this.#e.systemInfo()?.DirectorySeparator??"");#s=Nt$1(()=>this.currentPathArray().filter(e=>this.#i(e)).find(e=>e.includes("*")||e.includes("[")||e.includes("{")||e.includes("?"))&&this.#e.hasV2FilterOperations());filterGroups=this.#e.filterGroups();isByBackupSettings=Nt$1(()=>{let t=this.backupSettings();return !(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=Nt$1(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathArray=Nt$1(()=>this.currentPath().split("\0").filter(t=>t!==""&&t!==y));currentPathResolved=Nt$1(()=>this.currentPathArray().map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#e.resolveShorthandPath(n)}).join("\0"));#c(t){if(!t)return null;if(t.startsWith("@")&&t.includes("|")){let e=t.split("|"),n=e[0],i=e[1],r=i.split("://")[0],a=e[2]??"";return r==="diskimage"&&!a&&(a=this.#a(e[1].split("://")[1])),{mount:n.substring(1),prefix:n,url:i,type:r,path:a}}return null}#m=Nt$1(()=>{if(!this.showUnrootedSources())return [];let t=this.rootPaths();return (t===void 0||t.length===0)&&(t=[y]),this.currentPathArray().filter(n=>!this.#i(n)).filter(n=>!n.startsWith("%")).filter(n=>!t.find(i=>n.startsWith(i))).map(n=>{let i=this.#c(n);return i?{id:n,path:i.mount,displayName:Ne(i.url),icon:Le(i.url)}:{id:n,path:n,displayName:n,icon:null}})});#d(t){return t.map(e=>{if(this.#i(e))return e;let n=this.#c(e);return n?this.#a(n.mount):e})}TreeEvalEnum=ct;#N=Nt$1(()=>{if(!this.#s())return null;let t=this.#d(this.currentPathArray()),e=t.filter(r=>!this.#i(r)),n=t.filter(r=>this.#i(r));return {paths:this.searchableTreeNodes().filter(r=>!r.isLoadMore).map(r=>r.id).filter(Boolean),sources:e,filters:n}});#C=$({params:()=>({data:this.#N()}),stream:({params:t})=>!this.#s()||!t.data||t.data.sources.length===0?iy(null):Us(300).pipe(Yu(()=>sy(()=>this.#n.postApiV2FilesystemTestFilter({body:{Paths:t.data?.paths,Sources:t.data?.sources,Filters:t.data?.filters}})).pipe(pt$1(e=>{if(!e.Success||!e.Data)return console.log("Error evaluating filters",e),null;let n=new Map;for(let i of e.Data)if(i.Path){let r=0;i.Included?r=1:i.MatchedFilter&&(r=-1),n.set(i.Path,r);}return n}),Bs(()=>iy(null)))))});searchResultTreeStructure=Nt$1(()=>{let t=this.searchResults();if(t.length===0)return [];let e=this.currentPathArray(),n=this.showHiddenNodes(),i=new Map;for(let l of t){let s=l.Path??"",h=this.#r(s),S="";for(;h!==""&&s.startsWith(S+h);)S+=h;let M=s.split(h).filter(E=>E!==""),T="";for(let E=0;E<M.length;E++){let w=M[E],B=E===M.length-1,V=!B||this.#t(s),dt=T||y,ce=T?T.endsWith(h)?T.slice(0,-h.length):T:"";if(T=ce?`${ce}${h}${w}`:`${S}${w}`,V&&!T.endsWith(h)&&(T+=h),!i.has(T))i.set(T,{part:w,parentPath:dt,isFolder:V,match:B?l:null});else if(B){let ut=i.get(T);ut.match=l;}}}let r=new Map;for(let[l,s]of i)r.has(s.parentPath)||r.set(s.parentPath,[]),r.get(s.parentPath).push(l);let a=new Set,d=new Map;for(let[l,s]of i){if(!s.isFolder){a.add(l);continue}let h=r.get(s.parentPath)||[];if(h.length===1&&h[0]===l&&s.parentPath!==y)continue;a.add(l);let M=this.#r(l),T=s.part,E=l;for(;;){let w=r.get(E)||[];if(w.length!==1)break;let B=w[0],V=i.get(B);if(!V||!V.isFolder)break;T+=M+V.part,E=B;}E!==l&&d.set(l,T);}a.add(y);let c=[],u=new Map,p=l=>l.split(this.#r(l)).filter(s=>s!=="").length,m=Array.from(a).filter(l=>l!==y).sort((l,s)=>p(l)-p(s)||l.localeCompare(s));for(let l of m){let s=i.get(l);if(!s)continue;let h=s.parentPath;for(;h!==y&&!a.has(h);)h=i.get(h)?.parentPath||y;if(u.has(l))continue;let S=this.#_(d.get(l),s.match?.Metadata)??s.part,M=s.match===null,T=s.match!==null&&!s.isFolder&&n?0:this.#s()?this.#g(l,null,e,s.isFolder?"folder":"file"):this.#u(e,l,s.isFolder?"folder":"file",null),E={id:l,resolvedpath:l,text:S,parentPath:h,children:[],evalState:T,isIndeterminate:this.isIndeterminate(e,l),cls:s.isFolder?"folder":"file",isSearchMatch:s.match!==null,isGenerated:M,hasChildrenInSearch:(r.get(l)?.length||0)>0,iconCls:null,check:false,leaf:!s.isFolder,hidden:false,systemFile:false,temporary:false,symlink:false,fileSize:s.match?.Size??0};if(u.set(l,E),h===y)c.push(E);else {let w=u.get(h);w&&w.children.push(E);}}return this.#p(c),c});#p(t){let e=this.#f.foldersFirst(),n=this.#f.caseSensitiveSort();t.some(r=>r.isLoadMore)||t.sort((r,a)=>{if(e){if(r.cls==="folder"&&a.cls!=="folder")return -1;if(r.cls!=="folder"&&a.cls==="folder")return 1}let d=r.text??"",c=a.text??"";return n?d<c?-1:d>c?1:0:d.localeCompare(c,void 0,{sensitivity:"base"})}),t.forEach(r=>this.#p(r.children));}treeStructure=Nt$1(()=>{if(this.searchMode())return this.searchResultTreeStructure();this.#C.value();let e=this.showHiddenNodes(),n=this.#v(this.currentPathArray()),i=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),d=[];r.length>0?d=r.map(u=>{let p=this.#s()?this.#g(u,null,n,"folder"):this.#u(n,u,"folder",null);return {id:u,resolvedpath:u,text:u,parentPath:"",children:[],evalState:p,isIndeterminate:false,cls:this.#t(u)?"folder":"file"}}):d=[{id:y,resolvedpath:y,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:false,cls:"folder"}];let c=this.#m().map(u=>({id:u.path,resolvedpath:u.path,remoteSource:this.#c(u.id),text:u.displayName,parentPath:"",children:[],evalState:1,isIndeterminate:false,cls:"folder",customIcon:u.icon}));return d=[...d,...c],d.map(u=>{let p=new Map;if(!u.id)return;let m$1=u.id;a&&(u.accepted=true),p.set(m$1,u);let l$1=r.length>0?i.filter(s=>s.parentPath.startsWith(m$1)):i;for(let s of l$1){if(!s.id)continue;let h=s.id;if(!s.cls||p.has(h))continue;let S=p.get(s.parentPath),M=s.isLoadMore===true,T=M||s.hidden===true&&!e?0:this.#s()?this.#g(h,S,n,s.cls):this.#u(n,h,s.cls,S),E=m(l({},s),{isIndeterminate:M?false:this.isIndeterminate(n,h),evalState:T,children:[]});M?E.accepted=true:a&&(E.accepted=this.matchAccepts(a,E)),p.set(h,E),E.id?.startsWith("%")&&E.id?.endsWith("%")&&p.set(this.#a(h),E),S&&S.children.push(E);}return this.#p(u.children),u}),d});#v(t){let e=structuredClone(t);for(let n=0;n<e.length;n++){let r=e[n].slice(1);if(r.startsWith("{")&&r.endsWith("}")){let a=r.slice(1,-1),d=this.filterGroups?.FilterGroups?.[a];if(d&&d.length){let c=d.map(u=>`-${u}`);e.splice(n,1,...c);}}}return e}#a(t){if(!t)return y;let e=this.#r(t);return t.endsWith("/")||t.endsWith("\\")||t===y?t:t+e}#P(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#a(t.resolvedpath):t.resolvedpath:null}#g(t,e,n,i){let r=st(e?.evalState);if(r!==null)return r;let a=this.#C.value();return a&&a.has(t)?a.get(t):this.#u(n,t,i,e)}#u(t,e,n,i){let r=st(i?.evalState);if(r!==null)return r;let a=0,d=this.#d(t.filter(m=>!this.#i(m))),c=t.filter(m=>this.#i(m)),u=this.multiSelect(),p=this.#P(this.treeNodes().find(m=>m.id===e))??e;if(d.length===0)return a;for(let m=0;m<d.length;m++){let l=d[m];if(e===l||p==l){a=1;break}if(!u||!this.#t(l))continue;if(e?.startsWith(l)||p?.startsWith(l)){a=1;break}}if(c.length===0)return a;for(let m=0;m<c.length;m++){let l=c[m],s=l.slice(1),h=l.startsWith("-")?-1:1;if(this.#t(s)){if(n!=="folder")continue;if(e===s||p==s){a=h;break}}if(s.startsWith("*")&&(s.endsWith("*\\")||s.endsWith("*/"))){if(n!=="folder")continue;let M=s.slice(1,-2);if(M==="")break;if(e?.includes(M+"\\")||e?.includes(M+"/")){a=h;break}}if(s.startsWith("[.*")&&(s.endsWith("[^\\/]*]")||s.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let M=s.slice(3,-7);if(new RegExp(M).test(e)){a=h;break}}if(s.startsWith("[")&&s.endsWith("]")){let M=s.slice(1,-1);if(rt(e,M)){a=h;break}}if(s.startsWith("*.")){if(n!=="file"||s.replace("*.","").length===0)continue;if(ae(e,s)){a=h;break}}if(s==="")continue;if(s===e){a=h;break}if(ae(e,s)){a=h;break}}return a}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):false}#r(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=Qa(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=Qa(()=>{let t=this.pathDiscoveryMethod(),e=this.#h();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n);}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===y)return true;let n=t.split(",");if(n.length===0)return true;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(r=>i.endsWith(r)):false}currentPathEffect=Qa(()=>{let t=this.#h();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")));});inputValueChangeAbortController=null;inputRefEffect=Qa(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#F(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.#h.set(t),t.autocomplete="off");});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#R(t);else {let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#_(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#l(null,e[0])):this.#l(null,y);}}getParentPath(t){let e=this.#r(t),n=t.split(e);return n.length<=1?y:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.isLoadMore||e.id===y||this.#m().map(p=>this.#c(p.id)?.mount).filter(p=>p).includes(e.id??"")||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(t,e.id,e);return}if(this.onlySelectFolder()&&e.cls!=="folder"||this.accepts()&&!e.accepted)return;let i=this.currentPathArray(),r=this.#d(i),a=this.isChildOfSelected(e),d=this.#P(e),c=a?`-${d}`:d,u=this.#t(d);if(this.multiSelect())if(r.includes(d))this.currentPath.set(i.filter(p=>p!==d&&!(u&&p.startsWith(c))).join("\0"));else if(r.some(p=>p==c))this.currentPath.set(i.filter(p=>p!==c).join("\0"));else {let p=u?i.filter(m=>!m.startsWith(d)):i;this.currentPath.set([...p,c].join("\0"));}else i.includes(d)?this.currentPath.set(i.filter(p=>p!==d).join("\0")):this.currentPath.set(d);}isChildOfSelected(t){return this.#d(this.currentPathArray()).filter(n=>this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e,n=null){t.stopPropagation(),n?.cls==="folder"&&(n?.children.length?this.treeNodes.update(i=>i.filter(r=>!r.id?.startsWith(n.id)||r.id===n.id)):this.#l(n,e));}loadMore(t,e){t.stopPropagation(),e.isLoadMore&&this.isLoading()===null&&this.#l(e,e.parentPath||y,e.loadMoreOffset??null);}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(true),false}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),r=this.#a(e),a=`${i}/${r}`;sy(()=>this.#n.postApiV1RemoteoperationCreate({body:{path:"file://"+a}})).subscribe({next:()=>{this.currentPath.set(a),this.#l(null,n),setTimeout(()=>{this.#E();},500),this.createFolderDialogOpen.set(false);},error:d=>{let c=d?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),u=c?c[1]:d?.message||$localize`An error occurred while trying to create the folder.`;this.#S.open(h,{data:{title:$localize`Cannot create folder`,message:u,confirmText:$localize`OK`,cancelText:void 0}});}});}}else this.createFolderDialogOpen.set(false);return false}#E(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"});},100);}#F(t){return Object.defineProperty(t,"value",{configurable:true,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:true,cancelable:true,detail:{value:e}})),e}}),t}#O(t){return sy(()=>this.#n.postApiV1Filesystem({query:{showHidden:true,onlyFolders:!this.showFiles()},body:{path:t}}))}#o(t,e,n,i=null){return sy(()=>this.#n.postApiV2DestinationList({body:{BackupId:this.backupId()??null,DestinationUrl:e?.url??this.destinationUrl()??null,ConnectionStringId:this.connectionStringId()??null,DestinationType:n,SourcePrefix:e?.prefix??this.sourcePrefix()??null,Path:t,Offset:i,Limit:100}})).pipe(pt$1(r=>{let a=r.Data?.Items??[];return {items:a.map(c=>m(l({},c),{Path:(e?.prefix??"")+c.Path})).filter(c=>c.Metadata==null||!c.Metadata.ExtType),hasMore:r.Data?.HasMore??false,nextOffset:(r.Data?.Offset??i??0)+a.length}}))}#M(t,e){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"office365"},body:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}})).pipe(pt$1(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(r=>({Path:(e?.prefix??"")+r,Metadata:JSON.parse(i[r])}))}))}#T(t,e){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"googleworkspace"},body:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}})).pipe(pt$1(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(r=>({Path:(e?.prefix??"")+r,Metadata:JSON.parse(i[r])}))}))}#y(t){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"diskimage"},body:{operation:"ListDestinationRestoreTargets",path:t??"/"}})).pipe(pt$1(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#x(t){let e=this.backupSettings();return this.#e.hasV2ListOperations()?sy(()=>this.#n.postApiV2BackupListFolder({body:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}})).pipe(pt$1(n=>n.Data??[])):sy(()=>this.#n.getApiV1BackupByIdFiles({path:{id:e.id+""},query:{"prefix-only":false,"folder-contents":true,time:e.time,filter:t?"@"+t:void 0}})).pipe(pt$1(n=>n.Files??[]))}#b(t,e,n=null){return e?.type==="office365"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#M(e.path,e):this.customRemoteMode()==="o365"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#M(t,null):e?.type==="googleworkspace"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#T(e.path,e):this.customRemoteMode()==="gsuite"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#T(t,null):e?.type==="diskimage"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#y(e.path):this.customRemoteMode()==="diskimage"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#y(t):this.isByBackupSettings()?this.#x(t):this.customRemoteMode()==="backend"?this.#o(t,null,"Backend",n):this.#O(t)}#R(t){let n=t.split("\0").filter(a=>!this.#i(a)&&!a.startsWith("@")).filter(Boolean).map(a=>{let d=this.#r(a),c=a.split(d);return c.at(-1)===""&&c.pop(),this.#t(a)||c.pop(),{split:c,sep:d}}),i=[y];n.forEach(({split:a,sep:d})=>{a.forEach((c,u)=>{let p=a.slice(0,u+1).join(d)+d;p===""||p===d||i.includes(p)||i.push(p);});});let r=i.map(a=>(this.isLoading.set(a),this.#b(a,null).pipe(pt$1(d=>({status:"success",value:d,url:a})),Bs(d=>iy({status:"error",value:d,url:a})))));wy(r).pipe(Zu(()=>this.isLoading.set(null))).subscribe({next:a=>{let d=a.filter(u=>u.status==="success");a.filter(u=>u.status==="error");this.treeNodes.update(u=>{let p=d.flatMap(l$1=>(Array.isArray(l$1.value)?l$1.value:l$1.value?.items??[]).map(h=>m(l({},h),{parentPath:l$1.url})));p.length>0&&this.anyRemoteSourcesLoaded.set(true);let m$1=[...new Map([...u,...p].map(l=>[l.id,l])).values()];return this.#E(),this.hideShortcuts()?m$1.filter(l=>!l.id.startsWith("%")):m$1});}});}#_(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#w(t){t&&t.ExtType&&t.ExtType.length>0?this.hasExtendedData.emit(t.ExtType):t&&t["diskimage:Type"]&&t["diskimage:Type"].length>0&&this.hasExtendedData.emit("diskimage");}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#i(t){return t.startsWith("+")||t.startsWith("-")}#D(t,e,n){return {id:`${t}${at}`,text:$localize`Load more`,cls:"load-more",leaf:true,hidden:false,parentPath:t,remoteSource:e??void 0,isLoadMore:true,loadMoreOffset:n}}#l(t=null,e=y,n=null){let i=t?.remoteSource;this.isLoading.set(t?.isLoadMore?t.id??e:e),this.#b(e,i,n).pipe(Zu(()=>this.isLoading.set(null))).subscribe({next:r=>{let a=Array.isArray(r)?{items:r,hasMore:false,nextOffset:0}:{items:r?.items??[],hasMore:r?.hasMore??false,nextOffset:r?.nextOffset??0},d=this.isByBackupSettings()||this.customRemoteMode()!==null||i?a.items.map(c=>{this.#w(c.Metadata);let u=this.#r(c.Path),p=this.#_(c.Path.split(u).filter(S=>S!=="").pop(),c.Metadata),m$1=c.Path,l$1=null,s=this.#t(c.Path)?"folder":"file",h=c.Metadata;return i&&(m$1=c.Path.substring(1),l$1=m(l({},i),{path:c.Path.substring(i.prefix.length)})),h&&(h["diskimage:Type"]==="geometry"||h["diskimage:Type"]==="partitioninfo"||h["diskimage:Type"]==="filesystem")?null:{text:p,id:m$1,cls:s,leaf:t!==null,resolvedpath:c.Path,hidden:false,remoteSource:l$1,fileSize:c.Size}}):a.items;d.length>0&&this.anyRemoteSourcesLoaded.set(true),this.treeNodes.update(c=>{let u=d.filter(s=>s!==null).map(s=>{let h=s.cls??(this.#t(s.id)?"folder":"file");return m(l({},s),{cls:h,parentPath:e})}),p=`${e}${at}`,m$1=[...c,...u].filter(s=>s.id!==p);a.hasMore&&m$1.push(this.#D(e,i,a.nextOffset));let l$1=[...new Map(m$1.map(s=>[s.id,s])).values()];return this.hideShortcuts()?l$1.filter(s=>!s.id.startsWith("%")):l$1});},error:r=>{this.errorMessage.set(r.message),this.anyRemoteSourcesLoaded()&&setTimeout(()=>{this.errorMessage.set(null);},5e3);}});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&qg(n.treeContainerRef,pt,5)(n.formRef,gt,5),e&2&&hC(2);},hostVars:2,hostBindings:function(e,n){e&2&&Kg("disabled",n.disabled());},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],onlySelectFolder:[1,"onlySelectFolder"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],showUnrootedSources:[1,"showUnrootedSources"],backupId:[1,"backupId"],connectionStringId:[1,"connectionStringId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:ft,decls:19,vars:18,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;a=$localize`Will be created as:`;let d;return d=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,r,a,d,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"color"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",1,"load-more",3,"loading"],["action","",1,"load-more",3,"click"],[1,"icon","file"],[1,"small"],[1,"primary"],[1,"text"],["action","",3,"click"],[1,"icon",3,"click"],[1,"size"],["alt","Provider icon",1,"provider-icon",3,"src"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(lC(_t),lT(0,Tt,5,1,"sh-button-group",11),Zi(1,"div",12),uC(2,0,ot),Zi(3,"div",13,0),lT(5,yt,1,0,"sh-progress-bar",14),cg(6,Ht,3,2,"ng-template",null,1,db)(8,zt,1,0,"ng-container",15),Wl(),Zi(9,"div",16),lT(10,jt,2,2,"sh-toggle",17),lT(11,Ut,2,1,"button",18),Wl()(),Zi(12,"div",19,2)(14,"sh-form-field"),uC(15,1,ot),uC(16,2,mt),Wl()(),lT(17,Jt,2,2,"sh-alert",20),lT(18,Xt,19,7,"sh-dialog",21)),e&2){let i=gC(7);uT(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),bE(),Kg("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),bE(2),Kg("visualize-accepted",n.accepts()),bE(2),uT(n.isLoading()!=null?5:-1),bE(3),vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(16,lt,eb(14,Ct,n.treeStructure()))),bE(2),uT(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),bE(),uT(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),bE(),Kg("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),bE(5),uT(n.errorMessage()?17:-1),bE(),uT(n.createFolderDialogOpen()?18:-1);}},dependencies:[v,x,J$1,N,Fe,c,d,de,ei,Bn,Ze,Rn,Jt$1,ue,m$1],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(img:nth-child(2)){width:2.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].load-more[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-style:italic;opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}']})};
1
+ import {r}from'./chunk-1DRz_1dv.js';import {J as J$1}from'./chunk-BmOgPfpY.js';import {c}from'./chunk-Mj9aFt3b.js';import {L as Le,N as Ne}from'./chunk-5q0UK__c.js';import {x}from'./chunk-CRhQXQUC.js';import {T,ab as J,f,a6 as be,E as E1,ac as I1,G as Ge,B as w1,N as Nt$1,aj as m,ak as l,Q as Qa,ad as sy,au as h,aI as pt$1,b1 as Bs,b2 as iy,bD as wy,C as Zu,g as gw,v,a as N,a0 as de,bS as ei,u as ue,aJ as m$1,S as lC,l as lT,Z as Zi,Y as uC,b4 as cg,W as Wl,b_ as gC,c as uT,b as bE,K as Kg,z as vg,b0 as eb,O as qg,R as hC,b$ as Us,az as Yu,i as ET,n as lm,P as Pd,h as aC,p as qC,L as Ld,o as oC,y as cm,d as Ig,a1 as pT,ah as Yg,a2 as hT,bT as wg,av as Vg,aw as iC,w as Hg,H as HC,J as im,t as bD,F as Fg,j as jg,a3 as XC,aD as sm,M as MD,aO as sb,aa as Yl,aU as ub,aH as tb,as as Yp,c0 as db}from'./main-X6MUEPX4.js';import {d}from'./chunk-C8Zr0vl3.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze,R as Rn,J as Jt$1}from'./chunk-Bfg1Kjif.js';import {$}from'./chunk-DM-zhIVI.js';function ht(o){let t=o.replace(/^@/,""),e=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return t=t.replace(e,(n,i,r)=>`(${r})`),t.replace(/\\/g,"\\\\")}function rt(o,t){let e=ht(t),n=e.startsWith("^")&&e.endsWith("$")?e:`^(${e})$`;return new RegExp(n).test(o)}function ae(o,t){let e=t.replace(/[\\.+^${}()|[\]*?]/g,n=>n==="*"?".*":n==="?"?".":"\\"+n);return new RegExp(`^${e}$`).test(o)}var pt=["treeContainer"],gt=["formRef"],_t=[[["label"]],[["label"]],[["input"]]],ft=["label","label","input"],ot=["ngProjectAs","label",5,["label"]],mt=["ngProjectAs","input",5,["input"]],Ct=o=>({children:o,level:0}),lt=o=>({$implicit:o}),Pt=(o,t)=>({children:o,level:t}),Et=()=>({maxWidth:"700px",width:"100%"}),Mt=(o,t)=>t.id;function Tt(o,t){if(o&1){let e=ET();Zi(0,"sh-button-group",22),lm("valueChange",function(i){Pd(e);let r=aC();return qC(r.pathDiscoveryMethod,i)||(r.pathDiscoveryMethod=i),Ld(i)}),Zi(1,"button",23),oC(2,4),Wl(),Zi(3,"button",24),oC(4,5),Wl()();}if(o&2){let e=aC();cm("value",e.pathDiscoveryMethod);}}function yt(o,t){o&1&&Ig(0,"sh-progress-bar",14);}function bt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"spinner"),Wl());}function St(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"arrow-down"),Wl());}function Nt(o,t){if(o&1){let e=ET();Zi(0,"div",26),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.loadMore(i,r))}),Zi(1,"div",27),Ig(2,"sh-icon",28),lT(3,bt,2,0,"sh-icon",29)(4,St,2,0,"sh-icon",29),Wl(),Zi(5,"div",30)(6,"span"),HC(7),Wl()()();}if(o&2){let e=aC().$implicit,n=aC(2);Kg("loading",n.isLoading()===e.id),bE(3),uT(n.isLoading()===e.id?3:4),bE(4),im(e.text);}}function vt(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"caret-down"),Wl());}function Ft(o,t){o&1&&Ig(0,"sh-icon",28);}function Ot(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"spinner"),Wl());}function xt(o,t){o&1&&(Zi(0,"sh-icon",28),HC(1,"caret-right"),Wl());}function Rt(o,t){if(o&1&&Ig(0,"img",34),o&2){let e=aC(3).$implicit;vg("src",e.customIcon,Yp);}}function wt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder-open"),Wl());}function Dt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder-user"),Wl());}function It(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"file"),Wl());}function Lt(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"folder"),Wl());}function kt(o,t){if(o&1&&(lT(0,vt,2,0,"sh-icon",28)(1,Ft,1,0,"sh-icon",28)(2,Ot,2,0,"sh-icon",28)(3,xt,2,0,"sh-icon",28),lT(4,Rt,1,1,"img",34)(5,wt,2,0,"sh-icon",29)(6,Dt,2,0,"sh-icon",29)(7,It,2,0,"sh-icon",29)(8,Lt,2,0,"sh-icon",29)),o&2){let e=aC(2).$implicit,n=aC(2);uT(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),bE(4),uT(e.customIcon?4:e.children.length?5:e.id==="%HOME%"?6:e.cls==="file"?7:8);}}function At(o,t){o&1&&(Zi(0,"sh-icon",29),HC(1,"desktop-tower"),Wl());}function $t(o,t){if(o&1&&(Zi(0,"span",33),HC(1),sb(2,"bytes"),Wl()),o&2){let e=aC(2).$implicit;bE(),Yl("\xA0(",ub(2,1,e.fileSize,true,true),")");}}function Wt(o,t){o&1&&wg(0);}function Bt(o,t){if(o&1&&cg(0,Wt,1,0,"ng-container",15),o&2){let e=aC(2).$implicit,n=aC().$implicit;aC();let i=gC(7);vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(5,lt,tb(2,Pt,e.children,n.level+1)));}}function Vt(o,t){if(o&1){let e=ET();Zi(0,"div",31,3),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.toggleSelectedNode(i,r))}),Zi(2,"div",32),Hg("click",function(i){Pd(e);let r=aC().$implicit,a=aC(2);return Ld(a.toggleNode(i,r.id,r))}),lT(3,kt,9,2)(4,At,2,0,"sh-icon",29),Wl(),Zi(5,"div",30)(6,"span"),HC(7),Wl(),lT(8,$t,3,5,"span",33),Wl()(),lT(9,Bt,1,7,"ng-container");}if(o&2){let e=aC().$implicit,n=aC().$implicit,i=aC();Kg("accepted",e.accepted===true)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),bE(2),Kg("file",e.cls==="file"),bE(),uT(e.id!=="/"?3:4),bE(4),im(e.text),bE(),uT(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),bE(),uT(e.children.length>0?9:-1);}}function Gt(o,t){if(o&1&&lT(0,Nt,8,4,"div",25)(1,Vt,10,24),o&2){let e=t.$implicit,n=aC(2);uT(e.isLoadMore?0:e.hidden&&n._showHiddenNodes()||!e.hidden?1:-1);}}function Ht(o,t){if(o&1&&(Zi(0,"sh-list"),pT(1,Gt,2,1,null,null,Mt),Wl()),o&2){let e=t.$implicit;Yg("padding-left",e.level*.25,"rem"),bE(),hT(e.children);}}function zt(o,t){o&1&&wg(0);}function jt(o,t){if(o&1){let e=ET();Zi(0,"sh-toggle",35),lm("checkedChange",function(i){Pd(e);let r=aC();return qC(r._showHiddenNodes,i)||(r._showHiddenNodes=i),Ld(i)}),oC(1,6),Wl();}if(o&2){let e=aC();cm("checked",e._showHiddenNodes),bE(),Vg(e.showFiles()?"files":"folders"),iC(1);}}function Ut(o,t){if(o&1){let e=ET();Zi(0,"button",36),Hg("click",function(){Pd(e);let i=aC();return Ld(i.openCreateFolderDialog())}),oC(1,7),Wl();}if(o&2){let e=aC();vg("disabled",!e.isCurrentPathFolder());}}function Jt(o,t){if(o&1&&(Zi(0,"sh-alert",20),HC(1),Wl()),o&2){let e=aC();vg("color","error"),bE(),im(e.errorMessage());}}function Xt(o,t){if(o&1){let e=ET();Zi(0,"sh-dialog",37),lm("isOpenChange",function(i){Pd(e);let r=aC();return qC(r.createFolderDialogOpen,i)||(r.createFolderDialogOpen=i),Ld(i)}),Zi(1,"header",38)(2,"h2"),oC(3,8),Wl()(),Zi(4,"div",39)(5,"div",40)(6,"p"),oC(7,9),Wl(),Zi(8,"div",41)(9,"pre"),HC(10),Wl()()(),Zi(11,"sh-form-field")(12,"textarea",42),lm("ngModelChange",function(i){Pd(e);let r=aC();return qC(r.createFolderPath,i)||(r.createFolderPath=i),Ld(i)}),Wl(),bD(),Wl()(),Zi(13,"footer",43)(14,"button",44),Hg("click",function(){Pd(e);let i=aC();return Ld(i.closeCreateFolderDialog(false))}),HC(15,"Cancel"),Wl(),Zi(16,"button",45),Hg("click",function(){Pd(e);let i=aC();return Ld(i.closeCreateFolderDialog(true))}),Fg(17,10),Ig(18,"sh-icon"),jg(),Wl()()();}if(o&2){let e=aC();cm("isOpen",e.createFolderDialogOpen),vg("options",XC(6,Et)),bE(10),sm("",e.currentPathResolved(),"",e.createFolderPath()?"/"+e.createFolderPath():""),bE(2),cm("ngModel",e.createFolderPath),MD(),bE(4),vg("disabled",!e.createFolderPath()?.length);}}var ct=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(ct||{}),st=o=>o===-1||o===-2?-2:null,y="/",at="\0load-more",j=true,le=class o{#n=T(J);#e=T(f);#S=T(be);#f=T(r);multiSelect=E1(false);disabled=E1(false);showFiles=E1(false);selectFiles=E1(false);onlySelectFolder=E1(false);accepts=E1(null);startingPath=E1(null);rootPaths=E1([]);initialNodes=E1([]);backupSettings=E1(null);pathRefreshTrigger=E1(false);showHiddenNodes=E1(false);enableCreateFolder=E1(false);hideShortcuts=E1(false);resolvePaths=E1(false);customRemoteMode=E1(null);showUnrootedSources=E1(false);backupId=E1("");connectionStringId=E1(null);sourcePrefix=E1("");destinationUrl=E1("");loadExtendedData=E1(true);hasExtendedData=I1();searchMode=E1(false);searchResults=E1([]);_showHiddenNodes=Ge(false);createFolderDialogOpen=Ge(false);createFolderPath=Ge(null);errorMessage=Ge(null);anyRemoteSourcesLoaded=Ge(false);treeContainerRef=w1("treeContainer");formRef=w1("formRef");pathDiscoveryMethod=Ge("browse");isLoading=Ge(null);currentPath=Ge("");#h=Ge(null);treeSearchQuery=Ge("");treeNodes=Ge([]);pathDelimiter=Nt$1(()=>this.#e.systemInfo()?.DirectorySeparator??"");#s=Nt$1(()=>this.currentPathArray().filter(e=>this.#i(e)).find(e=>e.includes("*")||e.includes("[")||e.includes("{")||e.includes("?"))&&this.#e.hasV2FilterOperations());filterGroups=this.#e.filterGroups();isByBackupSettings=Nt$1(()=>{let t=this.backupSettings();return !(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=Nt$1(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathArray=Nt$1(()=>this.currentPath().split("\0").filter(t=>t!==""&&t!==y));currentPathResolved=Nt$1(()=>this.currentPathArray().map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#e.resolveShorthandPath(n)}).join("\0"));#c(t){if(!t)return null;if(t.startsWith("@")&&t.includes("|")){let e=t.split("|"),n=e[0],i=e[1],r=i.split("://")[0],a=e[2]??"";return r==="diskimage"&&!a&&(a=this.#a(e[1].split("://")[1])),{mount:n.substring(1),prefix:n,url:i,type:r,path:a}}return null}#m=Nt$1(()=>{if(!this.showUnrootedSources())return [];let t=this.rootPaths();return (t===void 0||t.length===0)&&(t=[y]),this.currentPathArray().filter(n=>!this.#i(n)).filter(n=>!n.startsWith("%")).filter(n=>!t.find(i=>n.startsWith(i))).map(n=>{let i=this.#c(n);return i?{id:n,path:i.mount,displayName:Ne(i.url),icon:Le(i.url)}:{id:n,path:n,displayName:n,icon:null}})});#d(t){return t.map(e=>{if(this.#i(e))return e;let n=this.#c(e);return n?this.#a(n.mount):e})}TreeEvalEnum=ct;#N=Nt$1(()=>{if(!this.#s())return null;let t=this.#d(this.currentPathArray()),e=t.filter(r=>!this.#i(r)),n=t.filter(r=>this.#i(r));return {paths:this.searchableTreeNodes().filter(r=>!r.isLoadMore).map(r=>r.id).filter(Boolean),sources:e,filters:n}});#C=$({params:()=>({data:this.#N()}),stream:({params:t})=>!this.#s()||!t.data||t.data.sources.length===0?iy(null):Us(300).pipe(Yu(()=>sy(()=>this.#n.postApiV2FilesystemTestFilter({body:{Paths:t.data?.paths,Sources:t.data?.sources,Filters:t.data?.filters}})).pipe(pt$1(e=>{if(!e.Success||!e.Data)return console.log("Error evaluating filters",e),null;let n=new Map;for(let i of e.Data)if(i.Path){let r=0;i.Included?r=1:i.MatchedFilter&&(r=-1),n.set(i.Path,r);}return n}),Bs(()=>iy(null)))))});searchResultTreeStructure=Nt$1(()=>{let t=this.searchResults();if(t.length===0)return [];let e=this.currentPathArray(),n=this.showHiddenNodes(),i=new Map;for(let l of t){let s=l.Path??"",h=this.#r(s),S="";for(;h!==""&&s.startsWith(S+h);)S+=h;let M=s.split(h).filter(E=>E!==""),T="";for(let E=0;E<M.length;E++){let w=M[E],B=E===M.length-1,V=!B||this.#t(s),dt=T||y,ce=T?T.endsWith(h)?T.slice(0,-h.length):T:"";if(T=ce?`${ce}${h}${w}`:`${S}${w}`,V&&!T.endsWith(h)&&(T+=h),!i.has(T))i.set(T,{part:w,parentPath:dt,isFolder:V,match:B?l:null});else if(B){let ut=i.get(T);ut.match=l;}}}let r=new Map;for(let[l,s]of i)r.has(s.parentPath)||r.set(s.parentPath,[]),r.get(s.parentPath).push(l);let a=new Set,d=new Map;for(let[l,s]of i){if(!s.isFolder){a.add(l);continue}let h=r.get(s.parentPath)||[];if(h.length===1&&h[0]===l&&s.parentPath!==y)continue;a.add(l);let M=this.#r(l),T=s.part,E=l;for(;;){let w=r.get(E)||[];if(w.length!==1)break;let B=w[0],V=i.get(B);if(!V||!V.isFolder)break;T+=M+V.part,E=B;}E!==l&&d.set(l,T);}a.add(y);let c=[],u=new Map,p=l=>l.split(this.#r(l)).filter(s=>s!=="").length,m=Array.from(a).filter(l=>l!==y).sort((l,s)=>p(l)-p(s)||l.localeCompare(s));for(let l of m){let s=i.get(l);if(!s)continue;let h=s.parentPath;for(;h!==y&&!a.has(h);)h=i.get(h)?.parentPath||y;if(u.has(l))continue;let S=this.#_(d.get(l),s.match?.Metadata)??s.part,M=s.match===null,T=s.match!==null&&!s.isFolder&&n?0:this.#s()?this.#g(l,null,e,s.isFolder?"folder":"file"):this.#u(e,l,s.isFolder?"folder":"file",null),E={id:l,resolvedpath:l,text:S,parentPath:h,children:[],evalState:T,isIndeterminate:this.isIndeterminate(e,l),cls:s.isFolder?"folder":"file",isSearchMatch:s.match!==null,isGenerated:M,hasChildrenInSearch:(r.get(l)?.length||0)>0,iconCls:null,check:false,leaf:!s.isFolder,hidden:false,systemFile:false,temporary:false,symlink:false,fileSize:s.match?.Size??0};if(u.set(l,E),h===y)c.push(E);else {let w=u.get(h);w&&w.children.push(E);}}return this.#p(c),c});#p(t){let e=this.#f.foldersFirst(),n=this.#f.caseSensitiveSort();t.some(r=>r.isLoadMore)||t.sort((r,a)=>{if(e){if(r.cls==="folder"&&a.cls!=="folder")return -1;if(r.cls!=="folder"&&a.cls==="folder")return 1}let d=r.text??"",c=a.text??"";return n?d<c?-1:d>c?1:0:d.localeCompare(c,void 0,{sensitivity:"base"})}),t.forEach(r=>this.#p(r.children));}treeStructure=Nt$1(()=>{if(this.searchMode())return this.searchResultTreeStructure();this.#C.value();let e=this.showHiddenNodes(),n=this.#v(this.currentPathArray()),i=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),d=[];r.length>0?d=r.map(u=>{let p=this.#s()?this.#g(u,null,n,"folder"):this.#u(n,u,"folder",null);return {id:u,resolvedpath:u,text:u,parentPath:"",children:[],evalState:p,isIndeterminate:false,cls:this.#t(u)?"folder":"file"}}):d=[{id:y,resolvedpath:y,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:false,cls:"folder"}];let c=this.#m().map(u=>({id:u.path,resolvedpath:u.path,remoteSource:this.#c(u.id),text:u.displayName,parentPath:"",children:[],evalState:1,isIndeterminate:false,cls:"folder",customIcon:u.icon}));return d=[...d,...c],d.map(u=>{let p=new Map;if(!u.id)return;let m$1=u.id;a&&(u.accepted=true),p.set(m$1,u);let l$1=r.length>0?i.filter(s=>s.parentPath.startsWith(m$1)):i;for(let s of l$1){if(!s.id)continue;let h=s.id;if(!s.cls||p.has(h))continue;let S=p.get(s.parentPath),M=s.isLoadMore===true,T=M||s.hidden===true&&!e?0:this.#s()?this.#g(h,S,n,s.cls):this.#u(n,h,s.cls,S),E=m(l({},s),{isIndeterminate:M?false:this.isIndeterminate(n,h),evalState:T,children:[]});M?E.accepted=true:a&&(E.accepted=this.matchAccepts(a,E)),p.set(h,E),E.id?.startsWith("%")&&E.id?.endsWith("%")&&p.set(this.#a(h),E),S&&S.children.push(E);}return this.#p(u.children),u}),d});#v(t){let e=structuredClone(t);for(let n=0;n<e.length;n++){let r=e[n].slice(1);if(r.startsWith("{")&&r.endsWith("}")){let a=r.slice(1,-1),d=this.filterGroups?.FilterGroups?.[a];if(d&&d.length){let c=d.map(u=>`-${u}`);e.splice(n,1,...c);}}}return e}#a(t){if(!t)return y;let e=this.#r(t);return t.endsWith("/")||t.endsWith("\\")||t===y?t:t+e}#P(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#a(t.resolvedpath):t.resolvedpath:null}#g(t,e,n,i){let r=st(e?.evalState);if(r!==null)return r;let a=this.#C.value();return a&&a.has(t)?a.get(t):this.#u(n,t,i,e)}#u(t,e,n,i){let r=st(i?.evalState);if(r!==null)return r;let a=0,d=this.#d(t.filter(m=>!this.#i(m))),c=t.filter(m=>this.#i(m)),u=this.multiSelect(),p=this.#P(this.treeNodes().find(m=>m.id===e))??e;if(d.length===0)return a;for(let m=0;m<d.length;m++){let l=d[m];if(e===l||p==l){a=1;break}if(!u||!this.#t(l))continue;if(e?.startsWith(l)||p?.startsWith(l)){a=1;break}}if(c.length===0)return a;for(let m=0;m<c.length;m++){let l=c[m],s=l.slice(1),h=l.startsWith("-")?-1:1;if(this.#t(s)){if(n!=="folder")continue;if(e===s||p==s){a=h;break}}if(s.startsWith("*")&&(s.endsWith("*\\")||s.endsWith("*/"))){if(n!=="folder")continue;let M=s.slice(1,-2);if(M==="")break;if(e?.includes(M+"\\")||e?.includes(M+"/")){a=h;break}}if(s.startsWith("[.*")&&(s.endsWith("[^\\/]*]")||s.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let M=s.slice(3,-7);if(new RegExp(M).test(e)){a=h;break}}if(s.startsWith("[")&&s.endsWith("]")){let M=s.slice(1,-1);if(rt(e,M)){a=h;break}}if(s.startsWith("*.")){if(n!=="file"||s.replace("*.","").length===0)continue;if(ae(e,s)){a=h;break}}if(s==="")continue;if(s===e){a=h;break}if(ae(e,s)){a=h;break}}return a}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#t(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):false}#r(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=Qa(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=Qa(()=>{let t=this.pathDiscoveryMethod(),e=this.#h();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n);}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===y)return true;let n=t.split(",");if(n.length===0)return true;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(r=>i.endsWith(r)):false}currentPathEffect=Qa(()=>{let t=this.#h();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")));});inputValueChangeAbortController=null;inputRefEffect=Qa(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#F(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.#h.set(t),t.autocomplete="off");});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#R(t);else {let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#_(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#l(null,e[0])):this.#l(null,y);}}getParentPath(t){let e=this.#r(t),n=t.split(e);return n.length<=1?y:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.isLoadMore||e.id===y||this.#m().map(p=>this.#c(p.id)?.mount).filter(p=>p).includes(e.id??"")||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(t,e.id,e);return}if(this.onlySelectFolder()&&e.cls!=="folder"||this.accepts()&&!e.accepted)return;let i=this.currentPathArray(),r=this.#d(i),a=this.isChildOfSelected(e),d=this.#P(e),c=a?`-${d}`:d,u=this.#t(d);if(this.multiSelect())if(r.includes(d))this.currentPath.set(i.filter(p=>p!==d&&!(u&&p.startsWith(c))).join("\0"));else if(r.some(p=>p==c))this.currentPath.set(i.filter(p=>p!==c).join("\0"));else {let p=u?i.filter(m=>!m.startsWith(d)):i;this.currentPath.set([...p,c].join("\0"));}else i.includes(d)?this.currentPath.set(i.filter(p=>p!==d).join("\0")):this.currentPath.set(d);}isChildOfSelected(t){return this.#d(this.currentPathArray()).filter(n=>this.#t(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e,n=null){t.stopPropagation(),n?.cls==="folder"&&(n?.children.length?this.treeNodes.update(i=>i.filter(r=>!r.id?.startsWith(n.id)||r.id===n.id)):this.#l(n,e));}loadMore(t,e){t.stopPropagation(),e.isLoadMore&&this.isLoading()===null&&this.#l(e,e.parentPath||y,e.loadMoreOffset??null);}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(true),false}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),r=this.#a(e),a=`${i}/${r}`;sy(()=>this.#n.postApiV1RemoteoperationCreate({body:{path:"file://"+a}})).subscribe({next:()=>{this.currentPath.set(a),this.#l(null,n),setTimeout(()=>{this.#E();},500),this.createFolderDialogOpen.set(false);},error:d=>{let c=d?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),u=c?c[1]:d?.message||$localize`An error occurred while trying to create the folder.`;this.#S.open(h,{data:{title:$localize`Cannot create folder`,message:u,confirmText:$localize`OK`,cancelText:void 0}});}});}}else this.createFolderDialogOpen.set(false);return false}#E(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"});},100);}#F(t){return Object.defineProperty(t,"value",{configurable:true,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:true,cancelable:true,detail:{value:e}})),e}}),t}#O(t){return sy(()=>this.#n.postApiV1Filesystem({query:{showHidden:true,onlyFolders:!this.showFiles()},body:{path:t}}))}#o(t,e,n,i=null){return sy(()=>this.#n.postApiV2DestinationList({body:{BackupId:this.backupId()??null,DestinationUrl:e?.url??this.destinationUrl()??null,ConnectionStringId:this.connectionStringId()??null,DestinationType:n,SourcePrefix:e?.prefix??this.sourcePrefix()??null,Path:t,Offset:i,Limit:100}})).pipe(pt$1(r=>{let a=r.Data?.Items??[];return {items:a.map(c=>m(l({},c),{Path:(e?.prefix??"")+c.Path})).filter(c=>c.Metadata==null||!c.Metadata.ExtType),hasMore:r.Data?.HasMore??false,nextOffset:(r.Data?.Offset??i??0)+a.length}}))}#M(t,e){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"office365"},body:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}})).pipe(pt$1(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(r=>({Path:(e?.prefix??"")+r,Metadata:JSON.parse(i[r])}))}))}#T(t,e){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"googleworkspace"},body:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}})).pipe(pt$1(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(r=>({Path:(e?.prefix??"")+r,Metadata:JSON.parse(i[r])}))}))}#y(t){return sy(()=>this.#n.postApiV1WebmoduleByModulekey({path:{modulekey:"diskimage"},body:{operation:"ListDestinationRestoreTargets",path:t??"/"}})).pipe(pt$1(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#x(t){let e=this.backupSettings();return this.#e.hasV2ListOperations()?sy(()=>this.#n.postApiV2BackupListFolder({body:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}})).pipe(pt$1(n=>n.Data??[])):sy(()=>this.#n.getApiV1BackupByIdFiles({path:{id:e.id+""},query:{"prefix-only":false,"folder-contents":true,time:e.time,filter:t?"@"+t:void 0}})).pipe(pt$1(n=>n.Files??[]))}#b(t,e,n=null){return e?.type==="office365"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#M(e.path,e):this.customRemoteMode()==="o365"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#M(t,null):e?.type==="googleworkspace"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#T(e.path,e):this.customRemoteMode()==="gsuite"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#T(t,null):e?.type==="diskimage"?this.#e.hasV2ListBackendOperations()&&j?this.#o(e.path,e,"SourceProvider",n):this.#y(e.path):this.customRemoteMode()==="diskimage"?this.#e.hasV2ListBackendOperations()&&j?this.#o(t,null,"SourceProvider",n):this.#y(t):this.isByBackupSettings()?this.#x(t):this.customRemoteMode()==="backend"?this.#o(t,null,"Backend",n):this.#O(t)}#R(t){let n=t.split("\0").filter(a=>!this.#i(a)&&!a.startsWith("@")).filter(Boolean).map(a=>{let d=this.#r(a),c=a.split(d);return c.at(-1)===""&&c.pop(),this.#t(a)||c.pop(),{split:c,sep:d}}),i=[y];n.forEach(({split:a,sep:d})=>{a.forEach((c,u)=>{let p=a.slice(0,u+1).join(d)+d;p===""||p===d||i.includes(p)||i.push(p);});});let r=i.map(a=>(this.isLoading.set(a),this.#b(a,null).pipe(pt$1(d=>({status:"success",value:d,url:a})),Bs(d=>iy({status:"error",value:d,url:a})))));wy(r).pipe(Zu(()=>this.isLoading.set(null))).subscribe({next:a=>{let d=a.filter(u=>u.status==="success");a.filter(u=>u.status==="error");this.treeNodes.update(u=>{let p=d.flatMap(l$1=>(Array.isArray(l$1.value)?l$1.value:l$1.value?.items??[]).map(h=>m(l({},h),{parentPath:l$1.url})));p.length>0&&this.anyRemoteSourcesLoaded.set(true);let m$1=[...new Map([...u,...p].map(l=>[l.id,l])).values()];return this.#E(),this.hideShortcuts()?m$1.filter(l=>!l.id.startsWith("%")):m$1});}});}#_(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#w(t){t&&t.ExtType&&t.ExtType.length>0?this.hasExtendedData.emit(t.ExtType):t&&t["diskimage:Type"]&&t["diskimage:Type"].length>0&&this.hasExtendedData.emit("diskimage");}#t(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#i(t){return t.startsWith("+")||t.startsWith("-")}#D(t,e,n){return {id:`${t}${at}`,text:$localize`Load more`,cls:"load-more",leaf:true,hidden:false,parentPath:t,remoteSource:e??void 0,isLoadMore:true,loadMoreOffset:n}}#l(t=null,e=y,n=null){let i=t?.remoteSource;this.isLoading.set(t?.isLoadMore?t.id??e:e),this.#b(e,i,n).pipe(Zu(()=>this.isLoading.set(null))).subscribe({next:r=>{let a=Array.isArray(r)?{items:r,hasMore:false,nextOffset:0}:{items:r?.items??[],hasMore:r?.hasMore??false,nextOffset:r?.nextOffset??0},d=this.isByBackupSettings()||this.customRemoteMode()!==null||i?a.items.map(c=>{this.#w(c.Metadata);let u=this.#r(c.Path),p=this.#_(c.Path.split(u).filter(S=>S!=="").pop(),c.Metadata),m$1=c.Path,l$1=null,s=this.#t(c.Path)?"folder":"file",h=c.Metadata;return i&&(m$1=c.Path.substring(1),l$1=m(l({},i),{path:c.Path.substring(i.prefix.length)})),h&&(h["diskimage:Type"]==="geometry"||h["diskimage:Type"]==="partitioninfo"||h["diskimage:Type"]==="filesystem")?null:{text:p,id:m$1,cls:s,leaf:t!==null,resolvedpath:c.Path,hidden:false,remoteSource:l$1,fileSize:c.Size}}):a.items;d.length>0&&this.anyRemoteSourcesLoaded.set(true),this.treeNodes.update(c=>{let u=d.filter(s=>s!==null).map(s=>{let h=s.cls??(this.#t(s.id)?"folder":"file");return m(l({},s),{cls:h,parentPath:e})}),p=`${e}${at}`,m$1=[...c,...u].filter(s=>s.id!==p);a.hasMore&&m$1.push(this.#D(e,i,a.nextOffset));let l$1=[...new Map(m$1.map(s=>[s.id,s])).values()];return this.hideShortcuts()?l$1.filter(s=>!s.id.startsWith("%")):l$1});},error:r=>{this.errorMessage.set(r.message),this.anyRemoteSourcesLoaded()&&setTimeout(()=>{this.errorMessage.set(null);},5e3);}});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&qg(n.treeContainerRef,pt,5)(n.formRef,gt,5),e&2&&hC(2);},hostVars:2,hostBindings:function(e,n){e&2&&Kg("disabled",n.disabled());},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],onlySelectFolder:[1,"onlySelectFolder"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],showUnrootedSources:[1,"showUnrootedSources"],backupId:[1,"backupId"],connectionStringId:[1,"connectionStringId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:ft,decls:19,vars:18,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;a=$localize`Will be created as:`;let d;return d=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,r,a,d,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"color"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",1,"load-more",3,"loading"],["action","",1,"load-more",3,"click"],[1,"icon","file"],[1,"small"],[1,"primary"],[1,"text"],["action","",3,"click"],[1,"icon",3,"click"],[1,"size"],["alt","Provider icon",1,"provider-icon",3,"src"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(lC(_t),lT(0,Tt,5,1,"sh-button-group",11),Zi(1,"div",12),uC(2,0,ot),Zi(3,"div",13,0),lT(5,yt,1,0,"sh-progress-bar",14),cg(6,Ht,3,2,"ng-template",null,1,db)(8,zt,1,0,"ng-container",15),Wl(),Zi(9,"div",16),lT(10,jt,2,2,"sh-toggle",17),lT(11,Ut,2,1,"button",18),Wl()(),Zi(12,"div",19,2)(14,"sh-form-field"),uC(15,1,ot),uC(16,2,mt),Wl()(),lT(17,Jt,2,2,"sh-alert",20),lT(18,Xt,19,7,"sh-dialog",21)),e&2){let i=gC(7);uT(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),bE(),Kg("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),bE(2),Kg("visualize-accepted",n.accepts()),bE(2),uT(n.isLoading()!=null?5:-1),bE(3),vg("ngTemplateOutlet",i)("ngTemplateOutletContext",eb(16,lt,eb(14,Ct,n.treeStructure()))),bE(2),uT(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),bE(),uT(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),bE(),Kg("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),bE(5),uT(n.errorMessage()?17:-1),bE(),uT(n.createFolderDialogOpen()?18:-1);}},dependencies:[v,x,J$1,N,Fe,c,d,de,ei,Bn,Ze,Rn,Jt$1,ue,m$1],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(img:nth-child(2)){width:2.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].load-more[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-style:italic;opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}']})};
2
2
  export{le as l};
@@ -1 +1 @@
1
- import {R}from'./chunk-D9jPw9Ov.js';import {T,g as gw,aN as hi,U as ql,o as oC,X as Gl,H as HC,aO as sb,b as bE,J as im,aT as cb}from'./main-2ZYVV4C4.js';import'./chunk-Cm7JSdTO.js';var i=class o{#e=T(R);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`Server settings`,[t]},template:function(e,E){e&1&&(ql(0,"h3"),oC(1,0),Gl(),ql(2,"code")(3,"pre"),HC(4),sb(5,"json"),Gl()()),e&2&&(bE(4),im(cb(5,1,E.serverSettings())));},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{i as default};
1
+ import {R}from'./chunk-Dn7TWCfq.js';import {T,g as gw,aN as hi,U as ql,o as oC,X as Gl,H as HC,aO as sb,b as bE,J as im,aT as cb}from'./main-X6MUEPX4.js';import'./chunk-DM-zhIVI.js';var i=class o{#e=T(R);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`Server settings`,[t]},template:function(e,E){e&1&&(ql(0,"h3"),oC(1,0),Gl(),ql(2,"code")(3,"pre"),HC(4),sb(5,"json"),Gl()()),e&2&&(bE(4),im(cb(5,1,E.serverSettings())));},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{i as default};
@@ -1 +1 @@
1
- import {w}from'./chunk-D2P9ER0I.js';import {t as te}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {g as gw,$ as lr,_ as _t,a8 as To,d as Ig,Z as Zi,o as oC,W as Wl}from'./main-2ZYVV4C4.js';import'./chunk-BGuvkLC9.js';import'./chunk-DBkkb6OR.js';import'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=gw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(Ig(0,"app-status-bar"),Zi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),oC(4,0),Wl(),Zi(5,"button",10),oC(6,1),Wl(),Zi(7,"button",11),oC(8,2),Wl(),Zi(9,"button",12),oC(10,3),Wl(),Zi(11,"button",13),oC(12,4),Wl(),Zi(13,"button",14),oC(14,5),Wl(),Zi(15,"button",15),oC(16,6),Wl()(),Zi(17,"section"),Ig(18,"router-outlet"),Wl()());},dependencies:[te,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
1
+ import {w}from'./chunk-DOUmqK2E.js';import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {g as gw,$ as lr,_ as _t,a8 as To,d as Ig,Z as Zi,o as oC,W as Wl}from'./main-X6MUEPX4.js';import'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=gw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(Ig(0,"app-status-bar"),Zi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),oC(4,0),Wl(),Zi(5,"button",10),oC(6,1),Wl(),Zi(7,"button",11),oC(8,2),Wl(),Zi(9,"button",12),oC(10,3),Wl(),Zi(11,"button",13),oC(12,4),Wl(),Zi(13,"button",14),oC(14,5),Wl(),Zi(15,"button",15),oC(16,6),Wl()(),Zi(17,"section"),Ig(18,"router-outlet"),Wl()());},dependencies:[te,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
@@ -1,2 +1,2 @@
1
- import {T,N as Nt,g as gw,U as ql,H as HC,X as Gl,l as lT,b as bE,c as uT,ab as J,G as Ge,ad as sy,C as Zu,a_ as ee,a1 as pT,h as aC,ah as Yg,a2 as hT,J as im,aq as dT}from'./main-2ZYVV4C4.js';var l=class e{#e=T(J);isLoaded=Ge(false);crashLog=Ge(null);load(){this.isLoaded()||sy(()=>this.#e.getApiV1LogdataCrashlog()).pipe(Zu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(ql(0,"div",0),HC(1,"Loading ..."),Gl());}function S(e,t){e&1&&(ql(0,"div",0),HC(1,"No crash log found"),Gl());}function w(e,t){if(e&1&&(ql(0,"li"),HC(1),Gl()),e&2){let n=t.$implicit;bE(),im(n);}}function I(e,t){if(e&1&&(ql(0,"div",2)(1,"code")(2,"ol",3),pT(3,w,2,1,"li",null,dT),Gl()()()),e&2){let n=aC();Yg("grid-column","1 / -1")("height","auto"),bE(3),hT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
1
+ import {T,N as Nt,g as gw,U as ql,H as HC,X as Gl,l as lT,b as bE,c as uT,ab as J,G as Ge,ad as sy,C as Zu,a_ as ee,a1 as pT,h as aC,ah as Yg,a2 as hT,J as im,aq as dT}from'./main-X6MUEPX4.js';var l=class e{#e=T(J);isLoaded=Ge(false);crashLog=Ge(null);load(){this.isLoaded()||sy(()=>this.#e.getApiV1LogdataCrashlog()).pipe(Zu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(ql(0,"div",0),HC(1,"Loading ..."),Gl());}function S(e,t){e&1&&(ql(0,"div",0),HC(1,"No crash log found"),Gl());}function w(e,t){if(e&1&&(ql(0,"li"),HC(1),Gl()),e&2){let n=t.$implicit;bE(),im(n);}}function I(e,t){if(e&1&&(ql(0,"div",2)(1,"code")(2,"ol",3),pT(3,w,2,1,"li",null,dT),Gl()()()),e&2){let n=aC();Yg("grid-column","1 / -1")("height","auto"),bE(3),hT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
2
2
  `):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=gw({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){n&1&&(ql(0,"h3"),HC(1,"Crash log"),Gl(),lT(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,I,5,4,"div",1)),n&2&&(bE(2),uT(d.logsLoading()?2:d.crashLog()==null||d.crashLog()?.length===0?3:4));},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{m as default};
@@ -1,2 +1,2 @@
1
- import {E as E1,bd as ce,g as gw,V as Eg,ah as Yg,aE as yg,x as xC}from'./main-2ZYVV4C4.js';var d=(()=>{class s{constructor(){this.value=E1(void 0),this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("progressBar",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||s)};}static{this.\u0275cmp=gw({type:s,selectors:[["sh-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100"],hostVars:3,hostBindings:function(r,a){r&2&&(yg("aria-valuenow",a.value()!==void 0?a.value():null),xC(a.hostClasses()));},inputs:{value:[1,"value"],color:[1,"color"],variant:[1,"variant"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(r,a){r&1&&Eg(0,"div",0),r&2&&Yg("width",a.value(),"%");},styles:[`sh-progress-bar{--pb-h: .5rem;--pb-b: var(--base-4);--pb-bg: var(--base-3);--pb-br: var(--shape-2);--pbt-bg: var(--base-6);--pbt-br: inherit;display:block;width:100%;height:var(--pb-h);position:relative;overflow:hidden;border-radius:var(--pb-br);background:var(--pb-bg)}sh-progress-bar .progress-bar{position:absolute;top:0;left:0;bottom:0;height:100%;transform-origin:top left;border-radius:var(--pbt-br);background:var(--pbt-bg)}sh-progress-bar.indeterminate .progress-bar{right:0;animation:indeterminate-progress-bar-stripes 2s linear infinite}sh-progress-bar.indeterminate:after{content:"";position:absolute;inset:0;background-color:var(--base-2);animation:indeterminate-progress-bar-stripes-background 2s linear infinite;transform-origin:top left}sh-progress-bar.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.error{--pbt-bg: var(--error-8)}sh-progress-bar.success{--pbt-bg: var(--success-8)}sh-progress-bar.outlined{--pb-b: var(--border-10);--pb-bg: var(--base-1)}sh-progress-bar.outlined:after{background-color:inherit}sh-progress-bar.flat{--pbt-bg: var(--base-8)}sh-progress-bar.flat:after{background-color:inherit}sh-progress-bar.flat.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.flat.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.flat.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.flat.error{--pbt-bg: var(--error-8)}sh-progress-bar.flat.success{--pbt-bg: var(--success-8)}sh-progress-bar.raised{--pbt-bg: var(--base-g3)}sh-progress-bar.raised.primary{--pbt-bg: var(--primary-g3)}sh-progress-bar.raised.accent{--pbt-bg: var(--accent-g3)}sh-progress-bar.raised.warn{--pbt-bg: var(--warn-g3)}sh-progress-bar.raised.error{--pbt-bg: var(--error-g3)}sh-progress-bar.raised.success{--pbt-bg: var(--success-g3)}@keyframes indeterminate-progress-bar-stripes-background{0%{animation-timing-function:cubic-bezier(.15,0,.515058,.409685);transform:translate(0)}25%{animation-timing-function:cubic-bezier(.31033,.284058,.8,.733712);transform:translate(37.651913%)}48.35%{animation-timing-function:cubic-bezier(.4,.627035,.6,.902026);transform:translate(84.386165%)}to{transform:translate(160.277782%)}}@keyframes indeterminate-progress-bar-stripes{0%{transform:translate(0)}20%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translate(0)}59.15%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translate(83.67142%)}to{transform:translate(200.611057%)}}
1
+ import {E as E1,bd as ce,g as gw,V as Eg,ah as Yg,aE as yg,x as xC}from'./main-X6MUEPX4.js';var d=(()=>{class s{constructor(){this.value=E1(void 0),this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("progressBar",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||s)};}static{this.\u0275cmp=gw({type:s,selectors:[["sh-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100"],hostVars:3,hostBindings:function(r,a){r&2&&(yg("aria-valuenow",a.value()!==void 0?a.value():null),xC(a.hostClasses()));},inputs:{value:[1,"value"],color:[1,"color"],variant:[1,"variant"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(r,a){r&1&&Eg(0,"div",0),r&2&&Yg("width",a.value(),"%");},styles:[`sh-progress-bar{--pb-h: .5rem;--pb-b: var(--base-4);--pb-bg: var(--base-3);--pb-br: var(--shape-2);--pbt-bg: var(--base-6);--pbt-br: inherit;display:block;width:100%;height:var(--pb-h);position:relative;overflow:hidden;border-radius:var(--pb-br);background:var(--pb-bg)}sh-progress-bar .progress-bar{position:absolute;top:0;left:0;bottom:0;height:100%;transform-origin:top left;border-radius:var(--pbt-br);background:var(--pbt-bg)}sh-progress-bar.indeterminate .progress-bar{right:0;animation:indeterminate-progress-bar-stripes 2s linear infinite}sh-progress-bar.indeterminate:after{content:"";position:absolute;inset:0;background-color:var(--base-2);animation:indeterminate-progress-bar-stripes-background 2s linear infinite;transform-origin:top left}sh-progress-bar.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.error{--pbt-bg: var(--error-8)}sh-progress-bar.success{--pbt-bg: var(--success-8)}sh-progress-bar.outlined{--pb-b: var(--border-10);--pb-bg: var(--base-1)}sh-progress-bar.outlined:after{background-color:inherit}sh-progress-bar.flat{--pbt-bg: var(--base-8)}sh-progress-bar.flat:after{background-color:inherit}sh-progress-bar.flat.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.flat.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.flat.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.flat.error{--pbt-bg: var(--error-8)}sh-progress-bar.flat.success{--pbt-bg: var(--success-8)}sh-progress-bar.raised{--pbt-bg: var(--base-g3)}sh-progress-bar.raised.primary{--pbt-bg: var(--primary-g3)}sh-progress-bar.raised.accent{--pbt-bg: var(--accent-g3)}sh-progress-bar.raised.warn{--pbt-bg: var(--warn-g3)}sh-progress-bar.raised.error{--pbt-bg: var(--error-g3)}sh-progress-bar.raised.success{--pbt-bg: var(--success-g3)}@keyframes indeterminate-progress-bar-stripes-background{0%{animation-timing-function:cubic-bezier(.15,0,.515058,.409685);transform:translate(0)}25%{animation-timing-function:cubic-bezier(.31033,.284058,.8,.733712);transform:translate(37.651913%)}48.35%{animation-timing-function:cubic-bezier(.4,.627035,.6,.902026);transform:translate(84.386165%)}to{transform:translate(160.277782%)}}@keyframes indeterminate-progress-bar-stripes{0%{transform:translate(0)}20%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translate(0)}59.15%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translate(83.67142%)}to{transform:translate(200.611057%)}}
2
2
  `],encapsulation:2});}}return s})();export{d};
@@ -1 +1 @@
1
- import {t as te}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,f,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,o as oC,W as Wl,F as Fg,j as jg,l as lT,b as bE,K as Kg,z as vg,a3 as XC,c as uT}from'./main-2ZYVV4C4.js';import {f as f$1}from'./chunk-CFgDqLU0.js';import'./chunk-BGuvkLC9.js';import'./chunk-DBkkb6OR.js';import'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Zi(0,"sh-card",11),Ig(1,"img",15),Zi(2,"h3"),oC(3,7),Wl(),Zi(4,"p"),oC(5,8),Wl(),Zi(6,"button",13),Fg(7,9),Ig(8,"sh-icon"),jg(),Wl()()),r&2&&(bE(6),vg("routerLink",XC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(f).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=gw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"h2"),oC(3,0),Wl(),Zi(4,"div",10)(5,"sh-card",11),Ig(6,"img",12),Zi(7,"h3"),oC(8,1),Wl(),Zi(9,"p"),oC(10,2),Wl(),Zi(11,"button",13),Fg(12,3),Ig(13,"sh-icon"),jg(),Wl()(),Zi(14,"sh-card",11),Ig(15,"img",14),Zi(16,"h3"),oC(17,4),Wl(),Zi(18,"p"),oC(19,5),Wl(),Zi(20,"button",13),Fg(21,6),Ig(22,"sh-icon"),jg(),Wl()(),lT(23,U,9,2,"sh-card",11),Wl()()),i&2&&(bE(4),Kg("three-column",C.hasRestoreControlFilesOperation()),bE(7),vg("routerLink",XC(5,B)),bE(9),vg("routerLink",XC(6,G)),bE(3),uT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[te,v,f$1,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
1
+ import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,f,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,o as oC,W as Wl,F as Fg,j as jg,l as lT,b as bE,K as Kg,z as vg,a3 as XC,c as uT}from'./main-X6MUEPX4.js';import {f as f$1}from'./chunk-8A93BNds.js';import'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Zi(0,"sh-card",11),Ig(1,"img",15),Zi(2,"h3"),oC(3,7),Wl(),Zi(4,"p"),oC(5,8),Wl(),Zi(6,"button",13),Fg(7,9),Ig(8,"sh-icon"),jg(),Wl()()),r&2&&(bE(6),vg("routerLink",XC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(f).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=gw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"h2"),oC(3,0),Wl(),Zi(4,"div",10)(5,"sh-card",11),Ig(6,"img",12),Zi(7,"h3"),oC(8,1),Wl(),Zi(9,"p"),oC(10,2),Wl(),Zi(11,"button",13),Fg(12,3),Ig(13,"sh-icon"),jg(),Wl()(),Zi(14,"sh-card",11),Ig(15,"img",14),Zi(16,"h3"),oC(17,4),Wl(),Zi(18,"p"),oC(19,5),Wl(),Zi(20,"button",13),Fg(21,6),Ig(22,"sh-icon"),jg(),Wl()(),lT(23,U,9,2,"sh-card",11),Wl()()),i&2&&(bE(4),Kg("three-column",C.hasRestoreControlFilesOperation()),bE(7),vg("routerLink",XC(5,B)),bE(9),vg("routerLink",XC(6,G)),bE(3),uT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[te,v,f$1,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
@@ -1 +1 @@
1
- import v from'./chunk-CLlZiOaO.js';import'./chunk-D6y9RCQD.js';import {w}from'./chunk-DKRWta24.js';import'./chunk-CSrYlKTK.js';import {n as ne$1}from'./chunk-BjqgOGb9.js';import'./chunk-DkVHfoYw.js';import'./chunk-iU19kwHx.js';import'./chunk-DWCofCiP.js';import'./chunk-6-sszNfh.js';import'./chunk-Kq2ZFJSk.js';import'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import'./chunk-fDWfSg6Y.js';import'./chunk-DuRr4rDS.js';import {m}from'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,ab as J,bk as B,aY as D,ax as W,G as Ge,N as Nt,ad as sy,g as gw,a as N,aJ as m$1,bj as pi,Z as Zi,l as lT,o as oC,W as Wl,d as Ig,b as bE,c as uT,z as vg,aR as zl,aS as Ql,h as aC,F as Fg,j as jg,av as Vg,aw as iC,at as Gd,bl as zd,H as HC,aO as sb,aD as sm,aT as cb}from'./main-2ZYVV4C4.js';import {f as f$1}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import'./chunk-DBkkb6OR.js';import'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';function U(n,t){n&1&&(Zi(0,"div",17),Gd(),Zi(1,"svg",19),Ig(2,"circle",20),Wl(),zd(),Zi(3,"sh-icon",21),oC(4,3),Wl()());}function Y(n,t){n&1&&(Zi(0,"div",18),Gd(),Zi(1,"svg",19),Ig(2,"circle",20),Wl(),zd(),Zi(3,"sh-icon",22),oC(4,4),Wl()());}function ee(n,t){if(n&1&&(Zi(0,"sh-card",10),zl(1,16),oC(2,2),Ql(),lT(3,U,5,0,"div",17)(4,Y,5,0,"div",18),Wl()),n&2){let e=aC();bE(3),uT(e.restoreResult()=="success"?3:4);}}function te(n,t){if(n&1&&(HC(0),sb(1,"number"),sb(2,"number")),n&2){let e=aC(2);sm(" ",cb(1,2,e.statusData()?.ProcessedFileCount)," of ",cb(2,4,e.statusData()?.TotalFileCount)," ");}}function ne(n,t){n&1&&(zl(0),oC(1,8),Ql());}function oe(n,t){if(n&1&&(HC(0),sb(1,"bytes"),sb(2,"bytes")),n&2){let e=aC(2);sm(" ",cb(1,2,e.statusData()?.ProcessedFileSize)," of ",cb(2,4,e.statusData()?.TotalFileSize)," ");}}function ie(n,t){n&1&&(zl(0),oC(1,9),Ql());}function re(n,t){if(n&1&&(Zi(0,"sh-card",10)(1,"h3"),Fg(2,5),Ig(3,"sh-spinner",23),jg(),Wl(),Zi(4,"div",24),Ig(5,"sh-progress-bar",25),Zi(6,"p")(7,"span"),oC(8,6),Wl(),lT(9,te,3,6)(10,ne,2,0,"ng-container"),Wl(),Zi(11,"p")(12,"span"),oC(13,7),Wl(),lT(14,oe,3,6)(15,ie,2,0,"ng-container"),Wl()()()),n&2){let e=aC();bE(3),Vg(e.statusData()?.statusText),iC(2),bE(2),vg("value",e.statusData()?.OverallProgress),bE(4),uT(e.statusData()?.ProcessedFileCount?9:10),bE(5),uT(e.statusData()?.ProcessedFileSize?14:15);}}var f=class n{#i=T(J);#r=T(B);#t=T(D);#n=T(w);#s=T(W);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=Ge("");#e=null;lastRestoreStarted=Nt(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return {predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??false}};ngOnInit(){let t=Number(this.#s.snapshot.params.taskid??"");sy(()=>this.#i.getApiV1TaskByTaskid({path:{taskid:t}})).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e);},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.");}});}#_(t){this.#r.waitForTaskToComplete(t).subscribe(e=>{this.#o(e);});}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error");}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-restore-progress"]],decls:12,vars:5,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let a;a=$localize`Restore completed`;let M;M=$localize`check-bold`;let N;N=$localize`warning-octagon`;let G;G=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let y;return y=$localize`N/A`,[t,e,a,M,N,G,h,F,L,y,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,a){e&1&&(Zi(0,"section"),lT(1,ee,5,1,"sh-card",10)(2,re,16,4,"sh-card",10),Zi(3,"sh-card",11)(4,"h3"),oC(5,0),Wl(),Zi(6,"div",12),Ig(7,"app-notifications",13),Wl()(),Zi(8,"sh-card",14)(9,"h3"),oC(10,1),Wl(),Ig(11,"app-logs-live",15),Wl()()),e&2&&(bE(),uT(a.restoreResult()!=""?1:2),bE(6),vg("notificationFilterPredicate",a.notificationFilterPredicate()),bE(4),vg("polling",a.restoreResult()=="")("whenFilter",a.lastRestoreStarted()?.getTime())("backupIdFilter",a.backupId()));},dependencies:[v,d,m,N,f$1,ne$1,m$1,pi],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}']})};export{f as default};
1
+ import v from'./chunk-VrjhL6gl.js';import'./chunk-9Pc-waxi.js';import {w}from'./chunk-CpY-WOcD.js';import'./chunk-BG8y51P2.js';import {n as ne$1}from'./chunk-BIZHZ66x.js';import'./chunk-BSCOyYHH.js';import'./chunk-B20GDhu-.js';import'./chunk-3iAIXnG6.js';import'./chunk-644SEuYO.js';import'./chunk-hTxREuXu.js';import'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import'./chunk-5q0UK__c.js';import'./chunk-CaQaYVo7.js';import {m}from'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ab as J,bk as B,aY as D,ax as W,G as Ge,N as Nt,ad as sy,g as gw,a as N,aJ as m$1,bj as pi,Z as Zi,l as lT,o as oC,W as Wl,d as Ig,b as bE,c as uT,z as vg,aR as zl,aS as Ql,h as aC,F as Fg,j as jg,av as Vg,aw as iC,at as Gd,bl as zd,H as HC,aO as sb,aD as sm,aT as cb}from'./main-X6MUEPX4.js';import {f as f$1}from'./chunk-8A93BNds.js';import {d}from'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';function U(n,t){n&1&&(Zi(0,"div",17),Gd(),Zi(1,"svg",19),Ig(2,"circle",20),Wl(),zd(),Zi(3,"sh-icon",21),oC(4,3),Wl()());}function Y(n,t){n&1&&(Zi(0,"div",18),Gd(),Zi(1,"svg",19),Ig(2,"circle",20),Wl(),zd(),Zi(3,"sh-icon",22),oC(4,4),Wl()());}function ee(n,t){if(n&1&&(Zi(0,"sh-card",10),zl(1,16),oC(2,2),Ql(),lT(3,U,5,0,"div",17)(4,Y,5,0,"div",18),Wl()),n&2){let e=aC();bE(3),uT(e.restoreResult()=="success"?3:4);}}function te(n,t){if(n&1&&(HC(0),sb(1,"number"),sb(2,"number")),n&2){let e=aC(2);sm(" ",cb(1,2,e.statusData()?.ProcessedFileCount)," of ",cb(2,4,e.statusData()?.TotalFileCount)," ");}}function ne(n,t){n&1&&(zl(0),oC(1,8),Ql());}function oe(n,t){if(n&1&&(HC(0),sb(1,"bytes"),sb(2,"bytes")),n&2){let e=aC(2);sm(" ",cb(1,2,e.statusData()?.ProcessedFileSize)," of ",cb(2,4,e.statusData()?.TotalFileSize)," ");}}function ie(n,t){n&1&&(zl(0),oC(1,9),Ql());}function re(n,t){if(n&1&&(Zi(0,"sh-card",10)(1,"h3"),Fg(2,5),Ig(3,"sh-spinner",23),jg(),Wl(),Zi(4,"div",24),Ig(5,"sh-progress-bar",25),Zi(6,"p")(7,"span"),oC(8,6),Wl(),lT(9,te,3,6)(10,ne,2,0,"ng-container"),Wl(),Zi(11,"p")(12,"span"),oC(13,7),Wl(),lT(14,oe,3,6)(15,ie,2,0,"ng-container"),Wl()()()),n&2){let e=aC();bE(3),Vg(e.statusData()?.statusText),iC(2),bE(2),vg("value",e.statusData()?.OverallProgress),bE(4),uT(e.statusData()?.ProcessedFileCount?9:10),bE(5),uT(e.statusData()?.ProcessedFileSize?14:15);}}var f=class n{#i=T(J);#r=T(B);#t=T(D);#n=T(w);#s=T(W);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=Ge("");#e=null;lastRestoreStarted=Nt(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return {predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??false}};ngOnInit(){let t=Number(this.#s.snapshot.params.taskid??"");sy(()=>this.#i.getApiV1TaskByTaskid({path:{taskid:t}})).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e);},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.");}});}#_(t){this.#r.waitForTaskToComplete(t).subscribe(e=>{this.#o(e);});}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error");}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-restore-progress"]],decls:12,vars:5,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let a;a=$localize`Restore completed`;let M;M=$localize`check-bold`;let N;N=$localize`warning-octagon`;let G;G=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let y;return y=$localize`N/A`,[t,e,a,M,N,G,h,F,L,y,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,a){e&1&&(Zi(0,"section"),lT(1,ee,5,1,"sh-card",10)(2,re,16,4,"sh-card",10),Zi(3,"sh-card",11)(4,"h3"),oC(5,0),Wl(),Zi(6,"div",12),Ig(7,"app-notifications",13),Wl()(),Zi(8,"sh-card",14)(9,"h3"),oC(10,1),Wl(),Ig(11,"app-logs-live",15),Wl()()),e&2&&(bE(),uT(a.restoreResult()!=""?1:2),bE(6),vg("notificationFilterPredicate",a.notificationFilterPredicate()),bE(4),vg("polling",a.restoreResult()=="")("whenFilter",a.lastRestoreStarted()?.getTime())("backupIdFilter",a.backupId()));},dependencies:[v,d,m,N,f$1,ne$1,m$1,pi],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}']})};export{f as default};
@@ -1 +1 @@
1
- import {m}from'./chunk-7T5O8Syb.js';import {T,a5 as m$1,E as E1,N as Nt,Q as Qa,g as gw,$ as lr,Z as Zi,o as oC,W as Wl,d as Ig,b as bE,av as Vg,aw as iC,aF as JC}from'./main-2ZYVV4C4.js';var o=class a{#e=T(m);#t=T(m$1);id=E1.required();backup=Nt(()=>this.#t.getBackupById(this.id()));initEffect=Qa(()=>this.#e.init(this.id()));static \u0275fac=function(e){return new(e||a)};static \u0275cmp=gw({type:a,selectors:[["app-purge-files"]],inputs:{id:[1,"id"]},features:[JC([m])],decls:3,vars:1,consts:()=>{let t;return t=$localize`Remove files from: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t]},template:function(e,C){e&1&&(Zi(0,"h3"),oC(1,0),Wl(),Ig(2,"router-outlet")),e&2&&(bE(),Vg(C.backup()?.Backup?.Name),iC(1));},dependencies:[lr],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;height:100%}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}"]})};export{o as default};
1
+ import {m}from'./chunk-BM5sEnUl.js';import {T,a5 as m$1,E as E1,N as Nt,Q as Qa,g as gw,$ as lr,Z as Zi,o as oC,W as Wl,d as Ig,b as bE,av as Vg,aw as iC,aF as JC}from'./main-X6MUEPX4.js';var o=class a{#e=T(m);#t=T(m$1);id=E1.required();backup=Nt(()=>this.#t.getBackupById(this.id()));initEffect=Qa(()=>this.#e.init(this.id()));static \u0275fac=function(e){return new(e||a)};static \u0275cmp=gw({type:a,selectors:[["app-purge-files"]],inputs:{id:[1,"id"]},features:[JC([m])],decls:3,vars:1,consts:()=>{let t;return t=$localize`Remove files from: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t]},template:function(e,C){e&1&&(Zi(0,"h3"),oC(1,0),Wl(),Ig(2,"router-outlet")),e&2&&(bE(),Vg(C.backup()?.Backup?.Name),iC(1));},dependencies:[lr],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;height:100%}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}"]})};export{o as default};
@@ -1 +1 @@
1
- import {d}from'./chunk-gId840Er.js';import'./chunk-CSrYlKTK.js';import'./chunk-Kq2ZFJSk.js';import'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import {J as J$1}from'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import {I as Ie,L as Le$1}from'./chunk-fDWfSg6Y.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import {D}from'./chunk-CKUlUN3q.js';import {T,ab as J,e as ee,ai as fe,a5 as m,G as Ge$1,N as Nt,aj as m$1,ak as l,ad as sy,C as Zu,g as gw,v,a as N,aJ as m$2,b3 as m$3,Z as Zi,o as oC,W as Wl,l as lT,w as Hg,d as Ig,F as Fg,j as jg,b as bE,c as uT,z as vg,i as ET,a1 as pT,n as lm,P as Pd,h as aC,p as qC,L as Ld,a2 as hT,y as cm,t as bD,H as HC,M as MD,K as Kg,aa as Yl,as as Yp,aO as sb,av as Vg,aT as cb,aw as iC,aP as lb}from'./main-2ZYVV4C4.js';import {f}from'./chunk-CFgDqLU0.js';import {d as d$1}from'./chunk-BGuvkLC9.js';import {F as Fe$1}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {a as at}from'./chunk-DneBfCBh.js';import {U}from'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var Fe=(n,t)=>t.BackupId;function Pe(n,t){n&1&&(Zi(0,"div",14),Ig(1,"sh-progress-bar",20),Zi(2,"p"),oC(3,3),Wl()());}function Me(n,t){n&1&&(Zi(0,"div",15)(1,"p"),oC(2,4),Wl()());}function he(n,t){if(n&1){let e=ET();Zi(0,"sh-icon",33),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.searchTerm.set(""))}),HC(1,"x-circle"),Wl();}}function Le(n,t){if(n&1){let e=ET();Zi(0,"div",27)(1,"sh-form-field")(2,"input",28),lm("ngModelChange",function(o){Pd(e);let c=aC(2);return qC(c.searchTerm,o)||(c.searchTerm=o),Ld(o)}),Wl(),bD(),Zi(3,"sh-icon",29),HC(4,"magnifying-glass"),Wl(),lT(5,he,2,0,"sh-icon",30),Wl()(),Zi(6,"div",31)(7,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectAll())}),oC(8,6),Wl(),Zi(9,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectNone())}),oC(10,7),Wl()();}if(n&2){let e=aC(2);bE(2),cm("ngModel",e.searchTerm),MD(),bE(3),uT(e.searchTerm()?5:-1),bE(2),vg("disabled",e.allSelected()),bE(2),vg("disabled",e.noneSelected());}}function ye(n,t){if(n&1&&(Zi(0,"div"),oC(1,8),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.SourceFilesSize)),iC(1);}}function Ae(n,t){if(n&1&&(Zi(0,"div"),oC(1,9),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.TargetFilesSize)),iC(1);}}function Re(n,t){if(n&1&&(Zi(0,"div"),oC(1,10),sb(2,"relativeTime"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(lb(2,1,e.Metadata?.LastBackupFinished,false)),iC(1);}}function Ge(n,t){if(n&1){let e=ET();Zi(0,"sh-card",34),Hg("click",function(){let o=Pd(e).$implicit,c=aC(2);return Ld(c.toggleSelected(o.BackupId))}),Zi(1,"sh-checkbox",35),lm("checkedChange",function(o){let c=Pd(e).$implicit;return qC(c.Selected,o)||(c.Selected=o),Ld(o)}),Zi(2,"h3"),HC(3),Zi(4,"sh-chip",36),Ig(5,"img",37),HC(6),Wl()()(),Zi(7,"div",38),lT(8,ye,3,3,"div"),lT(9,Ae,3,3,"div"),lT(10,Re,3,4,"div"),Wl()();}if(n&2){let e=t.$implicit,i=aC(2);Kg("unmatched",e.Match===false),bE(),cm("checked",e.Selected),bE(2),Yl(" ",e.Name," "),bE(2),vg("src",i.getBackendIcon(e.TargetURLDisplay),Yp),bE(),Yl(" ",i.getBackendType(e.TargetURLDisplay)," "),bE(2),uT(e.Metadata?.SourceFilesSize?8:-1),bE(),uT(e.Metadata?.TargetFilesSize?9:-1),bE(),uT(e.Metadata?.LastBackupFinished?10:-1);}}function De(n,t){if(n&1){let e=ET();Zi(0,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC(2);return qC(c.saveNow,o)||(c.saveNow=o),Ld(o)}),Fg(1,11),Ig(2,"sh-icon",39),jg(),Wl();}if(n&2){let e=aC(2);vg("color","primary"),cm("checked",e.saveNow),bE(2),vg("shTooltip","Save backups without editing the configuration");}}function ke(n,t){n&1&&(Zi(0,"sh-toggle",25),Fg(1,12),Ig(2,"sh-icon",39),jg(),Wl()),n&2&&(vg("color","primary")("checked",true)("disabled",true),bE(2),vg("shTooltip","Save now can only be disabled when importing a single backup"));}function $e(n,t){if(n&1){let e=ET();lT(0,Le,11,4),Zi(1,"div",21),pT(2,Ge,11,9,"sh-card",22,Fe),Wl(),Zi(4,"div",23),lT(5,De,3,3,"sh-toggle",24)(6,ke,3,4,"sh-toggle",25),Zi(7,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC();return qC(c.importMetadata,o)||(c.importMetadata=o),Ld(o)}),oC(8,5),Wl()();}if(n&2){let e=aC();uT(e.configs().length>1?0:-1),bE(2),hT(e.configsSorted()),bE(3),uT(e.selectedItems().length<=1?5:6),bE(2),vg("color","primary"),cm("checked",e.importMetadata);}}function be(n,t){n&1&&oC(0,2,1);}function xe(n,t){n&1&&oC(0,2,2);}var K=class n{#t=T(d);#n=T(J);#e=T(ee);#i=T(fe);#o=T(m);getBackendType=Ie;getBackendIcon=Le$1;isLoading=Ge$1(true);isImporting=Ge$1(false);configs=Ge$1([]);saveNow=Ge$1(false);importMetadata=Ge$1(false);searchTerm=Ge$1("");allSelected=Nt(()=>this.selectedItems().length===this.configs().length);noneSelected=Nt(()=>this.selectedItems().length===0);configsSorted=Nt(()=>{let t=this.searchTerm().toLowerCase();return this.configs().map(e=>m$1(l({},e),{Match:t?e.Name?.toLowerCase().includes(t):null})).sort((e,i)=>(e.Name??"").localeCompare(i.Name??"")).sort((e,i)=>e.Match===i.Match?0:e.Match?-1:1)});ngOnInit(){let t=this.#t.temporaryBackupId();if(!t){this.#e.navigate(["/backup/import-destination/destination"]);return}sy(()=>this.#n.postApiV1BackupByIdRestoreTaskConfig({path:{id:t}})).pipe(Zu(()=>this.isLoading.set(false))).subscribe({next:e=>{let i=e.sort((o,c)=>(o.Name??"").localeCompare(c.Name??"")).map(o=>m$1(l({},o),{Selected:e.length===1}));this.configs.set(i);},error:e=>{this.#t.showErrorDialog(e.message||"Failed to fetch configurations");}});}toggleSelected(t){this.configs.update(e=>e.map(i=>i.BackupId===t?m$1(l({},i),{Selected:!i.Selected}):i));}selectAll(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:true})));}selectNone(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:false})));}selectedItems=Nt(()=>this.configs().filter(t=>t.Selected));import(){let t=this.selectedItems();if(t.length===0)return;let e=this.importMetadata(),i=this.saveNow()||t.length!==1;this.isImporting.set(true);let o=c=>{if(c>=t.length){this.isImporting.set(false),this.#i.success($localize`Successfully imported ${t.length} backup(s)`),this.#e.navigate(["/"]);return}let N=t[c];sy(()=>this.#n.postApiV1BackupByIdImportfromtemp({body:{BackupId:N.BackupId,ImportMetadata:e,Direct:i}})).subscribe({next:u=>{if(i)this.configs.update(I=>I.filter(G=>G.BackupId!==N.BackupId)),o(c+1);else {this.isImporting.set(false);let I=this.#o.addDraftBackup(u.data);this.#e.navigate(["/backup-draft",I]);}},error:u=>{this.isImporting.set(false),this.#t.showErrorDialog(`Failed to import ${N.Name}: ${u.message}`);}});};o(0);}back(){this.#e.navigate(["/backup/import-destination/encryption"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-import-destination-select-config"]],decls:14,vars:4,consts:()=>{let t;t=$localize`Select configurations to import`;let e;e=$localize`Back`;let i;i=$localize`${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Importing... ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE: Import selected ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let o;o=$localize`Fetching backup configurations from destination...`;let c;c=$localize`No backup configurations found at this destination.`;let N;N=$localize`Import metadata`;let u;u=$localize`Search for destination...`;let I;I=$localize`Select all`;let G;G=$localize`Select none`;let U;U=$localize` Source size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let J;J=$localize` Target size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let X;X=$localize` Last backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let V;return V=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,i,o,c,N,I,G,U,J,X,z,V,[1,"content-wrapper"],[1,"loading-state"],[1,"empty-state"],[1,"actions"],["shButton","",3,"click","disabled"],[1,"spacer"],["shButton","",1,"primary","raised",3,"click","disabled"],[1,"primary","indeterminate"],[1,"config-list"],[1,"type-a","actionable","full-width",3,"unmatched"],[1,"options"],[3,"color","checked"],[3,"color","checked","disabled"],[3,"checkedChange","color","checked"],[1,"search-area"],["type","text","placeholder",u,3,"ngModelChange","ngModel"],["prefix",""],["suffix","",1,"clear-search"],[1,"list-actions"],["shButton","",1,"small",3,"click","disabled"],["suffix","",1,"clear-search",3,"click"],[1,"type-a","actionable","full-width",3,"click"],[1,"primary","raised",3,"checkedChange","checked"],[1,"small","provider"],["alt","",1,"provider-icon",3,"src"],[1,"metadata"],[1,"small",3,"shTooltip"]]},template:function(e,i){e&1&&(Zi(0,"div",13)(1,"h2"),oC(2,0),Wl(),lT(3,Pe,4,0,"div",14)(4,Me,3,0,"div",15)(5,$e,9,4),Zi(6,"div",16)(7,"button",17),Hg("click",function(){return i.back()}),oC(8,1),Wl(),Ig(9,"div",18),Zi(10,"button",19),Hg("click",function(){return i.import()}),Fg(11,2),lT(12,be,1,0)(13,xe,1,0),jg(),Wl()()()),e&2&&(bE(3),uT(i.isLoading()?3:i.configs().length===0?4:5),bE(4),vg("disabled",i.isImporting()),bE(3),vg("disabled",i.isImporting()||i.selectedItems().length===0||i.isLoading()),bE(2),uT(i.isImporting()?12:13));},dependencies:[v,f,J$1,U,Bn,Ze,Rn,Jt,d$1,at,N,D,Fe$1,m$2,m$3],styles:["[_nghost-%COMP%]{display:block;padding:2rem;max-width:50rem;margin:0 auto}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:1rem;color:var(--color-on-surface-variant)}h2[_ngcontent-%COMP%]{margin-bottom:2rem}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-bottom:2rem}.list-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-bottom:.5rem;justify-content:flex-end}.clear-search[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%]{padding:1rem;cursor:pointer;display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card.unmatched[_ngcontent-%COMP%]{opacity:.4}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;flex-grow:1}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .provider[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-left:1.75rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.options[_ngcontent-%COMP%]{margin-bottom:2rem;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:2rem}.actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}"]})};export{K as default};
1
+ import {d}from'./chunk-CgrVW_eL.js';import'./chunk-BG8y51P2.js';import'./chunk-hTxREuXu.js';import'./chunk-OpdQrdKp.js';import'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import {J as J$1}from'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import {I as Ie,L as Le$1}from'./chunk-5q0UK__c.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import {D}from'./chunk-DF2Ac802.js';import {T,ab as J,e as ee,ai as fe,a5 as m,G as Ge$1,N as Nt,aj as m$1,ak as l,ad as sy,C as Zu,g as gw,v,a as N,aJ as m$2,b3 as m$3,Z as Zi,o as oC,W as Wl,l as lT,w as Hg,d as Ig,F as Fg,j as jg,b as bE,c as uT,z as vg,i as ET,a1 as pT,n as lm,P as Pd,h as aC,p as qC,L as Ld,a2 as hT,y as cm,t as bD,H as HC,M as MD,K as Kg,aa as Yl,as as Yp,aO as sb,av as Vg,aT as cb,aw as iC,aP as lb}from'./main-X6MUEPX4.js';import {f}from'./chunk-8A93BNds.js';import {d as d$1}from'./chunk-C8Zr0vl3.js';import {F as Fe$1}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import {a as at}from'./chunk-BxBZMjtQ.js';import {U}from'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var Fe=(n,t)=>t.BackupId;function Pe(n,t){n&1&&(Zi(0,"div",14),Ig(1,"sh-progress-bar",20),Zi(2,"p"),oC(3,3),Wl()());}function Me(n,t){n&1&&(Zi(0,"div",15)(1,"p"),oC(2,4),Wl()());}function he(n,t){if(n&1){let e=ET();Zi(0,"sh-icon",33),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.searchTerm.set(""))}),HC(1,"x-circle"),Wl();}}function Le(n,t){if(n&1){let e=ET();Zi(0,"div",27)(1,"sh-form-field")(2,"input",28),lm("ngModelChange",function(o){Pd(e);let c=aC(2);return qC(c.searchTerm,o)||(c.searchTerm=o),Ld(o)}),Wl(),bD(),Zi(3,"sh-icon",29),HC(4,"magnifying-glass"),Wl(),lT(5,he,2,0,"sh-icon",30),Wl()(),Zi(6,"div",31)(7,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectAll())}),oC(8,6),Wl(),Zi(9,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectNone())}),oC(10,7),Wl()();}if(n&2){let e=aC(2);bE(2),cm("ngModel",e.searchTerm),MD(),bE(3),uT(e.searchTerm()?5:-1),bE(2),vg("disabled",e.allSelected()),bE(2),vg("disabled",e.noneSelected());}}function ye(n,t){if(n&1&&(Zi(0,"div"),oC(1,8),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.SourceFilesSize)),iC(1);}}function Ae(n,t){if(n&1&&(Zi(0,"div"),oC(1,9),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.TargetFilesSize)),iC(1);}}function Re(n,t){if(n&1&&(Zi(0,"div"),oC(1,10),sb(2,"relativeTime"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(lb(2,1,e.Metadata?.LastBackupFinished,false)),iC(1);}}function Ge(n,t){if(n&1){let e=ET();Zi(0,"sh-card",34),Hg("click",function(){let o=Pd(e).$implicit,c=aC(2);return Ld(c.toggleSelected(o.BackupId))}),Zi(1,"sh-checkbox",35),lm("checkedChange",function(o){let c=Pd(e).$implicit;return qC(c.Selected,o)||(c.Selected=o),Ld(o)}),Zi(2,"h3"),HC(3),Zi(4,"sh-chip",36),Ig(5,"img",37),HC(6),Wl()()(),Zi(7,"div",38),lT(8,ye,3,3,"div"),lT(9,Ae,3,3,"div"),lT(10,Re,3,4,"div"),Wl()();}if(n&2){let e=t.$implicit,i=aC(2);Kg("unmatched",e.Match===false),bE(),cm("checked",e.Selected),bE(2),Yl(" ",e.Name," "),bE(2),vg("src",i.getBackendIcon(e.TargetURLDisplay),Yp),bE(),Yl(" ",i.getBackendType(e.TargetURLDisplay)," "),bE(2),uT(e.Metadata?.SourceFilesSize?8:-1),bE(),uT(e.Metadata?.TargetFilesSize?9:-1),bE(),uT(e.Metadata?.LastBackupFinished?10:-1);}}function De(n,t){if(n&1){let e=ET();Zi(0,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC(2);return qC(c.saveNow,o)||(c.saveNow=o),Ld(o)}),Fg(1,11),Ig(2,"sh-icon",39),jg(),Wl();}if(n&2){let e=aC(2);vg("color","primary"),cm("checked",e.saveNow),bE(2),vg("shTooltip","Save backups without editing the configuration");}}function ke(n,t){n&1&&(Zi(0,"sh-toggle",25),Fg(1,12),Ig(2,"sh-icon",39),jg(),Wl()),n&2&&(vg("color","primary")("checked",true)("disabled",true),bE(2),vg("shTooltip","Save now can only be disabled when importing a single backup"));}function $e(n,t){if(n&1){let e=ET();lT(0,Le,11,4),Zi(1,"div",21),pT(2,Ge,11,9,"sh-card",22,Fe),Wl(),Zi(4,"div",23),lT(5,De,3,3,"sh-toggle",24)(6,ke,3,4,"sh-toggle",25),Zi(7,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC();return qC(c.importMetadata,o)||(c.importMetadata=o),Ld(o)}),oC(8,5),Wl()();}if(n&2){let e=aC();uT(e.configs().length>1?0:-1),bE(2),hT(e.configsSorted()),bE(3),uT(e.selectedItems().length<=1?5:6),bE(2),vg("color","primary"),cm("checked",e.importMetadata);}}function be(n,t){n&1&&oC(0,2,1);}function xe(n,t){n&1&&oC(0,2,2);}var K=class n{#t=T(d);#n=T(J);#e=T(ee);#i=T(fe);#o=T(m);getBackendType=Ie;getBackendIcon=Le$1;isLoading=Ge$1(true);isImporting=Ge$1(false);configs=Ge$1([]);saveNow=Ge$1(false);importMetadata=Ge$1(false);searchTerm=Ge$1("");allSelected=Nt(()=>this.selectedItems().length===this.configs().length);noneSelected=Nt(()=>this.selectedItems().length===0);configsSorted=Nt(()=>{let t=this.searchTerm().toLowerCase();return this.configs().map(e=>m$1(l({},e),{Match:t?e.Name?.toLowerCase().includes(t):null})).sort((e,i)=>(e.Name??"").localeCompare(i.Name??"")).sort((e,i)=>e.Match===i.Match?0:e.Match?-1:1)});ngOnInit(){let t=this.#t.temporaryBackupId();if(!t){this.#e.navigate(["/backup/import-destination/destination"]);return}sy(()=>this.#n.postApiV1BackupByIdRestoreTaskConfig({path:{id:t}})).pipe(Zu(()=>this.isLoading.set(false))).subscribe({next:e=>{let i=e.sort((o,c)=>(o.Name??"").localeCompare(c.Name??"")).map(o=>m$1(l({},o),{Selected:e.length===1}));this.configs.set(i);},error:e=>{this.#t.showErrorDialog(e.message||"Failed to fetch configurations");}});}toggleSelected(t){this.configs.update(e=>e.map(i=>i.BackupId===t?m$1(l({},i),{Selected:!i.Selected}):i));}selectAll(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:true})));}selectNone(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:false})));}selectedItems=Nt(()=>this.configs().filter(t=>t.Selected));import(){let t=this.selectedItems();if(t.length===0)return;let e=this.importMetadata(),i=this.saveNow()||t.length!==1;this.isImporting.set(true);let o=c=>{if(c>=t.length){this.isImporting.set(false),this.#i.success($localize`Successfully imported ${t.length} backup(s)`),this.#e.navigate(["/"]);return}let N=t[c];sy(()=>this.#n.postApiV1BackupByIdImportfromtemp({body:{BackupId:N.BackupId,ImportMetadata:e,Direct:i}})).subscribe({next:u=>{if(i)this.configs.update(I=>I.filter(G=>G.BackupId!==N.BackupId)),o(c+1);else {this.isImporting.set(false);let I=this.#o.addDraftBackup(u.data);this.#e.navigate(["/backup-draft",I]);}},error:u=>{this.isImporting.set(false),this.#t.showErrorDialog(`Failed to import ${N.Name}: ${u.message}`);}});};o(0);}back(){this.#e.navigate(["/backup/import-destination/encryption"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-import-destination-select-config"]],decls:14,vars:4,consts:()=>{let t;t=$localize`Select configurations to import`;let e;e=$localize`Back`;let i;i=$localize`${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Importing... ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE: Import selected ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let o;o=$localize`Fetching backup configurations from destination...`;let c;c=$localize`No backup configurations found at this destination.`;let N;N=$localize`Import metadata`;let u;u=$localize`Search for destination...`;let I;I=$localize`Select all`;let G;G=$localize`Select none`;let U;U=$localize` Source size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let J;J=$localize` Target size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let X;X=$localize` Last backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let V;return V=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,i,o,c,N,I,G,U,J,X,z,V,[1,"content-wrapper"],[1,"loading-state"],[1,"empty-state"],[1,"actions"],["shButton","",3,"click","disabled"],[1,"spacer"],["shButton","",1,"primary","raised",3,"click","disabled"],[1,"primary","indeterminate"],[1,"config-list"],[1,"type-a","actionable","full-width",3,"unmatched"],[1,"options"],[3,"color","checked"],[3,"color","checked","disabled"],[3,"checkedChange","color","checked"],[1,"search-area"],["type","text","placeholder",u,3,"ngModelChange","ngModel"],["prefix",""],["suffix","",1,"clear-search"],[1,"list-actions"],["shButton","",1,"small",3,"click","disabled"],["suffix","",1,"clear-search",3,"click"],[1,"type-a","actionable","full-width",3,"click"],[1,"primary","raised",3,"checkedChange","checked"],[1,"small","provider"],["alt","",1,"provider-icon",3,"src"],[1,"metadata"],[1,"small",3,"shTooltip"]]},template:function(e,i){e&1&&(Zi(0,"div",13)(1,"h2"),oC(2,0),Wl(),lT(3,Pe,4,0,"div",14)(4,Me,3,0,"div",15)(5,$e,9,4),Zi(6,"div",16)(7,"button",17),Hg("click",function(){return i.back()}),oC(8,1),Wl(),Ig(9,"div",18),Zi(10,"button",19),Hg("click",function(){return i.import()}),Fg(11,2),lT(12,be,1,0)(13,xe,1,0),jg(),Wl()()()),e&2&&(bE(3),uT(i.isLoading()?3:i.configs().length===0?4:5),bE(4),vg("disabled",i.isImporting()),bE(3),vg("disabled",i.isImporting()||i.selectedItems().length===0||i.isLoading()),bE(2),uT(i.isImporting()?12:13));},dependencies:[v,f,J$1,U,Bn,Ze,Rn,Jt,d$1,at,N,D,Fe$1,m$2,m$3],styles:["[_nghost-%COMP%]{display:block;padding:2rem;max-width:50rem;margin:0 auto}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:1rem;color:var(--color-on-surface-variant)}h2[_ngcontent-%COMP%]{margin-bottom:2rem}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-bottom:2rem}.list-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-bottom:.5rem;justify-content:flex-end}.clear-search[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%]{padding:1rem;cursor:pointer;display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card.unmatched[_ngcontent-%COMP%]{opacity:.4}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;flex-grow:1}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .provider[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-left:1.75rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.options[_ngcontent-%COMP%]{margin-bottom:2rem;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:2rem}.actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}"]})};export{K as default};
@@ -1 +1 @@
1
- import {m}from'./chunk-7T5O8Syb.js';import {l as le}from'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import'./chunk-fDWfSg6Y.js';import {N as Nt$1}from'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,ab as J,f,e as ee,ax as W,G as Ge$1,N as Nt,Q as Qa,ad as sy,C as Zu,g as gw,v as v$1,a as N,_ as _t,aL as ci,aJ as m$1,l as lT,Z as Zi,F as Fg,d as Ig,j as jg,W as Wl,w as Hg,c as uT,b as bE,z as vg,a3 as XC,o as oC,i as ET,P as Pd,h as aC,L as Ld,t as bD,b4 as cg,M as MD,n as lm,p as qC,y as cm,H as HC,av as Vg,aw as iC,aO as sb,aD as sm,aP as lb,aa as Yl,aT as cb,J as im}from'./main-2ZYVV4C4.js';import {d}from'./chunk-BGuvkLC9.js';import {F as Fe$1}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var me=()=>["/"],v=()=>({standalone:true});function Pe(n,t){n&1&&(Zi(0,"div",11),Ig(1,"sh-progress-bar",16),Zi(2,"p"),oC(3,2),Wl()());}function he(n,t){n&1&&(Zi(0,"div",12)(1,"p"),oC(2,3),Wl()());}function Le(n,t){if(n&1&&(HC(0),sb(1,"bytes")),n&2){let e=aC().$implicit;Yl(" (",cb(1,1,e.FileSizes),") ");}}function Fe(n,t){if(n&1&&(Ig(0,"br"),Zi(1,"span",23),HC(2),Wl()),n&2){let e=aC().$implicit;bE(2),im(e.Label);}}function fe(n,t){if(n&1&&(Zi(0,"div",22),HC(1),sb(2,"date"),lT(3,Le,2,3),lT(4,Fe,3,1),Wl()),n&2){let e=t.$implicit;bE(),sm(" ",e.Version,": ",lb(2,4,e.Time,"medium")," "),bE(2),uT(e.FileSizes?3:-1),bE(),uT(e.Label?4:-1);}}function Ie(n,t){n&1&&Ig(0,"sh-progress-bar",21);}function Ne(n,t){n&1&&(Zi(0,"sh-icon",31),HC(1,"spinner"),Wl());}function Me(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"magnifying-glass"),Wl());}function Re(n,t){if(n&1){let e=ET();Zi(0,"button",34),Hg("click",function(){Pd(e);let i=aC(4);return Ld(i.clearSearch())}),Zi(1,"sh-icon"),HC(2,"x-circle"),Wl(),Zi(3,"span"),oC(4,8),Wl()();}}function ye(n,t){n&1&&(Zi(0,"span"),oC(1,9),Wl());}function Oe(n,t){if(n&1&&(Zi(0,"span"),oC(1,10),Wl()),n&2){let e=aC(5);bE(),Vg(e.searchResults().length),iC(1);}}function Ae(n,t){if(n&1&&(Zi(0,"div",33),lT(1,ye,2,0,"span")(2,Oe,2,1,"span"),Wl()),n&2){let e=aC(4);bE(),uT(e.searchResults().length===0?1:2);}}function Ge(n,t){if(n&1){let e=ET();Zi(0,"div",27)(1,"sh-form-field")(2,"label",28),oC(3,6),Wl(),Zi(4,"input",29),lm("ngModelChange",function(i){Pd(e);let l=aC(3);return qC(l.searchQuery,i)||(l.searchQuery=i),Ld(i)}),Hg("keydown.enter",function(i){Pd(e);let l=aC(3);return i.preventDefault(),Ld(l.performSearch())}),Wl(),bD(),Wl(),Zi(5,"button",30),Hg("click",function(){Pd(e);let i=aC(3);return Ld(i.performSearch())}),lT(6,Ne,2,0,"sh-icon",31)(7,Me,2,0,"sh-icon"),Zi(8,"span"),oC(9,7),Wl()(),lT(10,Re,5,0,"button",32),Wl(),lT(11,Ae,3,1,"div",33);}if(n&2){let e=aC(3);bE(4),cm("ngModel",e.searchQuery),vg("ngModelOptions",XC(6,v)),MD(),bE(),vg("disabled",e.isSearching()||!e.searchQuery().trim()),bE(),uT(e.isSearching()?6:7),bE(4),uT(e.isSearchMode()?10:-1),bE(),uT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function be(n,t){if(n&1){let e=ET();lT(0,Ge,12,7),Zi(1,"app-file-tree",24)(2,"label",25),oC(3,5),Wl(),Zi(4,"input",26),lm("ngModelChange",function(i){Pd(e);let l=aC(2);return qC(l.selectedPaths,i)||(l.selectedPaths=i),Ld(i)}),Wl(),bD(),Wl();}if(n&2){let e=aC(2);uT(e.canSearch()?0:-1),bE(),vg("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),bE(3),cm("ngModel",e.selectedPaths),vg("ngModelOptions",XC(9,v)),MD();}}function xe(n,t){if(n&1){let e=ET();Zi(0,"div",17)(1,"sh-select",18)(2,"label",19),oC(3,4),Wl(),Zi(4,"input",20),Hg("ngModelChange",function(i){Pd(e);let l=aC();return Ld(l.onVersionChange(i))}),Wl(),bD(),cg(5,fe,5,7,"ng-template"),Wl()(),lT(6,Ie,1,0,"sh-progress-bar",21),lT(7,be,5,10);}if(n&2){let e=aC();bE(),vg("options",e.versions())("isClearable",false),bE(3),vg("ngModel",e.selectedVersion())("ngModelOptions",XC(6,v)),MD(),bE(2),uT(e.loadingRootPath()?6:-1),bE(),uT(e.showFileTree()?7:-1);}}var $=class n{#n=T(J);#t=T(f);#e=T(m);#i=T(ee);#o=T(W);versions=this.#e.versions;isLoadingVersions=this.#e.isLoadingVersions;selectedVersion=this.#e.selectedVersion;selectedPaths=this.#e.selectedPaths;selectedPathsArray=this.#e.selectedPathsArray;backupSettings=Ge$1(null);rootPaths=Ge$1([]);showFileTree=Ge$1(false);loadingRootPath=Ge$1(false);canSearch=Nt(()=>this.#t.hasV2ListOperations());searchQuery=Ge$1("");isSearching=Ge$1(false);searchResults=Ge$1([]);hasSearched=Ge$1(false);isSearchMode=Nt(()=>this.searchQuery().length>0&&this.hasSearched());versionEffect=Qa(()=>{let t=this.selectedVersion();if(t===null)return;let e=this.versions().find(i=>i.Version===parseInt(t));if(!e?.Time)return;let a=this.#e.backupId();a&&this.loadVersion({id:a,time:e.Time});});onVersionChange(t){this.selectedPaths.set(""),this.clearSearch(),this.selectedVersion.set(t);}loadVersion(t){this.loadingRootPath.set(true),this.showFileTree.set(false),this.backupSettings.set(t),sy(()=>this.#n.postApiV2BackupListFolder({body:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}})).pipe(Zu(()=>{this.loadingRootPath.set(false),this.showFileTree.set(true);})).subscribe({next:e=>{let a=(e.Data??[]).map(i=>i.Path??"");this.rootPaths.set(a.length>0?a:["/"]);}});}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings();if(!t||!e)return;let a=parseInt(this.selectedVersion()??"");Number.isNaN(a)||(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),sy(()=>this.#n.postApiV2BackupSearch({body:{BackupId:e.id,Time:null,Version:[a],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:false,SearchMetadata:false}})).pipe(Zu(()=>this.isSearching.set(false))).subscribe({next:i=>{this.searchResults.set(i.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}next(){this.selectedPathsArray().length!==0&&this.#i.navigate(["../version-scope"],{relativeTo:this.#o});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-purge-select-files"]],decls:10,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize`Fetching versions from destination...`;let i;i=$localize`No versions found for this backup.`;let l;l=$localize`Select a version...`;let U;U=$localize`Version`;let B;B=$localize`Path`;let D;D=$localize`Enter search term...`;let w;w=$localize`Search files`;let V;V=$localize`Search`;let k;k=$localize`Clear`;let J;J=$localize`0 results found`;let K;return K=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[t,e,a,i,U,B,w,V,k,J,K,[1,"loading-state"],[1,"empty-state"],[1,"form-actions"],["shButton","","type","button",3,"routerLink"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[1,"primary","indeterminate"],[1,"version-picker"],["value","Version",3,"options","isClearable"],["for","version"],["type","text","id","version","placeholder",l,3,"ngModelChange","ngModel","ngModelOptions"],[1,"indeterminate","primary"],[1,"custom-option"],[1,"label"],[1,"fill",3,"rootPaths","backupSettings","multiSelect","showFiles","searchMode","searchResults"],["for","path"],["type","text","id","path",3,"ngModelChange","ngModel","ngModelOptions"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",D,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,a){e&1&&(lT(0,Pe,4,0,"div",11)(1,he,3,0,"div",12)(2,xe,8,7),Zi(3,"div",13)(4,"button",14),Fg(5,0),Ig(6,"sh-icon"),jg(),Wl(),Zi(7,"button",15),Hg("click",function(){return a.next()}),Fg(8,1),Ig(9,"sh-icon"),jg(),Wl()()),e&2&&(uT(a.isLoadingVersions()?0:a.versions().length===0?1:2),bE(4),vg("routerLink",XC(3,me)),bE(3),vg("disabled",a.selectedPathsArray().length===0));},dependencies:[Bn,Ze,Rn,Jt,le,v$1,Fe$1,N,d,Nt$1,_t,ci,m$1],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1 0;min-height:25rem;overflow:hidden;gap:1rem;padding-top:2rem;padding-bottom:1.5rem}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.version-picker[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--base-9)}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};export{$ as default};
1
+ import {m}from'./chunk-BM5sEnUl.js';import {l as le}from'./chunk-Bz49u_nH.js';import'./chunk-1DRz_1dv.js';import'./chunk-BmOgPfpY.js';import'./chunk-Mj9aFt3b.js';import'./chunk-5q0UK__c.js';import {N as Nt$1}from'./chunk-B5S2d_Pm.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ab as J,f,e as ee,ax as W,G as Ge$1,N as Nt,Q as Qa,ad as sy,C as Zu,g as gw,v as v$1,a as N,_ as _t,aL as ci,aJ as m$1,l as lT,Z as Zi,F as Fg,d as Ig,j as jg,W as Wl,w as Hg,c as uT,b as bE,z as vg,a3 as XC,o as oC,i as ET,P as Pd,h as aC,L as Ld,t as bD,b4 as cg,M as MD,n as lm,p as qC,y as cm,H as HC,av as Vg,aw as iC,aO as sb,aD as sm,aP as lb,aa as Yl,aT as cb,J as im}from'./main-X6MUEPX4.js';import {d}from'./chunk-C8Zr0vl3.js';import {F as Fe$1}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var me=()=>["/"],v=()=>({standalone:true});function Pe(n,t){n&1&&(Zi(0,"div",11),Ig(1,"sh-progress-bar",16),Zi(2,"p"),oC(3,2),Wl()());}function he(n,t){n&1&&(Zi(0,"div",12)(1,"p"),oC(2,3),Wl()());}function Le(n,t){if(n&1&&(HC(0),sb(1,"bytes")),n&2){let e=aC().$implicit;Yl(" (",cb(1,1,e.FileSizes),") ");}}function Fe(n,t){if(n&1&&(Ig(0,"br"),Zi(1,"span",23),HC(2),Wl()),n&2){let e=aC().$implicit;bE(2),im(e.Label);}}function fe(n,t){if(n&1&&(Zi(0,"div",22),HC(1),sb(2,"date"),lT(3,Le,2,3),lT(4,Fe,3,1),Wl()),n&2){let e=t.$implicit;bE(),sm(" ",e.Version,": ",lb(2,4,e.Time,"medium")," "),bE(2),uT(e.FileSizes?3:-1),bE(),uT(e.Label?4:-1);}}function Ie(n,t){n&1&&Ig(0,"sh-progress-bar",21);}function Ne(n,t){n&1&&(Zi(0,"sh-icon",31),HC(1,"spinner"),Wl());}function Me(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"magnifying-glass"),Wl());}function Re(n,t){if(n&1){let e=ET();Zi(0,"button",34),Hg("click",function(){Pd(e);let i=aC(4);return Ld(i.clearSearch())}),Zi(1,"sh-icon"),HC(2,"x-circle"),Wl(),Zi(3,"span"),oC(4,8),Wl()();}}function ye(n,t){n&1&&(Zi(0,"span"),oC(1,9),Wl());}function Oe(n,t){if(n&1&&(Zi(0,"span"),oC(1,10),Wl()),n&2){let e=aC(5);bE(),Vg(e.searchResults().length),iC(1);}}function Ae(n,t){if(n&1&&(Zi(0,"div",33),lT(1,ye,2,0,"span")(2,Oe,2,1,"span"),Wl()),n&2){let e=aC(4);bE(),uT(e.searchResults().length===0?1:2);}}function Ge(n,t){if(n&1){let e=ET();Zi(0,"div",27)(1,"sh-form-field")(2,"label",28),oC(3,6),Wl(),Zi(4,"input",29),lm("ngModelChange",function(i){Pd(e);let l=aC(3);return qC(l.searchQuery,i)||(l.searchQuery=i),Ld(i)}),Hg("keydown.enter",function(i){Pd(e);let l=aC(3);return i.preventDefault(),Ld(l.performSearch())}),Wl(),bD(),Wl(),Zi(5,"button",30),Hg("click",function(){Pd(e);let i=aC(3);return Ld(i.performSearch())}),lT(6,Ne,2,0,"sh-icon",31)(7,Me,2,0,"sh-icon"),Zi(8,"span"),oC(9,7),Wl()(),lT(10,Re,5,0,"button",32),Wl(),lT(11,Ae,3,1,"div",33);}if(n&2){let e=aC(3);bE(4),cm("ngModel",e.searchQuery),vg("ngModelOptions",XC(6,v)),MD(),bE(),vg("disabled",e.isSearching()||!e.searchQuery().trim()),bE(),uT(e.isSearching()?6:7),bE(4),uT(e.isSearchMode()?10:-1),bE(),uT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function be(n,t){if(n&1){let e=ET();lT(0,Ge,12,7),Zi(1,"app-file-tree",24)(2,"label",25),oC(3,5),Wl(),Zi(4,"input",26),lm("ngModelChange",function(i){Pd(e);let l=aC(2);return qC(l.selectedPaths,i)||(l.selectedPaths=i),Ld(i)}),Wl(),bD(),Wl();}if(n&2){let e=aC(2);uT(e.canSearch()?0:-1),bE(),vg("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),bE(3),cm("ngModel",e.selectedPaths),vg("ngModelOptions",XC(9,v)),MD();}}function xe(n,t){if(n&1){let e=ET();Zi(0,"div",17)(1,"sh-select",18)(2,"label",19),oC(3,4),Wl(),Zi(4,"input",20),Hg("ngModelChange",function(i){Pd(e);let l=aC();return Ld(l.onVersionChange(i))}),Wl(),bD(),cg(5,fe,5,7,"ng-template"),Wl()(),lT(6,Ie,1,0,"sh-progress-bar",21),lT(7,be,5,10);}if(n&2){let e=aC();bE(),vg("options",e.versions())("isClearable",false),bE(3),vg("ngModel",e.selectedVersion())("ngModelOptions",XC(6,v)),MD(),bE(2),uT(e.loadingRootPath()?6:-1),bE(),uT(e.showFileTree()?7:-1);}}var $=class n{#n=T(J);#t=T(f);#e=T(m);#i=T(ee);#o=T(W);versions=this.#e.versions;isLoadingVersions=this.#e.isLoadingVersions;selectedVersion=this.#e.selectedVersion;selectedPaths=this.#e.selectedPaths;selectedPathsArray=this.#e.selectedPathsArray;backupSettings=Ge$1(null);rootPaths=Ge$1([]);showFileTree=Ge$1(false);loadingRootPath=Ge$1(false);canSearch=Nt(()=>this.#t.hasV2ListOperations());searchQuery=Ge$1("");isSearching=Ge$1(false);searchResults=Ge$1([]);hasSearched=Ge$1(false);isSearchMode=Nt(()=>this.searchQuery().length>0&&this.hasSearched());versionEffect=Qa(()=>{let t=this.selectedVersion();if(t===null)return;let e=this.versions().find(i=>i.Version===parseInt(t));if(!e?.Time)return;let a=this.#e.backupId();a&&this.loadVersion({id:a,time:e.Time});});onVersionChange(t){this.selectedPaths.set(""),this.clearSearch(),this.selectedVersion.set(t);}loadVersion(t){this.loadingRootPath.set(true),this.showFileTree.set(false),this.backupSettings.set(t),sy(()=>this.#n.postApiV2BackupListFolder({body:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}})).pipe(Zu(()=>{this.loadingRootPath.set(false),this.showFileTree.set(true);})).subscribe({next:e=>{let a=(e.Data??[]).map(i=>i.Path??"");this.rootPaths.set(a.length>0?a:["/"]);}});}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings();if(!t||!e)return;let a=parseInt(this.selectedVersion()??"");Number.isNaN(a)||(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),sy(()=>this.#n.postApiV2BackupSearch({body:{BackupId:e.id,Time:null,Version:[a],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:false,SearchMetadata:false}})).pipe(Zu(()=>this.isSearching.set(false))).subscribe({next:i=>{this.searchResults.set(i.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}next(){this.selectedPathsArray().length!==0&&this.#i.navigate(["../version-scope"],{relativeTo:this.#o});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-purge-select-files"]],decls:10,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize`Fetching versions from destination...`;let i;i=$localize`No versions found for this backup.`;let l;l=$localize`Select a version...`;let U;U=$localize`Version`;let B;B=$localize`Path`;let D;D=$localize`Enter search term...`;let w;w=$localize`Search files`;let V;V=$localize`Search`;let k;k=$localize`Clear`;let J;J=$localize`0 results found`;let K;return K=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[t,e,a,i,U,B,w,V,k,J,K,[1,"loading-state"],[1,"empty-state"],[1,"form-actions"],["shButton","","type","button",3,"routerLink"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[1,"primary","indeterminate"],[1,"version-picker"],["value","Version",3,"options","isClearable"],["for","version"],["type","text","id","version","placeholder",l,3,"ngModelChange","ngModel","ngModelOptions"],[1,"indeterminate","primary"],[1,"custom-option"],[1,"label"],[1,"fill",3,"rootPaths","backupSettings","multiSelect","showFiles","searchMode","searchResults"],["for","path"],["type","text","id","path",3,"ngModelChange","ngModel","ngModelOptions"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",D,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,a){e&1&&(lT(0,Pe,4,0,"div",11)(1,he,3,0,"div",12)(2,xe,8,7),Zi(3,"div",13)(4,"button",14),Fg(5,0),Ig(6,"sh-icon"),jg(),Wl(),Zi(7,"button",15),Hg("click",function(){return a.next()}),Fg(8,1),Ig(9,"sh-icon"),jg(),Wl()()),e&2&&(uT(a.isLoadingVersions()?0:a.versions().length===0?1:2),bE(4),vg("routerLink",XC(3,me)),bE(3),vg("disabled",a.selectedPathsArray().length===0));},dependencies:[Bn,Ze,Rn,Jt,le,v$1,Fe$1,N,d,Nt$1,_t,ci,m$1],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1 0;min-height:25rem;overflow:hidden;gap:1rem;padding-top:2rem;padding-bottom:1.5rem}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.version-picker[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--base-9)}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};export{$ as default};
@@ -1 +1 @@
1
- import {O}from'./chunk-iU19kwHx.js';import {B as Bn}from'./chunk-iGzJokt-.js';import {T,ab as J,G as Ge,ac as I1,ad as sy,C as Zu,g as gw,u as ue,v,Z as Zi,o as oC,W as Wl,a1 as pT,n as lm,p as qC,w as Hg,b as bE,a2 as hT,y as cm,K as Kg,aq as dT,i as ET,P as Pd,h as aC,L as Ld,H as HC,z as vg,aa as Yl}from'./main-2ZYVV4C4.js';import {U}from'./chunk-CnZx831x.js';function B(l,t){if(l&1){let e=ET();Zi(0,"sh-radio",10),Hg("checkedChange",function(){let a=Pd(e).$implicit,i=aC();return Ld(i.pauseOption.set(a.value))}),HC(1),Wl();}if(l&2){let e=t.$implicit,n=aC();vg("checked",n.pauseOption()===e.value),bE(),Yl(" ",e.label," ");}}var x=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],z=class l{#e=T(J);pauseOptions=Ge(x);closed=I1();isSubmitting=Ge(false);pauseTransfers=Ge(false);pauseOption=Ge(void 0);submit(){this.isSubmitting.set(true);let t=this.pauseTransfers()||null,e=this.pauseOption();sy(()=>this.#e.postApiV1ServerstatePause({query:{duration:e,pauseTransfers:t}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:n=>{this.closed.emit();}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=gw({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(Zi(0,"header",5)(1,"h3"),oC(2,0),Wl()(),Zi(3,"div",6)(4,"div",7),pT(5,B,2,2,"sh-radio",8,dT),Wl(),Zi(7,"div",9)(8,"sh-checkbox",10),lm("checkedChange",function(i){return qC(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),oC(9,1),Wl(),Zi(10,"sh-alert",11),oC(11,2),Wl()()(),Zi(12,"footer",12)(13,"button",13),Hg("click",function(){return n.closed.emit()}),oC(14,3),Wl(),Zi(15,"button",14),Hg("click",function(){return n.submit()}),oC(16,4),Wl()()),e&2&&(bE(5),hT(n.pauseOptions()),bE(3),cm("checked",n.pauseTransfers),bE(7),Kg("loading",n.isSubmitting()));},dependencies:[Bn,O,U,ue,v],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"]})};export{z};
1
+ import {O}from'./chunk-B20GDhu-.js';import {B as Bn}from'./chunk-Bfg1Kjif.js';import {T,ab as J,G as Ge,ac as I1,ad as sy,C as Zu,g as gw,u as ue,v,Z as Zi,o as oC,W as Wl,a1 as pT,n as lm,p as qC,w as Hg,b as bE,a2 as hT,y as cm,K as Kg,aq as dT,i as ET,P as Pd,h as aC,L as Ld,H as HC,z as vg,aa as Yl}from'./main-X6MUEPX4.js';import {U}from'./chunk-CUo9Jt8-.js';function B(l,t){if(l&1){let e=ET();Zi(0,"sh-radio",10),Hg("checkedChange",function(){let a=Pd(e).$implicit,i=aC();return Ld(i.pauseOption.set(a.value))}),HC(1),Wl();}if(l&2){let e=t.$implicit,n=aC();vg("checked",n.pauseOption()===e.value),bE(),Yl(" ",e.label," ");}}var x=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],z=class l{#e=T(J);pauseOptions=Ge(x);closed=I1();isSubmitting=Ge(false);pauseTransfers=Ge(false);pauseOption=Ge(void 0);submit(){this.isSubmitting.set(true);let t=this.pauseTransfers()||null,e=this.pauseOption();sy(()=>this.#e.postApiV1ServerstatePause({query:{duration:e,pauseTransfers:t}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:n=>{this.closed.emit();}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=gw({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(Zi(0,"header",5)(1,"h3"),oC(2,0),Wl()(),Zi(3,"div",6)(4,"div",7),pT(5,B,2,2,"sh-radio",8,dT),Wl(),Zi(7,"div",9)(8,"sh-checkbox",10),lm("checkedChange",function(i){return qC(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),oC(9,1),Wl(),Zi(10,"sh-alert",11),oC(11,2),Wl()()(),Zi(12,"footer",12)(13,"button",13),Hg("click",function(){return n.closed.emit()}),oC(14,3),Wl(),Zi(15,"button",14),Hg("click",function(){return n.submit()}),oC(16,4),Wl()()),e&2&&(bE(5),hT(n.pauseOptions()),bE(3),cm("checked",n.pauseTransfers),bE(7),Kg("loading",n.isSubmitting()));},dependencies:[Bn,O,U,ue,v],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"]})};export{z};