@duplicati/ngclient 0.0.111 → 0.0.112

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 (68) hide show
  1. package/{chunk-HPGYPP74.js → chunk-2JKJCHMV.js} +1 -1
  2. package/{chunk-SKJ6XSV3.js → chunk-2LP4DYGQ.js} +1 -1
  3. package/chunk-2N2WJIUS.js +1 -0
  4. package/{chunk-MHHVE6AV.js → chunk-3AU26GAL.js} +1 -1
  5. package/{chunk-P5SS3OV3.js → chunk-6JLZLD5D.js} +1 -1
  6. package/{chunk-65OCE2TY.js → chunk-6OAGVTHV.js} +1 -1
  7. package/{chunk-TJS6O6KD.js → chunk-7JUYF3HW.js} +1 -1
  8. package/{chunk-RQSBT3TK.js → chunk-7NFVFBIE.js} +1 -1
  9. package/{chunk-7S5SYCMV.js → chunk-7ROGJAJZ.js} +1 -1
  10. package/{chunk-HLHNKLWF.js → chunk-7RTXH4CB.js} +1 -1
  11. package/{chunk-QKA2VJWD.js → chunk-AX5RFEOL.js} +1 -1
  12. package/chunk-BVTZNGGE.js +1 -0
  13. package/{chunk-4RGZG24K.js → chunk-CD3DB23J.js} +1 -1
  14. package/{chunk-IIB7YCLW.js → chunk-CIGZ6WGG.js} +1 -1
  15. package/chunk-DDIVZTRS.js +1 -0
  16. package/chunk-DMDYUREZ.js +8 -0
  17. package/{chunk-DDM4R5FN.js → chunk-DMZ5CRRQ.js} +1 -1
  18. package/{chunk-T33TACR6.js → chunk-EP7S6KOG.js} +1 -1
  19. package/{chunk-CHRKPWRG.js → chunk-F4EEOSGJ.js} +1 -1
  20. package/{chunk-URU2SLPX.js → chunk-GJROCOAD.js} +1 -1
  21. package/{chunk-BOBAN442.js → chunk-H632X43F.js} +1 -1
  22. package/chunk-IDOYGPGZ.js +1 -0
  23. package/{chunk-YJNKW5ES.js → chunk-IPRTKJDE.js} +1 -1
  24. package/chunk-J7PTPA7J.js +1 -0
  25. package/chunk-JP7GZSDH.js +1 -0
  26. package/{chunk-3M3M4YXP.js → chunk-JPF4Y3PP.js} +1 -1
  27. package/{chunk-4AECHE4W.js → chunk-JSGFZ2GA.js} +1 -1
  28. package/{chunk-QP4QZQOW.js → chunk-KHC3VCF4.js} +1 -1
  29. package/{chunk-2ZVLF3KW.js → chunk-KIUU6RPZ.js} +1 -1
  30. package/{chunk-NP4VUDPK.js → chunk-KXLXF2JD.js} +1 -1
  31. package/{chunk-45RYC5NZ.js → chunk-N5ASXZEE.js} +1 -1
  32. package/{chunk-Z4MV4ZSL.js → chunk-NHQOHNI2.js} +1 -1
  33. package/{chunk-6OKAWH4X.js → chunk-NQNRR7VE.js} +1 -1
  34. package/{chunk-WEQQEKIH.js → chunk-OHQK4UOI.js} +1 -1
  35. package/{chunk-YJSWEW6C.js → chunk-ORDORLQT.js} +1 -1
  36. package/{chunk-GDHVQU56.js → chunk-OTLEEXAA.js} +1 -1
  37. package/chunk-OWDXYX4N.js +1 -0
  38. package/{chunk-2MCIQSK2.js → chunk-PQVEQNEN.js} +1 -1
  39. package/{chunk-XTWVXTYP.js → chunk-Q6GENX6C.js} +1 -1
  40. package/{chunk-XJAEXNPS.js → chunk-RRBU7RBN.js} +1 -1
  41. package/{chunk-WQLN5T4T.js → chunk-RTXTOPSU.js} +1 -1
  42. package/{chunk-KEAH5JAH.js → chunk-SQQMYNOF.js} +1 -1
  43. package/{chunk-25ZZFR2F.js → chunk-T5X5KX6A.js} +1 -1
  44. package/{chunk-LQ5ORNDI.js → chunk-THDYLLMU.js} +1 -1
  45. package/{chunk-PFE36372.js → chunk-TK4BPZWA.js} +1 -1
  46. package/{chunk-PN73DZ2H.js → chunk-TMD3MDHS.js} +1 -1
  47. package/{chunk-ZMDK6XIQ.js → chunk-TSIPKXNX.js} +1 -1
  48. package/{chunk-JIPJYOH5.js → chunk-VINJGSIH.js} +1 -1
  49. package/{chunk-CR4OKZPA.js → chunk-VZBHJ6AU.js} +1 -1
  50. package/chunk-WLIE4IB5.js +1 -0
  51. package/chunk-XL2NKFYE.js +1 -0
  52. package/{chunk-2KUDLHPP.js → chunk-YDR42CNA.js} +1 -1
  53. package/chunk-ZXWA7BUQ.js +1 -0
  54. package/{chunk-UMP4YQXB.js → chunk-ZYGT7OII.js} +1 -1
  55. package/index.html +1 -1
  56. package/{main-S6Q4T2BU.js → main-3OUIM37D.js} +1 -1
  57. package/package.json +1 -1
  58. package/chunk-3KSBRC3X.js +0 -1
  59. package/chunk-AADIFDNE.js +0 -1
  60. package/chunk-D3I33UIQ.js +0 -1
  61. package/chunk-JD54W4UA.js +0 -8
  62. package/chunk-LZUCVLMF.js +0 -1
  63. package/chunk-QJILVQSS.js +0 -1
  64. package/chunk-VLIGMNJX.js +0 -1
  65. package/chunk-W577IVOD.js +0 -1
  66. package/chunk-X4SAPDOB.js +0 -1
  67. package/chunk-X5YRWKCW.js +0 -1
  68. package/chunk-YD7PS7OS.js +0 -1
@@ -1,2 +1,2 @@
1
1
  import{d as ke,h as Ee,p as Ie}from"./chunk-CKPICCFH.js";import{$ as Te,B as ee,C as be,F as ge,N as F,Q as w,S as R,V,X as b,Y as T,Z as Re,aa as ve,f as Z,la as Be,m as fe,n as L,na as Ve,o as H,r as B,x as me,ya as Pe,z as Ae}from"./chunk-W2F756OF.js";import{a as D,b as ye}from"./chunk-7CGTOI24.js";var U=class{},q=class{},g=class s{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
2
- `).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),p=t.slice(r+1).trim();this.addHeaderEntry(o,p)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let p=e.value;if(!p)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(d=>p.indexOf(d)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(p=>p.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var re=class{encodeKey(e){return Oe(e)}encodeValue(e){return Oe(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function We(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let p=o.indexOf("="),[i,d]=p==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,p)),e.decodeValue(o.slice(p+1))],u=t.get(i)||[];u.push(d),t.set(i,u)}),t}var Xe=/%(\d[a-f0-9])/gi,Ye={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Oe(s){return encodeURIComponent(s).replace(Xe,(e,t)=>Ye[t]??e)}function J(s){return`${s}`}var k=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new re,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=We(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(J):[J(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(p=>{t.push({param:r,value:p,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(J(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(J(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var ie=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function Qe(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function De(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function we(s){return typeof Blob<"u"&&s instanceof Blob}function Se(s){return typeof FormData<"u"&&s instanceof FormData}function Ze(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var j="Content-Type",W="Accept",ae="X-Request-URL",Me="text/plain",Le="application/json",Fe=`${Le}, ${Me}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let p;if(Qe(this.method)||o?(this.body=r!==void 0?r:null,p=o):p=r,p&&(this.reportProgress=!!p.reportProgress,this.withCredentials=!!p.withCredentials,p.responseType&&(this.responseType=p.responseType),p.headers&&(this.headers=p.headers),p.context&&(this.context=p.context),p.params&&(this.params=p.params),this.transferCache=p.transferCache),this.headers??=new g,this.context??=new ie,!this.params)this.params=new k,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let d=t.indexOf("?"),u=d===-1?"?":d<t.length-1?"&":"";this.urlWithParams=t+u+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||De(this.body)||we(this.body)||Se(this.body)||Ze(this.body)?this.body:this.body instanceof k?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Se(this.body)?null:we(this.body)?this.body.type||null:De(this.body)?null:typeof this.body=="string"?Me:this.body instanceof k?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Le:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,p=e.transferCache??this.transferCache,i=e.body!==void 0?e.body:this.body,d=e.withCredentials??this.withCredentials,u=e.reportProgress??this.reportProgress,h=e.headers||this.headers,m=e.params||this.params,A=e.context??this.context;return e.setHeaders!==void 0&&(h=Object.keys(e.setHeaders).reduce((I,y)=>I.set(y,e.setHeaders[y]),h)),e.setParams&&(m=Object.keys(e.setParams).reduce((I,y)=>I.set(y,e.setParams[y]),m)),new s(t,r,i,{params:m,headers:h,context:A,reportProgress:u,responseType:o,withCredentials:d,transferCache:p})}},E=function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s}(E||{}),_=class{headers;status;statusText;url;ok;type;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=E.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},z=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=E.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},P=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},je=200,He=204;function te(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,transferCache:s.transferCache}}var K=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let p;if(t instanceof C)p=t;else{let u;o.headers instanceof g?u=o.headers:u=new g(o.headers);let h;o.params&&(o.params instanceof k?h=o.params:h=new k({fromObject:o.params})),p=new C(t,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let i=L(p).pipe(be(u=>this.handler.handle(u)));if(t instanceof C||o.observe==="events")return i;let d=i.pipe(Ae(u=>u instanceof z));switch(o.observe||"body"){case"body":switch(p.responseType){case"arraybuffer":return d.pipe(B(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new w(2806,!1);return u.body}));case"blob":return d.pipe(B(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new w(2807,!1);return u.body}));case"text":return d.pipe(B(u=>{if(u.body!==null&&typeof u.body!="string")throw new w(2808,!1);return u.body}));case"json":default:return d.pipe(B(u=>u.body))}case"response":return d;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new k().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,te(o,r))}post(t,r,o={}){return this.request("POST",t,te(o,r))}put(t,r,o={}){return this.request("PUT",t,te(o,r))}static \u0275fac=function(r){return new(r||s)(b(U))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),et=/^\)\]\}',?\n/;function Ne(s){if(s.url)return s.url;let e=ae.toLocaleLowerCase();return s.headers.get(e)}var Ce=new V(""),se=(()=>{class s{fetchImpl=T(oe,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ve);handle(t){return new Z(r=>{let o=new AbortController;return this.doRequest(t,o.signal,r).then(ne,p=>r.error(new P({error:p}))),()=>o.abort()})}async doRequest(t,r,o){let p=this.createRequestInit(t),i;try{let y=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,D({signal:r},p)));tt(y),o.next({type:E.Sent}),i=await y}catch(y){o.error(new P({error:y,status:y.status??0,statusText:y.statusText,url:t.urlWithParams,headers:y.headers}));return}let d=new g(i.headers),u=i.statusText,h=Ne(i)??t.urlWithParams,m=i.status,A=null;if(t.reportProgress&&o.next(new X({headers:d,status:m,statusText:u,url:h})),i.body){let y=i.headers.get("content-length"),G=[],c=i.body.getReader(),l=0,v,S,f=typeof Zone<"u"&&Zone.current;await this.ngZone.runOutsideAngular(async()=>{for(;;){let{done:O,value:M}=await c.read();if(O)break;if(G.push(M),l+=M.length,t.reportProgress){S=t.responseType==="text"?(S??"")+(v??=new TextDecoder).decode(M,{stream:!0}):void 0;let he=()=>o.next({type:E.DownloadProgress,total:y?+y:void 0,loaded:l,partialText:S});f?f.run(he):he()}}});let x=this.concatChunks(G,l);try{let O=i.headers.get(j)??"";A=this.parseBody(t,x,O)}catch(O){o.error(new P({error:O,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Ne(i)??t.urlWithParams}));return}}m===0&&(m=A?je:0),m>=200&&m<300?(o.next(new z({body:A,headers:d,status:m,statusText:u,url:h})),o.complete()):o.error(new P({error:A,headers:d,status:m,statusText:u,url:h}))}parseBody(t,r,o){switch(t.responseType){case"json":let p=new TextDecoder().decode(r).replace(et,"");return p===""?null:JSON.parse(p);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o=t.withCredentials?"include":void 0;if(t.headers.forEach((p,i)=>r[p]=i.join(",")),t.headers.has(W)||(r[W]=Fe),!t.headers.has(j)){let p=t.detectContentTypeHeader();p!==null&&(r[j]=p)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o}}concatChunks(t,r){let o=new Uint8Array(r),p=0;for(let i of t)o.set(i,p),p+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),oe=class{};function ne(){}function tt(s){s.then(ne,ne)}function st(s,e){return e(s)}function rt(s,e,t){return(r,o)=>ve(t,()=>e(r,p=>s(p,o)))}var pe=new V(""),it=new V(""),ot=new V("",{providedIn:"root",factory:()=>!0});var Ge=(()=>{class s extends U{backend;injector;chain=null;pendingTasks=T(Be);contributeToStability=T(ot);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(pe),...this.injector.get(it,[])]));this.chain=r.reduceRight((o,p)=>rt(o,p,this.injector),st)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ge(()=>this.pendingTasks.remove(r)))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(b(q),b(Te))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})();var nt=/^\)\]\}',?\n/,at=RegExp(`^${ae}:`,"m");function pt(s){return"responseURL"in s&&s.responseURL?s.responseURL:at.test(s.getAllResponseHeaders())?s.getResponseHeader(ae):null}var xe=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?fe(r.\u0275loadImpl()):L(null)).pipe(F(()=>new Z(p=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(W)||i.setRequestHeader(W,Fe),!t.headers.has(j)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(j,c)}if(t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let d=t.serializeBody(),u=null,h=()=>{if(u!==null)return u;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),v=pt(i)||t.url;return u=new X({headers:l,status:i.status,statusText:c,url:v}),u},m=()=>{let{headers:c,status:l,statusText:v,url:S}=h(),f=null;l!==He&&(f=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=f?je:0);let x=l>=200&&l<300;if(t.responseType==="json"&&typeof f=="string"){let O=f;f=f.replace(nt,"");try{f=f!==""?JSON.parse(f):null}catch(M){f=O,x&&(x=!1,f={error:M,text:f})}}x?(p.next(new z({body:f,headers:c,status:l,statusText:v,url:S||void 0})),p.complete()):p.error(new P({error:f,headers:c,status:l,statusText:v,url:S||void 0}))},A=c=>{let{url:l}=h(),v=new P({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});p.error(v)},I=!1,y=c=>{I||(p.next(h()),I=!0);let l={type:E.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),p.next(l)},G=c=>{let l={type:E.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),p.next(l)};return i.addEventListener("load",m),i.addEventListener("error",A),i.addEventListener("timeout",A),i.addEventListener("abort",A),t.reportProgress&&(i.addEventListener("progress",y),d!==null&&i.upload&&i.upload.addEventListener("progress",G)),i.send(d),p.next({type:E.Sent}),()=>{i.removeEventListener("error",A),i.removeEventListener("abort",A),i.removeEventListener("load",m),i.removeEventListener("timeout",A),t.reportProgress&&(i.removeEventListener("progress",y),d!==null&&i.upload&&i.upload.removeEventListener("progress",G)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(b(Ie))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),Ue=new V(""),ut="XSRF-TOKEN",dt=new V("",{providedIn:"root",factory:()=>ut}),ct="X-XSRF-TOKEN",lt=new V("",{providedIn:"root",factory:()=>ct}),Y=class{},ht=(()=>{class s{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r,o){this.doc=t,this.platform=r,this.cookieName=o}getToken(){if(this.platform==="server")return null;let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Ee(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(b(ke),b(Pe),b(dt))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})();function yt(s,e){let t=s.url.toLowerCase();if(!T(Ue)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(Y).getToken(),o=T(lt);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var ue=function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s}(ue||{});function qe(s,e){return{\u0275kind:s,\u0275providers:e}}function es(...s){let e=[K,xe,Ge,{provide:U,useExisting:Ge},{provide:q,useFactory:()=>T(Ce,{optional:!0})??T(xe)},{provide:pe,useValue:yt,multi:!0},{provide:Ue,useValue:!0},{provide:Y,useClass:ht}];for(let t of s)e.push(...t.\u0275providers);return Re(e)}function ts(s){return qe(ue.Interceptors,s.map(e=>({provide:pe,useValue:e,multi:!0})))}function ss(){return qe(ue.Fetch,[se,{provide:Ce,useExisting:se},{provide:q,useExisting:se}])}var de=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},n={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new de}};var N=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var $=s=>typeof s=="string",ce=s=>$(s)&&s!=="",le=s=>s instanceof Blob,_e=s=>s instanceof FormData,mt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},At=s=>{let e=[],t=(o,p)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(p))}`)},r=(o,p)=>{p!=null&&(p instanceof Date?t(o,p.toISOString()):Array.isArray(p)?p.forEach(i=>r(o,i)):typeof p=="object"?Object.entries(p).forEach(([i,d])=>r(`${o}[${i}]`,d)):t(o,p))};return Object.entries(s).forEach(([o,p])=>r(o,p)),e.length?`?${e.join("&")}`:""},bt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(p,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):p),o=s.BASE+r;return e.query?o+At(e.query):o},gt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{$(o)||le(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(p=>t(r,p)):t(r,o)}),e}},Q=async(s,e)=>typeof e=="function"?e(s):e,Rt=(s,e)=>me({token:Q(e,s.TOKEN),username:Q(e,s.USERNAME),password:Q(e,s.PASSWORD),additionalHeaders:Q(e,s.HEADERS)}).pipe(B(({token:t,username:r,password:o,additionalHeaders:p})=>{let i=Object.entries(D(D({Accept:"application/json"},p),e.headers)).filter(([,d])=>d!=null).reduce((d,[u,h])=>ye(D({},d),{[u]:String(h)}),{});if(ce(t)&&(i.Authorization=`Bearer ${t}`),ce(r)&&ce(o)){let d=mt(`${r}:${o}`);i.Authorization=`Basic ${d}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:le(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":$(e.body)?i["Content-Type"]="text/plain":_e(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Tt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):$(s.body)||le(s.body)||_e(s.body)?s.body:JSON.stringify(s.body)},vt=(s,e,t,r,o,p,i)=>t.request(e.method,r,{headers:i,body:o??p,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Bt=(s,e)=>{if(e){let t=s.headers.get(e);if($(t))return t}},Vt=s=>{if(s.status!==204&&s.body!==null)return s.body},Pt=(s,e)=>{let r=D({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new N(s,e,r);if(!e.ok){let o=e.status??"unknown",p=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new N(s,e,`Generic Error: status: ${o}; status text: ${p}; body: ${i}`)}},a=(s,e,t)=>{let r=bt(s,t),o=gt(t),p=Tt(t);return Rt(s,t).pipe(F(i=>vt(s,t,e,r,p,o,i)),F(async i=>{for(let m of s.interceptors.response._fns)i=await m(i);let d=Vt(i),u=Bt(i,t.responseHeader),h=d;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(d)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:u??h}}),ee(i=>i.status?L({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):H(()=>i)),B(i=>(Pt(t,i),i.body)),ee(i=>H(()=>i)))};var ze=class s{constructor(e){this.http=e}getApiV1Commandline(){return a(n,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}postApiV1Commandline(e){return a(n,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return a(n,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return a(n,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return a(n,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return a(n,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return a(n,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return a(n,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return a(n,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return a(n,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return a(n,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return a(n,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return a(n,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return a(n,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return a(n,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return a(n,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return a(n,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return a(n,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return a(n,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return a(n,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return a(n,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return a(n,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return a(n,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return a(n,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return a(n,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return a(n,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return a(n,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return a(n,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return a(n,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return a(n,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return a(n,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return a(n,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return a(n,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return a(n,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return a(n,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return a(n,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return a(n,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return a(n,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return a(n,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return a(n,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return a(n,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})},$e=class s{constructor(e){this.http=e}getApiV1Webmodules(){return a(n,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,z as b,K as c,es as d,ts as e,ss as f,ze as g,Ke as h,$e as i};
2
+ `).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),p=t.slice(r+1).trim();this.addHeaderEntry(o,p)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let p=e.value;if(!p)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(d=>p.indexOf(d)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(p=>p.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var re=class{encodeKey(e){return Oe(e)}encodeValue(e){return Oe(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function We(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let p=o.indexOf("="),[i,d]=p==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,p)),e.decodeValue(o.slice(p+1))],u=t.get(i)||[];u.push(d),t.set(i,u)}),t}var Xe=/%(\d[a-f0-9])/gi,Ye={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Oe(s){return encodeURIComponent(s).replace(Xe,(e,t)=>Ye[t]??e)}function J(s){return`${s}`}var k=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new re,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=We(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(J):[J(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(p=>{t.push({param:r,value:p,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(J(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(J(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var ie=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function Qe(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function De(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function we(s){return typeof Blob<"u"&&s instanceof Blob}function Se(s){return typeof FormData<"u"&&s instanceof FormData}function Ze(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var j="Content-Type",W="Accept",ae="X-Request-URL",Me="text/plain",Le="application/json",Fe=`${Le}, ${Me}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let p;if(Qe(this.method)||o?(this.body=r!==void 0?r:null,p=o):p=r,p&&(this.reportProgress=!!p.reportProgress,this.withCredentials=!!p.withCredentials,p.responseType&&(this.responseType=p.responseType),p.headers&&(this.headers=p.headers),p.context&&(this.context=p.context),p.params&&(this.params=p.params),this.transferCache=p.transferCache),this.headers??=new g,this.context??=new ie,!this.params)this.params=new k,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let d=t.indexOf("?"),u=d===-1?"?":d<t.length-1?"&":"";this.urlWithParams=t+u+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||De(this.body)||we(this.body)||Se(this.body)||Ze(this.body)?this.body:this.body instanceof k?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Se(this.body)?null:we(this.body)?this.body.type||null:De(this.body)?null:typeof this.body=="string"?Me:this.body instanceof k?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Le:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,p=e.transferCache??this.transferCache,i=e.body!==void 0?e.body:this.body,d=e.withCredentials??this.withCredentials,u=e.reportProgress??this.reportProgress,h=e.headers||this.headers,m=e.params||this.params,A=e.context??this.context;return e.setHeaders!==void 0&&(h=Object.keys(e.setHeaders).reduce((I,y)=>I.set(y,e.setHeaders[y]),h)),e.setParams&&(m=Object.keys(e.setParams).reduce((I,y)=>I.set(y,e.setParams[y]),m)),new s(t,r,i,{params:m,headers:h,context:A,reportProgress:u,responseType:o,withCredentials:d,transferCache:p})}},E=function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s}(E||{}),_=class{headers;status;statusText;url;ok;type;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=E.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},z=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=E.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},P=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},je=200,He=204;function te(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,transferCache:s.transferCache}}var K=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let p;if(t instanceof C)p=t;else{let u;o.headers instanceof g?u=o.headers:u=new g(o.headers);let h;o.params&&(o.params instanceof k?h=o.params:h=new k({fromObject:o.params})),p=new C(t,r,o.body!==void 0?o.body:null,{headers:u,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let i=L(p).pipe(be(u=>this.handler.handle(u)));if(t instanceof C||o.observe==="events")return i;let d=i.pipe(Ae(u=>u instanceof z));switch(o.observe||"body"){case"body":switch(p.responseType){case"arraybuffer":return d.pipe(B(u=>{if(u.body!==null&&!(u.body instanceof ArrayBuffer))throw new w(2806,!1);return u.body}));case"blob":return d.pipe(B(u=>{if(u.body!==null&&!(u.body instanceof Blob))throw new w(2807,!1);return u.body}));case"text":return d.pipe(B(u=>{if(u.body!==null&&typeof u.body!="string")throw new w(2808,!1);return u.body}));case"json":default:return d.pipe(B(u=>u.body))}case"response":return d;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new k().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,te(o,r))}post(t,r,o={}){return this.request("POST",t,te(o,r))}put(t,r,o={}){return this.request("PUT",t,te(o,r))}static \u0275fac=function(r){return new(r||s)(b(U))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),et=/^\)\]\}',?\n/;function Ne(s){if(s.url)return s.url;let e=ae.toLocaleLowerCase();return s.headers.get(e)}var Ce=new V(""),se=(()=>{class s{fetchImpl=T(oe,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ve);handle(t){return new Z(r=>{let o=new AbortController;return this.doRequest(t,o.signal,r).then(ne,p=>r.error(new P({error:p}))),()=>o.abort()})}async doRequest(t,r,o){let p=this.createRequestInit(t),i;try{let y=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,D({signal:r},p)));tt(y),o.next({type:E.Sent}),i=await y}catch(y){o.error(new P({error:y,status:y.status??0,statusText:y.statusText,url:t.urlWithParams,headers:y.headers}));return}let d=new g(i.headers),u=i.statusText,h=Ne(i)??t.urlWithParams,m=i.status,A=null;if(t.reportProgress&&o.next(new X({headers:d,status:m,statusText:u,url:h})),i.body){let y=i.headers.get("content-length"),G=[],c=i.body.getReader(),l=0,v,S,f=typeof Zone<"u"&&Zone.current;await this.ngZone.runOutsideAngular(async()=>{for(;;){let{done:O,value:M}=await c.read();if(O)break;if(G.push(M),l+=M.length,t.reportProgress){S=t.responseType==="text"?(S??"")+(v??=new TextDecoder).decode(M,{stream:!0}):void 0;let he=()=>o.next({type:E.DownloadProgress,total:y?+y:void 0,loaded:l,partialText:S});f?f.run(he):he()}}});let x=this.concatChunks(G,l);try{let O=i.headers.get(j)??"";A=this.parseBody(t,x,O)}catch(O){o.error(new P({error:O,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Ne(i)??t.urlWithParams}));return}}m===0&&(m=A?je:0),m>=200&&m<300?(o.next(new z({body:A,headers:d,status:m,statusText:u,url:h})),o.complete()):o.error(new P({error:A,headers:d,status:m,statusText:u,url:h}))}parseBody(t,r,o){switch(t.responseType){case"json":let p=new TextDecoder().decode(r).replace(et,"");return p===""?null:JSON.parse(p);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o=t.withCredentials?"include":void 0;if(t.headers.forEach((p,i)=>r[p]=i.join(",")),t.headers.has(W)||(r[W]=Fe),!t.headers.has(j)){let p=t.detectContentTypeHeader();p!==null&&(r[j]=p)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o}}concatChunks(t,r){let o=new Uint8Array(r),p=0;for(let i of t)o.set(i,p),p+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),oe=class{};function ne(){}function tt(s){s.then(ne,ne)}function st(s,e){return e(s)}function rt(s,e,t){return(r,o)=>ve(t,()=>e(r,p=>s(p,o)))}var pe=new V(""),it=new V(""),ot=new V("",{providedIn:"root",factory:()=>!0});var Ge=(()=>{class s extends U{backend;injector;chain=null;pendingTasks=T(Be);contributeToStability=T(ot);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(pe),...this.injector.get(it,[])]));this.chain=r.reduceRight((o,p)=>rt(o,p,this.injector),st)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ge(()=>this.pendingTasks.remove(r)))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(b(q),b(Te))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})();var nt=/^\)\]\}',?\n/,at=RegExp(`^${ae}:`,"m");function pt(s){return"responseURL"in s&&s.responseURL?s.responseURL:at.test(s.getAllResponseHeaders())?s.getResponseHeader(ae):null}var xe=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?fe(r.\u0275loadImpl()):L(null)).pipe(F(()=>new Z(p=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(W)||i.setRequestHeader(W,Fe),!t.headers.has(j)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(j,c)}if(t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let d=t.serializeBody(),u=null,h=()=>{if(u!==null)return u;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),v=pt(i)||t.url;return u=new X({headers:l,status:i.status,statusText:c,url:v}),u},m=()=>{let{headers:c,status:l,statusText:v,url:S}=h(),f=null;l!==He&&(f=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=f?je:0);let x=l>=200&&l<300;if(t.responseType==="json"&&typeof f=="string"){let O=f;f=f.replace(nt,"");try{f=f!==""?JSON.parse(f):null}catch(M){f=O,x&&(x=!1,f={error:M,text:f})}}x?(p.next(new z({body:f,headers:c,status:l,statusText:v,url:S||void 0})),p.complete()):p.error(new P({error:f,headers:c,status:l,statusText:v,url:S||void 0}))},A=c=>{let{url:l}=h(),v=new P({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});p.error(v)},I=!1,y=c=>{I||(p.next(h()),I=!0);let l={type:E.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),p.next(l)},G=c=>{let l={type:E.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),p.next(l)};return i.addEventListener("load",m),i.addEventListener("error",A),i.addEventListener("timeout",A),i.addEventListener("abort",A),t.reportProgress&&(i.addEventListener("progress",y),d!==null&&i.upload&&i.upload.addEventListener("progress",G)),i.send(d),p.next({type:E.Sent}),()=>{i.removeEventListener("error",A),i.removeEventListener("abort",A),i.removeEventListener("load",m),i.removeEventListener("timeout",A),t.reportProgress&&(i.removeEventListener("progress",y),d!==null&&i.upload&&i.upload.removeEventListener("progress",G)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(b(Ie))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})(),Ue=new V(""),ut="XSRF-TOKEN",dt=new V("",{providedIn:"root",factory:()=>ut}),ct="X-XSRF-TOKEN",lt=new V("",{providedIn:"root",factory:()=>ct}),Y=class{},ht=(()=>{class s{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r,o){this.doc=t,this.platform=r,this.cookieName=o}getToken(){if(this.platform==="server")return null;let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Ee(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(b(ke),b(Pe),b(dt))};static \u0275prov=R({token:s,factory:s.\u0275fac})}return s})();function yt(s,e){let t=s.url.toLowerCase();if(!T(Ue)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(Y).getToken(),o=T(lt);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var ue=function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s}(ue||{});function qe(s,e){return{\u0275kind:s,\u0275providers:e}}function es(...s){let e=[K,xe,Ge,{provide:U,useExisting:Ge},{provide:q,useFactory:()=>T(Ce,{optional:!0})??T(xe)},{provide:pe,useValue:yt,multi:!0},{provide:Ue,useValue:!0},{provide:Y,useClass:ht}];for(let t of s)e.push(...t.\u0275providers);return Re(e)}function ts(s){return qe(ue.Interceptors,s.map(e=>({provide:pe,useValue:e,multi:!0})))}function ss(){return qe(ue.Fetch,[se,{provide:Ce,useExisting:se},{provide:q,useExisting:se}])}var de=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},n={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new de}};var N=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var $=s=>typeof s=="string",ce=s=>$(s)&&s!=="",le=s=>s instanceof Blob,_e=s=>s instanceof FormData,mt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},At=s=>{let e=[],t=(o,p)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(p))}`)},r=(o,p)=>{p!=null&&(p instanceof Date?t(o,p.toISOString()):Array.isArray(p)?p.forEach(i=>r(o,i)):typeof p=="object"?Object.entries(p).forEach(([i,d])=>r(`${o}[${i}]`,d)):t(o,p))};return Object.entries(s).forEach(([o,p])=>r(o,p)),e.length?`?${e.join("&")}`:""},bt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(p,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):p),o=s.BASE+r;return e.query?o+At(e.query):o},gt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{$(o)||le(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(p=>t(r,p)):t(r,o)}),e}},Q=async(s,e)=>typeof e=="function"?e(s):e,Rt=(s,e)=>me({token:Q(e,s.TOKEN),username:Q(e,s.USERNAME),password:Q(e,s.PASSWORD),additionalHeaders:Q(e,s.HEADERS)}).pipe(B(({token:t,username:r,password:o,additionalHeaders:p})=>{let i=Object.entries(D(D({Accept:"application/json"},p),e.headers)).filter(([,d])=>d!=null).reduce((d,[u,h])=>ye(D({},d),{[u]:String(h)}),{});if(ce(t)&&(i.Authorization=`Bearer ${t}`),ce(r)&&ce(o)){let d=mt(`${r}:${o}`);i.Authorization=`Basic ${d}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:le(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":$(e.body)?i["Content-Type"]="text/plain":_e(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Tt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):$(s.body)||le(s.body)||_e(s.body)?s.body:JSON.stringify(s.body)},vt=(s,e,t,r,o,p,i)=>t.request(e.method,r,{headers:i,body:o??p,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Bt=(s,e)=>{if(e){let t=s.headers.get(e);if($(t))return t}},Vt=s=>{if(s.status!==204&&s.body!==null)return s.body},Pt=(s,e)=>{let r=D({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new N(s,e,r);if(!e.ok){let o=e.status??"unknown",p=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new N(s,e,`Generic Error: status: ${o}; status text: ${p}; body: ${i}`)}},a=(s,e,t)=>{let r=bt(s,t),o=gt(t),p=Tt(t);return Rt(s,t).pipe(F(i=>vt(s,t,e,r,p,o,i)),F(async i=>{for(let m of s.interceptors.response._fns)i=await m(i);let d=Vt(i),u=Bt(i,t.responseHeader),h=d;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(d)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:u??h}}),ee(i=>i.status?L({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):H(()=>i)),B(i=>(Pt(t,i),i.body)),ee(i=>H(()=>i)))};var ze=class s{constructor(e){this.http=e}getApiV1Commandline(){return a(n,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}postApiV1Commandline(e){return a(n,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return a(n,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return a(n,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return a(n,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return a(n,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return a(n,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return a(n,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return a(n,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return a(n,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return a(n,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return a(n,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return a(n,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return a(n,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return a(n,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return a(n,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return a(n,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return a(n,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return a(n,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return a(n,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return a(n,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return a(n,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return a(n,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return a(n,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return a(n,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return a(n,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return a(n,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return a(n,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return a(n,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return a(n,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return a(n,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return a(n,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return a(n,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return a(n,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return a(n,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return a(n,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return a(n,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return a(n,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return a(n,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return a(n,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return a(n,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return a(n,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return a(n,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return a(n,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return a(n,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return a(n,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return a(n,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return a(n,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return a(n,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return a(n,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})},$e=class s{constructor(e){this.http=e}getApiV1Webmodules(){return a(n,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(b(K))};static \u0275prov=R({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,z as b,K as c,es as d,ts as e,ss as f,ze as g,Ke as h,$e as i};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-2ZVLF3KW.js";import{h as u}from"./chunk-4AECHE4W.js";import{B as h,Bc as N,E as s,F as p,P as d,S as l,Y as r,n as c,ua as o,x as f}from"./chunk-W2F756OF.js";var b=class a{#e=r(u);#s=r(m);serverState=this.#s.serverState;serverStateEffect=N(()=>{let t=this.#s.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#o=-1;#a=o(!1);#t=o([]);#i=o([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#o!==t&&(this.#o=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(s(1),d(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(s(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(s(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(h(()=>c(e))));f(i).pipe(s(1)).subscribe({next:e=>{let v=e.filter(n=>n!=null&&"ID"in n);this.#t.set(v),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=l({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
1
+ import{a as m}from"./chunk-KIUU6RPZ.js";import{h as u}from"./chunk-JSGFZ2GA.js";import{B as h,Bc as N,E as s,F as p,P as d,S as l,Y as r,n as c,ua as o,x as f}from"./chunk-W2F756OF.js";var b=class a{#e=r(u);#s=r(m);serverState=this.#s.serverState;serverStateEffect=N(()=>{let t=this.#s.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#o=-1;#a=o(!1);#t=o([]);#i=o([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#o!==t&&(this.#o=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(s(1),d(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(s(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(s(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(h(()=>c(e))));f(i).pipe(s(1)).subscribe({next:e=>{let v=e.filter(n=>n!=null&&"ID"in n);this.#t.set(v),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=l({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-6OKAWH4X.js";import{a as B}from"./chunk-GDHVQU56.js";import{a as h}from"./chunk-O2YN63YI.js";import{h as S}from"./chunk-4AECHE4W.js";import{Ac as P,Bc as n,F as f,N as k,S as d,Y as o,n as g,r as u,ua as s}from"./chunk-W2F756OF.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var R={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},z=class r{#t=o(h);#l=o(S);#i=o(B);#e=o(m);#o=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=P(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(t=>a(l({},t),{backup:t.Item1?this.#i.getBackupById(t.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=n(()=>{this.#e.serverState()?.ActiveTask||this.#i.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#c=n(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}#r(){this.#o.set(!0),this.#l.getApiV1Progressstate().pipe(k(e=>{let t=e.TaskID??null;return t===null?g(e):this.#l.getApiV1TaskByTaskid({taskid:t}).pipe(u(i=>a(l({},e),{task:i??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,i=e.BackupID??null;t!==null&&i!==null&&(e.backup=this.#i.getBackupById(i)),this.#a.set(a(l({},e),{progress:this.#s(e),statusText:this.#n(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let t=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)t=0;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i;t=(e.ProcessedFileSize+i)/e.TotalFileSize,e.ProcessedFileCount===0?t=0:t>=.9&&(t=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?t=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?t=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?t=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?t=1:e.OverallProgress>0&&(t=e.OverallProgress);return t}#n(e){let t="Running \u2026";if(e.task&&e&&(t=e.Phase?R[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)t=`Counting (${e.TotalFileCount} files found, ${this.#t.transform(e.TotalFileSize)})`;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i,_=e.BackendSpeed<0?"":` at ${this.#t.transform(e.BackendSpeed)}/s`;t=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#t.transform(p)}) to go ${_}`}return t}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{z as a};
1
+ import{a as m}from"./chunk-NQNRR7VE.js";import{a as B}from"./chunk-OTLEEXAA.js";import{a as h}from"./chunk-O2YN63YI.js";import{h as S}from"./chunk-JSGFZ2GA.js";import{Ac as P,Bc as n,F as f,N as k,S as d,Y as o,n as g,r as u,ua as s}from"./chunk-W2F756OF.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var R={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},z=class r{#t=o(h);#l=o(S);#i=o(B);#e=o(m);#o=s(!1);#a=s(null);statusData=this.#a.asReadonly();lastState=null;serverState=P(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(t=>a(l({},t),{backup:t.Item1?this.#i.getBackupById(t.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=n(()=>{this.#e.serverState()?.ActiveTask||this.#i.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#c=n(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}#r(){this.#o.set(!0),this.#l.getApiV1Progressstate().pipe(k(e=>{let t=e.TaskID??null;return t===null?g(e):this.#l.getApiV1TaskByTaskid({taskid:t}).pipe(u(i=>a(l({},e),{task:i??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,i=e.BackupID??null;t!==null&&i!==null&&(e.backup=this.#i.getBackupById(i)),this.#a.set(a(l({},e),{progress:this.#s(e),statusText:this.#n(e),actionText:e.backup?.Backup?.Name??$localize`Running task`})),e.task?.Status==="Completed"&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let t=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)t=0;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i;t=(e.ProcessedFileSize+i)/e.TotalFileSize,e.ProcessedFileCount===0?t=0:t>=.9&&(t=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?t=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?t=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?t=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?t=1:e.OverallProgress>0&&(t=e.OverallProgress);return t}#n(e){let t="Running \u2026";if(e.task&&e&&(t=e.Phase?R[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)t=`Counting (${e.TotalFileCount} files found, ${this.#t.transform(e.TotalFileSize)})`;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-i,_=e.BackendSpeed<0?"":` at ${this.#t.transform(e.BackendSpeed)}/s`;t=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#t.transform(p)}) to go ${_}`}return t}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{z as a};
@@ -1,3 +1,3 @@
1
- import{a as fe}from"./chunk-VLIGMNJX.js";import{n as P}from"./chunk-JD54W4UA.js";import"./chunk-6DH6O5YE.js";import"./chunk-YJSWEW6C.js";import{a as Ne}from"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import{a as T}from"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import{a as Me}from"./chunk-TJS6O6KD.js";import"./chunk-7L42EO7J.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import{c as re,e as le,f as se,i as me,m as de,n as pe,o as _e,q as ce,r as ue,s as Ce,t as ge}from"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{b as q,d as Z,e as J}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as ee,g as te,k as ne,l as oe,p as ie,t as ae}from"./chunk-WX7L7V6J.js";import{g as Q,h as Y}from"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Ab as O,Bc as H,Cb as G,Gb as M,Hb as N,Ib as _,Jb as x,Kb as U,Mb as K,Nb as f,Qa as m,Rb as w,Y as C,ab as $,da as S,ea as E,ec as X,fb as h,fc as z,gc as V,kc as W,lc as j,nb as u,pb as b,sb as B,tb as R,ua as F,ub as y,vb as v,wb as r,xb as o,yb as l,zb as A}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var Se=()=>[];function Ee(s,t){s&1&&l(0,"spk-progress-bar",12)}function Fe(s,t){if(s&1&&(r(0,"spk-form-field"),l(1,"input",32),o()),s&2){let e=t.$implicit,i=t.$index;m(),w("id","filter-",i,""),u("formControl",e)}}function Ae(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),_(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),_(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),_(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),_(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),_(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),_(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),_(26,7),O(),A(27,27),y(28,Fe,2,3,"spk-form-field",null,R),O(),o()(),r(30,"p"),M(31,8),l(32,"a",28),N(),o(),r(33,"app-options-list",29),V("optionsChange",function(a){S(e);let c=f();return z(c.settings,a)||(c.settings=a),E(a)}),o(),r(34,"div",30)(35,"button",31),K("click",function(){S(e);let a=f();return E(a.submit())}),M(36,9),l(37,"spk-icon"),N(),o()()}if(s&2){let e,i=f();u("formGroup",i.baseCmdForm),m(),u("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Se))("inlineSearch",!0),m(14),u("formGroup",i.standardFields),m(9),u("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),u("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ue,Oe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=C(P);#t=C(Y);#n=C(Z);#o=C(q);#i=C(Q);#a=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#r=H(()=>{let t=this.#a()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
1
+ import{a as fe}from"./chunk-BVTZNGGE.js";import{n as P}from"./chunk-DMDYUREZ.js";import"./chunk-6DH6O5YE.js";import"./chunk-ORDORLQT.js";import{a as Ne}from"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import{a as T}from"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import{a as Me}from"./chunk-7JUYF3HW.js";import"./chunk-7L42EO7J.js";import"./chunk-KIUU6RPZ.js";import"./chunk-NQNRR7VE.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import{c as re,e as le,f as se,i as me,m as de,n as pe,o as _e,q as ce,r as ue,s as Ce,t as ge}from"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{b as q,d as Z,e as J}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as ee,g as te,k as ne,l as oe,p as ie,t as ae}from"./chunk-WX7L7V6J.js";import{g as Q,h as Y}from"./chunk-JSGFZ2GA.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Ab as O,Bc as H,Cb as G,Gb as M,Hb as N,Ib as _,Jb as x,Kb as U,Mb as K,Nb as f,Qa as m,Rb as w,Y as C,ab as $,da as S,ea as E,ec as X,fb as h,fc as z,gc as V,kc as W,lc as j,nb as u,pb as b,sb as B,tb as R,ua as F,ub as y,vb as v,wb as r,xb as o,yb as l,zb as A}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var Se=()=>[];function Ee(s,t){s&1&&l(0,"spk-progress-bar",12)}function Fe(s,t){if(s&1&&(r(0,"spk-form-field"),l(1,"input",32),o()),s&2){let e=t.$implicit,i=t.$index;m(),w("id","filter-",i,""),u("formControl",e)}}function Ae(s,t){if(s&1){let e=G();r(0,"form",13)(1,"spk-select",14)(2,"label",15),_(3,1),o(),l(4,"input",16),o(),r(5,"spk-form-field")(6,"label",17),_(7,2),o(),l(8,"textarea",18),o(),r(9,"spk-form-field")(10,"label",19),_(11,3),o(),l(12,"textarea",20),o()(),r(13,"spk-divider"),_(14,4),o(),r(15,"form",13)(16,"spk-form-field")(17,"label",21),_(18,5),o(),l(19,"input",22),o(),r(20,"spk-form-field")(21,"label",23),_(22,6),o(),l(23,"input",24),o(),r(24,"app-toggle-card",25),A(25,26),_(26,7),O(),A(27,27),y(28,Fe,2,3,"spk-form-field",null,R),O(),o()(),r(30,"p"),M(31,8),l(32,"a",28),N(),o(),r(33,"app-options-list",29),V("optionsChange",function(a){S(e);let c=f();return z(c.settings,a)||(c.settings=a),E(a)}),o(),r(34,"div",30)(35,"button",31),K("click",function(){S(e);let a=f();return E(a.submit())}),M(36,9),l(37,"spk-icon"),N(),o()()}if(s&2){let e,i=f();u("formGroup",i.baseCmdForm),m(),u("options",(e=i.commandOptions())!==null&&e!==void 0?e:j(10,Se))("inlineSearch",!0),m(14),u("formGroup",i.standardFields),m(9),u("disallowToggle",!0),m(4),v(i.standardFields.controls.filters.controls),m(5),X("options",i.settings),u("hasFreeTextSettings",!0),m(2),b("loader",i.isSubmitting()),m(2),x(i.baseCmdForm.value.command),U(36)}}var d=new ue,Oe=["Bytes","KB","MB","GB","TB","PB"],I=class s{#e=C(P);#t=C(Y);#n=C(Z);#o=C(q);#i=C(Q);#a=T(this.#o.params);commandOptions=T(this.#i.getApiV1Commandline());sizeOptions=F(Oe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#r=H(()=>{let t=this.#a()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",i=t.arguments?.split(`
2
2
  `).filter(n=>n.length>0)??[],a=this.standardFields.value,c=a.filters??[],g=[t.command,e,...i,`--backup-name=${a["backup-name"]}`,`--dbpath=${a.dbpath}`,`--backup-id=${a["backup-id"]}`,...c.filter(n=>n).map(n=>n.startsWith("-")?`--exclude=${n?.slice(1)}`:`--include=${n}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(n=>n.Name.startsWith("--")?`${n.Name}=${n.Value}`:`--${n.Name}=${n.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(n=>{n.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",n.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=$({type:s,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let i;i=$localize`TargetUrl`;let a;a=$localize`Commandline Arguments`;let c;c=$localize`Advanced options`;let g;g=$localize`Backup ID`;let n;n=$localize`Backup Name`;let k;k=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,i,a,c,g,n,k,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,i){e&1&&(l(0,"app-status-bar"),r(1,"section")(2,"div",10)(3,"button",11),M(4,0),l(5,"spk-icon"),N(),o()(),h(6,Ee,1,0,"spk-progress-bar",12)(7,Ae,38,11),o()),e&2&&(m(6),B(i.finishedLoading()?7:6))},dependencies:[Ce,me,re,le,se,Me,fe,Ne,ge,de,pe,ce,_e,J,oe,te,ne,ae,ie,ee],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};export{I as default};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-HTNYQE2B.js";import{a as R}from"./chunk-6OKAWH4X.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as U,g as w,p as L}from"./chunk-WX7L7V6J.js";import{h as F}from"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{$b as s,Ac as O,Cb as S,F as d,Ib as E,Jb as M,Kb as P,Mb as k,Na as T,Nb as c,Qa as l,Y as m,ab as G,ac as b,da as u,ea as g,fb as _,nb as N,pb as x,r as A,sb as p,ua as C,wb as a,xb as o,yb as f}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=c(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),_(2,V,4,1,"a",6)}if(n&2){let e,t=c();x("loader",t.checkingForUpdates()),l(2),p((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(F);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`Your running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(_(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),_(7,$,3,3)(8,I,2,0,"button",4)(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;p(t.isLoading()?0:-1),l(5),M(t.duplicatiVersion()),P(5),l(2),p(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),p(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[L,w,U],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
1
+ import{a as D}from"./chunk-HTNYQE2B.js";import{a as R}from"./chunk-NQNRR7VE.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as U,g as w,p as L}from"./chunk-WX7L7V6J.js";import{h as F}from"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{$b as s,Ac as O,Cb as S,F as d,Ib as E,Jb as M,Kb as P,Mb as k,Na as T,Nb as c,Qa as l,Y as m,ab as G,ac as b,da as u,ea as g,fb as _,nb as N,pb as x,r as A,sb as p,ua as C,wb as a,xb as o,yb as f}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=c(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),_(2,V,4,1,"a",6)}if(n&2){let e,t=c();x("loader",t.checkingForUpdates()),l(2),p((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(F);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`Your running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(_(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),_(7,$,3,3)(8,I,2,0,"button",4)(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;p(t.isLoading()?0:-1),l(5),M(t.duplicatiVersion()),P(5),l(2),p(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),p(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[L,w,U],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
@@ -1,4 +1,4 @@
1
- import{a as xe}from"./chunk-HTNYQE2B.js";import{c as ke}from"./chunk-WMTA6PZM.js";import{h as be}from"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{Ib as fe,Ma as oe,Qa as ae,V as le,Y as q,ab as ce,kc as de,nb as he,r as ie,wb as pe,xb as ue,yb as ge}from"./chunk-W2F756OF.js";import{a as m,b as z}from"./chunk-7CGTOI24.js";function F(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=F();function $e(a){R=a}var E={exec:()=>null};function g(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(x.caret,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),U=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ze=/^[^\n]+/,X=/(?!\s*\])(?:\\.|[^\[\]\\])+/,He=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce=g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Qe=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ce).getRegex(),V={blockquote:Qe,code:De,def:He,fences:Oe,heading:Ne,hr:v,html:Fe,lheading:ze,list:je,newline:Me,paragraph:Ce,table:E,text:Ze},me=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ue=z(m({},V),{lheading:Ge,table:me,paragraph:g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()}),Xe=z(m({},V),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(U).replace("hr",v).replace("heading",` *#{1,6} *[^
1
+ import{a as xe}from"./chunk-HTNYQE2B.js";import{c as ke}from"./chunk-WMTA6PZM.js";import{h as be}from"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{Ib as fe,Ma as oe,Qa as ae,V as le,Y as q,ab as ce,kc as de,nb as he,r as ie,wb as pe,xb as ue,yb as ge}from"./chunk-W2F756OF.js";import{a as m,b as z}from"./chunk-7CGTOI24.js";function F(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=F();function $e(a){R=a}var E={exec:()=>null};function g(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(x.caret,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),U=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ze=/^[^\n]+/,X=/(?!\s*\])(?:\\.|[^\[\]\\])+/,He=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce=g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Qe=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ce).getRegex(),V={blockquote:Qe,code:De,def:He,fences:Oe,heading:Ne,hr:v,html:Fe,lheading:ze,list:je,newline:Me,paragraph:Ce,table:E,text:Ze},me=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ue=z(m({},V),{lheading:Ge,table:me,paragraph:g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()}),Xe=z(m({},V),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(U).replace("hr",v).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),We=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ve=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,Je=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,J=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Ke=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,J).getRegex(),Pe=/(?!~)[\p{P}\p{S}]/u,Ye=/(?!~)[\s\p{P}\p{S}]/u,et=/(?:[^\s\p{P}\p{S}]|~)/u,tt=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Le=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nt=g(Le,"u").replace(/punct/g,N).getRegex(),st=g(Le,"u").replace(/punct/g,Pe).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rt=g(Ie,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),it=g(Ie,"gu").replace(/notPunctSpace/g,et).replace(/punctSpace/g,Ye).replace(/punct/g,Pe).getRegex(),lt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),ot=g(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),at=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=g(W).replace("(?:-->|$)","-->").getRegex(),ht=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pt=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ee=g(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",X).getRegex(),Be=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",X).getRegex(),ut=g("reflink|nolink(?!\\()","g").replace("reflink",Ee).replace("nolink",Be).getRegex(),K={_backpedal:E,anyPunctuation:ot,autolink:at,blockSkip:tt,br:_e,code:Ve,del:E,emStrongLDelim:nt,emStrongRDelimAst:rt,emStrongRDelimUnd:lt,escape:We,link:pt,nolink:Be,punctuation:Ke,reflink:Ee,reflinkSearch:ut,tag:ht,text:Je,url:E},gt=z(m({},K),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()}),H=z(m({},K),{emStrongRDelimAst:it,emStrongLDelim:st,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ft=z(m({},H),{br:g(_e).replace("{2,}","*").getRegex(),text:g(H.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),M={normal:V,gfm:Ue,pedantic:Xe},L={normal:K,gfm:H,breaks:ft,pedantic:gt},dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=a=>dt[a];function T(a,e){if(e){if(x.escapeTest.test(a))return a.replace(x.escapeReplace,we)}else if(x.escapeTestNoEncode.test(a))return a.replace(x.escapeReplaceNoEncode,we);return a}function ye(a){try{a=encodeURI(a).replace(x.percentDecode,"%")}catch{return null}return a}function Se(a,e){let t=a.replace(x.findPipe,(i,r,l)=>{let o=!1,c=r;for(;--c>=0&&l[c]==="\\";)o=!o;return o?"|":" |"}),n=t.split(x.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(x.slashPipe,"|");return n}function I(a,e,t){let n=a.length;if(n===0)return"";let s=0;for(;s<n&&a.charAt(n-s-1)===e;)s++;return a.slice(0,n-s)}function kt(a,e){if(a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]==="\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return-1}function Te(a,e,t,n,s){let i=e.href,r=e.title||null,l=a[1].replace(s.other.outputLinkReplace,"$1");if(a[0].charAt(0)!=="!"){n.state.inLink=!0;let o={type:"link",raw:t,href:i,title:r,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,o}return{type:"image",raw:t,href:i,title:r,text:l}}function bt(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
3
3
  `).map(i=>{let r=i.match(t.other.beginningSpace);if(r===null)return i;let[l]=r;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var _=class{options;rules;lexer;constructor(e){this.options=e||R}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:I(n,`
@@ -1 +1 @@
1
- import{a as P,c as A}from"./chunk-CHRKPWRG.js";import{e as d}from"./chunk-WX7L7V6J.js";import{h as k}from"./chunk-4AECHE4W.js";import{l as M}from"./chunk-CKPICCFH.js";import{Ac as g,Bc as b,Gb as v,Hb as E,Ib as N,Jb as I,Kb as F,O as C,Qa as T,S as c,Y as s,ab as O,i as S,pc as w,rc as y,ua as n,wb as m,xb as f,yb as _}from"./chunk-W2F756OF.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
1
+ import{a as P,c as A}from"./chunk-F4EEOSGJ.js";import{e as d}from"./chunk-WX7L7V6J.js";import{h as k}from"./chunk-JSGFZ2GA.js";import{l as M}from"./chunk-CKPICCFH.js";import{Ac as g,Bc as b,Gb as v,Hb as E,Ib as N,Jb as I,Kb as F,O as C,Qa as T,S as c,Y as s,ab as O,i as S,pc as w,rc as y,ua as n,wb as m,xb as f,yb as _}from"./chunk-W2F756OF.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
@@ -1 +1 @@
1
- import{g as k}from"./chunk-X5YRWKCW.js";import{n as x}from"./chunk-JD54W4UA.js";import"./chunk-6DH6O5YE.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import{a as g}from"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import{a as X}from"./chunk-TJS6O6KD.js";import"./chunk-7L42EO7J.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{q as w,v as K}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Bc as N,Gb as _,Hb as F,Nb as E,Qa as d,Y as c,ab as A,fb as $,kc as M,lc as T,mc as R,nb as r,pb as L,sb as O,ua as C,wb as i,xb as n,yb as a}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,o){e&1&&(i(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),i(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),i(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),d(3),r("routerLink",T(5,z)),d(3),r("routerLink",T(6,B)),d(3),r("routerLink",T(7,U)))}function Y(e,o){if(e&1&&(i(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,j,t.backupId())),d(3),r("routerLink",R(4,H,t.backupId()))}}function Z(e,o){if(e&1&&(i(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,V,t.backupId())),d(3),r("routerLink",R(4,q,t.backupId()))}}function ee(e,o){if(e&1&&(i(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(1,J,t.backupId()))}}var D=class e{#t=c(G);#i=c(h);#e=c(k);#n=g(this.#t.params);#o=g(this.#t.url);#a=g(this.#t.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=C(!1);paramsChanged=N(()=>{let o=this.#a(),t=this.#n()?.id,s=!!this.#o()?.find(S=>S.path==="restore-draft"),p=!!this.#o()?.find(S=>S.path==="restore-from-files"),u=!!o?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(t,p,p||s)});ngOnInit(){this.#i.events.subscribe(o=>{if(o instanceof I){let t=o.urlAfterRedirects;this.isProgressPage.set(t.includes("progress"))}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=A({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(t,s){t&2&&L("full-width",s.isProgressPage())},features:[M([k,x])],decls:8,vars:2,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let P;P=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[o,t,s,p,u,S,f,P,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(a(0,"app-status-bar"),i(1,"spk-stepper"),$(2,Q,12,8)(3,Y,6,6)(4,Z,6,6)(5,ee,3,3,"div",9),n(),i(6,"section"),a(7,"router-outlet"),n()),t&2&&(d(2),O(s.isFileRestore()?2:s.isDraft()?3:4),d(3),O(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{D as default};
1
+ import{g as k}from"./chunk-IDOYGPGZ.js";import{n as x}from"./chunk-DMDYUREZ.js";import"./chunk-6DH6O5YE.js";import"./chunk-ORDORLQT.js";import"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import{a as g}from"./chunk-HTNYQE2B.js";import"./chunk-GJROCOAD.js";import{a as X}from"./chunk-7JUYF3HW.js";import"./chunk-7L42EO7J.js";import"./chunk-KIUU6RPZ.js";import"./chunk-NQNRR7VE.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{q as w,v as K}from"./chunk-WX7L7V6J.js";import"./chunk-JSGFZ2GA.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Bc as N,Gb as _,Hb as F,Nb as E,Qa as d,Y as c,ab as A,fb as $,kc as M,lc as T,mc as R,nb as r,pb as L,sb as O,ua as C,wb as i,xb as n,yb as a}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,o){e&1&&(i(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),i(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),i(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),d(3),r("routerLink",T(5,z)),d(3),r("routerLink",T(6,B)),d(3),r("routerLink",T(7,U)))}function Y(e,o){if(e&1&&(i(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,j,t.backupId())),d(3),r("routerLink",R(4,H,t.backupId()))}}function Z(e,o){if(e&1&&(i(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),i(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(2,V,t.backupId())),d(3),r("routerLink",R(4,q,t.backupId()))}}function ee(e,o){if(e&1&&(i(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let t=E();r("routerLink",R(1,J,t.backupId()))}}var D=class e{#t=c(G);#i=c(h);#e=c(k);#n=g(this.#t.params);#o=g(this.#t.url);#a=g(this.#t.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=C(!1);paramsChanged=N(()=>{let o=this.#a(),t=this.#n()?.id,s=!!this.#o()?.find(S=>S.path==="restore-draft"),p=!!this.#o()?.find(S=>S.path==="restore-from-files"),u=!!o?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(t,p,p||s)});ngOnInit(){this.#i.events.subscribe(o=>{if(o instanceof I){let t=o.urlAfterRedirects;this.isProgressPage.set(t.includes("progress"))}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=A({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(t,s){t&2&&L("full-width",s.isProgressPage())},features:[M([k,x])],decls:8,vars:2,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let P;P=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[o,t,s,p,u,S,f,P,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(a(0,"app-status-bar"),i(1,"spk-stepper"),$(2,Q,12,8)(3,Y,6,6)(4,Z,6,6)(5,ee,3,3,"div",9),n(),i(6,"section"),a(7,"router-outlet"),n()),t&2&&(d(2),O(s.isFileRestore()?2:s.isDraft()?3:4),d(3),O(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{a as be}from"./chunk-URU2SLPX.js";import{s as xe}from"./chunk-T2OUHRUV.js";import{a as me,f as Ce,l as Pe,n as Ee,p as ve,z as Te}from"./chunk-WX7L7V6J.js";import{h as ge}from"./chunk-4AECHE4W.js";import{i as fe}from"./chunk-CKPICCFH.js";import{$b as S,Ac as W,B as ne,Bb as z,Bc as A,Cb as B,F as q,Ib as $,Jb as ae,Kb as ce,Mb as R,Nb as u,Ob as de,Pb as D,Qa as m,Xa as K,Y as X,Yb as J,Zb as pe,_b as Y,ab as ie,bc as ue,da as N,ea as k,fb as M,mc as V,n as ee,nb as U,nc as he,ob as se,pb as T,qa as Q,r as L,ra as v,sb as F,sc as _e,ua as O,ub as re,vb as oe,wb as h,x as te,xb as f,yb as le}from"./chunk-W2F756OF.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),T("active",e.pathDiscoveryMethod()==="browse"),m(2),T("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();T("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),T("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();T("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ge);#t=X(be);multiSelect=v(!1);disabled=v(!1);showFiles=v(!1);selectFiles=v(!1);accepts=v(null);startingPath=v(null);rootPaths=v([]);backupSettings=v(null);pathRefreshTrigger=v(!1);showHiddenNodes=v(!1);hideShortcuts=v(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),T("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),T("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,Te,me,Pe,Ee,ve,fe,xe],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
1
+ import{a as be}from"./chunk-GJROCOAD.js";import{s as xe}from"./chunk-T2OUHRUV.js";import{a as me,f as Ce,l as Pe,n as Ee,p as ve,z as Te}from"./chunk-WX7L7V6J.js";import{h as ge}from"./chunk-JSGFZ2GA.js";import{i as fe}from"./chunk-CKPICCFH.js";import{$b as S,Ac as W,B as ne,Bb as z,Bc as A,Cb as B,F as q,Ib as $,Jb as ae,Kb as ce,Mb as R,Nb as u,Ob as de,Pb as D,Qa as m,Xa as K,Y as X,Yb as J,Zb as pe,_b as Y,ab as ie,bc as ue,da as N,ea as k,fb as M,mc as V,n as ee,nb as U,nc as he,ob as se,pb as T,qa as Q,r as L,ra as v,sb as F,sc as _e,ua as O,ub as re,vb as oe,wb as h,x as te,xb as f,yb as le}from"./chunk-W2F756OF.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),T("active",e.pathDiscoveryMethod()==="browse"),m(2),T("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();T("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),T("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();T("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ge);#t=X(be);multiSelect=v(!1);disabled=v(!1);showFiles=v(!1);selectFiles=v(!1);accepts=v(null);startingPath=v(null);rootPaths=v([]);backupSettings=v(null);pathRefreshTrigger=v(!1);showHiddenNodes=v(!1);hideShortcuts=v(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),T("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),T("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,Te,me,Pe,Ee,ve,fe,xe],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-RHW5QVAY.js";import{a as p}from"./chunk-I3C2AEHI.js";import{h as o}from"./chunk-4AECHE4W.js";import{E as i,F as s,P as n,S as c,Y as u,ua as a}from"./chunk-W2F756OF.js";var B="backupListOrderBy",k="backupListShowActualTimes",y=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],m=class l{#t=u(p);#i=u(o);#u=null;#e=a([]);#a=a([]);#s=a(!1);#l=a(null);#r=a(null);#c=a(this.#t.getItemParsed(k,!0)??"relative");#n=a(this.#t.getItemParsed(B,!0)??"id");orderByOptions=a(y);orderBy=this.#n.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#s.asReadonly();startingBackup=this.#l.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#e.asReadonly();addDraftBackup(e){let t=d();return this.#e.set([...this.#e(),{id:t,data:e}]),t}setOrderBy(e){this.#t.setItemParsed(B,e,!0),this.#n.set(e),this.getBackups(!0)}setTimeType(e){this.#t.setItemParsed(k,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#e.set(this.#e().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){let t=this.#u,r=Date.now(),h=t&&r-t<15*60*1e3;t&&r-t<100||!e&&h&&this.#a().length||(this.#u=r,this.#s.set(!0),this.#i.getApiV1Backups({orderBy:this.#n()}).pipe(i(1),n(b=>this.#a.set(b)),s(()=>this.#s.set(!1))).subscribe())}startBackup(e){this.#l.set(e),this.#i.postApiV1BackupByIdStart({id:e}).pipe(i(1),n(()=>this.getBackups(!0)),s(()=>this.#l.set(null))).subscribe()}deleteBackup(e){this.#r.set(e),this.#i.deleteApiV1BackupById({id:e}).pipe(i(1),s(()=>this.#r.set(null))).subscribe({next:()=>this.getBackups(!0)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{a as d}from"./chunk-RHW5QVAY.js";import{a as p}from"./chunk-I3C2AEHI.js";import{h as o}from"./chunk-JSGFZ2GA.js";import{E as i,F as s,P as n,S as c,Y as u,ua as a}from"./chunk-W2F756OF.js";var B="backupListOrderBy",k="backupListShowActualTimes",y=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],m=class l{#t=u(p);#i=u(o);#u=null;#e=a([]);#a=a([]);#s=a(!1);#l=a(null);#r=a(null);#c=a(this.#t.getItemParsed(k,!0)??"relative");#n=a(this.#t.getItemParsed(B,!0)??"id");orderByOptions=a(y);orderBy=this.#n.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#s.asReadonly();startingBackup=this.#l.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#e.asReadonly();addDraftBackup(e){let t=d();return this.#e.set([...this.#e(),{id:t,data:e}]),t}setOrderBy(e){this.#t.setItemParsed(B,e,!0),this.#n.set(e),this.getBackups(!0)}setTimeType(e){this.#t.setItemParsed(k,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#e.set(this.#e().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){let t=this.#u,r=Date.now(),h=t&&r-t<15*60*1e3;t&&r-t<100||!e&&h&&this.#a().length||(this.#u=r,this.#s.set(!0),this.#i.getApiV1Backups({orderBy:this.#n()}).pipe(i(1),n(b=>this.#a.set(b)),s(()=>this.#s.set(!1))).subscribe())}startBackup(e){this.#l.set(e),this.#i.postApiV1BackupByIdStart({id:e}).pipe(i(1),n(()=>this.getBackups(!0)),s(()=>this.#l.set(null))).subscribe()}deleteBackup(e){this.#r.set(e),this.#i.deleteApiV1BackupById({id:e}).pipe(i(1),s(()=>this.#r.set(null))).subscribe({next:()=>this.getBackups(!0)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-BVTZNGGE.js";import"./chunk-6DH6O5YE.js";import"./chunk-ORDORLQT.js";import"./chunk-GJROCOAD.js";import"./chunk-T2OUHRUV.js";import"./chunk-WX7L7V6J.js";import"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
@@ -1,2 +1,2 @@
1
- import{h as P}from"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import{$b as a,Ac as M,F as m,Nb as x,Qa as s,S as h,Y as r,ab as u,ac as y,fb as f,ob as C,sb as _,tb as v,ua as d,ub as L,vb as b,wb as o,xb as i}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=d(!1);crashLog=d(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(m(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function S(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function k(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),y(n)}}function I(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),L(3,w,2,1,"li",null,v),i()()()),e&2){let n=x();C("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var p=class e{#e=r(l);logsLoading=M(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
1
+ import{h as P}from"./chunk-JSGFZ2GA.js";import"./chunk-CKPICCFH.js";import{$b as a,Ac as M,F as m,Nb as x,Qa as s,S as h,Y as r,ab as u,ac as y,fb as f,ob as C,sb as _,tb as v,ua as d,ub as L,vb as b,wb as o,xb as i}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=d(!1);crashLog=d(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(m(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function S(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function k(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),y(n)}}function I(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),L(3,w,2,1,"li",null,v),i()()()),e&2){let n=x();C("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var p=class e{#e=r(l);logsLoading=M(()=>!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=u({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,c){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,S,2,0,"div",0)(3,k,2,0,"div",0)(4,I,5,4,"div",1)),n&2){let g;s(2),_(c.logsLoading()?2:c.crashLog()==null||((g=c.crashLog())==null?null:g.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{p as default};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-URU2SLPX.js";import{a as b,n as w}from"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import{i as A}from"./chunk-CKPICCFH.js";import{$b as p,Ac as $,Bb as u,Cb as v,Ib as P,Mb as k,Nb as s,Qa as l,Y as y,_b as C,ab as T,ac as E,da as O,ea as x,fb as a,mc as _,nb as d,nc as N,ob as h,pb as f,sb as g,sc as F,ua as m,ub as I,vb as M,wb as c,xb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
1
+ import{a as D}from"./chunk-GJROCOAD.js";import{a as b,n as w}from"./chunk-WX7L7V6J.js";import"./chunk-JSGFZ2GA.js";import{i as A}from"./chunk-CKPICCFH.js";import{$b as p,Ac as $,Bb as u,Cb as v,Ib as P,Mb as k,Nb as s,Qa as l,Y as y,_b as C,ab as T,ac as E,da as O,ea as x,fb as a,mc as _,nb as d,nc as N,ob as h,pb as f,sb as g,sc as F,ua as m,ub as I,vb as M,wb as c,xb as r}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};