@duplicati/ngclient 0.0.72 → 0.0.74

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 (57) hide show
  1. package/chunk-2R6YFVI3.js +1 -0
  2. package/{chunk-C4F4MUPA.js → chunk-43QTP63M.js} +1 -1
  3. package/{chunk-KIR7XCMT.js → chunk-4KMNVH5V.js} +1 -1
  4. package/{chunk-76TXW7BV.js → chunk-5KGMNBD7.js} +1 -1
  5. package/chunk-65ULQ2PN.js +1 -0
  6. package/{chunk-NIP3HERY.js → chunk-6JYRURGN.js} +1 -1
  7. package/{chunk-4BB6E7IE.js → chunk-73LQ5WSC.js} +1 -1
  8. package/{chunk-NGOETFI3.js → chunk-77KHDJR7.js} +1 -1
  9. package/{chunk-EDK7X7O7.js → chunk-AF7PONVK.js} +1 -1
  10. package/{chunk-64ENL5GH.js → chunk-BEBLA2OU.js} +1 -1
  11. package/{chunk-AGCYH6MA.js → chunk-BY56DZ7Y.js} +1 -1
  12. package/{chunk-ARE7IWR6.js → chunk-BZKHWYFG.js} +1 -1
  13. package/{chunk-YMOY5EMW.js → chunk-C6ELLTE3.js} +1 -1
  14. package/{chunk-Q5EMYWV3.js → chunk-CAGBL2MP.js} +1 -1
  15. package/{chunk-PQKOLCEE.js → chunk-D6FCW3QQ.js} +1 -1
  16. package/{chunk-REA5KDFD.js → chunk-EHIW67S3.js} +1 -1
  17. package/{chunk-YQGJVNGF.js → chunk-FJPFD4BF.js} +1 -1
  18. package/{chunk-KTPNIKXO.js → chunk-FLOZ6FQA.js} +1 -1
  19. package/chunk-GJ6GRAEW.js +1 -0
  20. package/{chunk-I24WOYYC.js → chunk-GXX5QXLE.js} +1 -1
  21. package/{chunk-CZCBXB2D.js → chunk-JZCJ723Q.js} +1 -1
  22. package/{chunk-6DHAM3ZG.js → chunk-KYQC46J2.js} +1 -1
  23. package/{chunk-7UYVE2SG.js → chunk-L5ZZZJEY.js} +1 -1
  24. package/{chunk-DNWGFNME.js → chunk-LJFKKI57.js} +1 -1
  25. package/{chunk-3FZUYC7D.js → chunk-MLT3FZMW.js} +1 -1
  26. package/{chunk-53QX2PXI.js → chunk-MLTG5TKC.js} +1 -1
  27. package/chunk-NQVULKI2.js +1 -0
  28. package/{chunk-Q3GNE2V2.js → chunk-OT7JK3TS.js} +1 -1
  29. package/{chunk-Z35537MB.js → chunk-PHQYY3GW.js} +1 -1
  30. package/{chunk-F542ZCQR.js → chunk-PRKOHXBN.js} +1 -1
  31. package/{chunk-PO2RDC4E.js → chunk-RIRYVDWF.js} +1 -1
  32. package/{chunk-2BHHXTPG.js → chunk-RNE5BRDO.js} +1 -1
  33. package/{chunk-TY6F5J2H.js → chunk-ROIHQL5Y.js} +1 -1
  34. package/{chunk-SPPLR4O6.js → chunk-SBFFXENC.js} +1 -1
  35. package/chunk-TB27CACB.js +1 -0
  36. package/{chunk-AMEYNNK2.js → chunk-VJQDP23H.js} +1 -1
  37. package/{chunk-SIIP4YWD.js → chunk-VKMKZKNR.js} +1 -1
  38. package/chunk-VUVQIS7G.js +1 -0
  39. package/chunk-WDE7EXR6.js +1 -0
  40. package/{chunk-YAE3TU4E.js → chunk-X6RAHZJI.js} +1 -1
  41. package/{chunk-TQX52V4E.js → chunk-Y7LSDVD6.js} +1 -1
  42. package/chunk-YOLNXRDT.js +1 -0
  43. package/{chunk-HDCC66NC.js → chunk-Z2E5LWHA.js} +1 -1
  44. package/chunk-Z43CKK5H.js +6 -0
  45. package/index.html +1 -1
  46. package/main-UH5FBFO3.js +1 -0
  47. package/package.json +1 -1
  48. package/chunk-2P3GS5BJ.js +0 -1
  49. package/chunk-7I3L3TYU.js +0 -6
  50. package/chunk-ASPLJ6GL.js +0 -1
  51. package/chunk-CP2S6DC4.js +0 -1
  52. package/chunk-GDWXEPO2.js +0 -1
  53. package/chunk-SVRIHRMT.js +0 -1
  54. package/chunk-TLVMA6DU.js +0 -1
  55. package/chunk-UXWUA3GY.js +0 -1
  56. package/chunk-WDEJO2DY.js +0 -1
  57. package/main-KN334FZC.js +0 -1
package/main-KN334FZC.js DELETED
@@ -1 +0,0 @@
1
- import{b as ie,c as ae}from"./chunk-ANP5WEOJ.js";import{a as L}from"./chunk-22GS6UCG.js";import{a as re}from"./chunk-NGOETFI3.js";import{a as y}from"./chunk-4RXB65JX.js";import{a as I}from"./chunk-I24WOYYC.js";import{a as oe}from"./chunk-ASPLJ6GL.js";import{a as b,b as u}from"./chunk-CP2S6DC4.js";import"./chunk-6TZWRTRA.js";import{a as w}from"./chunk-2P3GS5BJ.js";import{d as te}from"./chunk-KJ4O6F3R.js";import{b as Z,c as Q,f as Y,g as ee}from"./chunk-ETEYALHD.js";import{a as X}from"./chunk-TS4YY2WO.js";import{c as ne}from"./chunk-TLVMA6DU.js";import{a as $,b as K,d as z,e as _,f as q}from"./chunk-6LUM2XU4.js";import{ua as B}from"./chunk-3WKDD2IN.js";import{b as se}from"./chunk-GK7T43YY.js";import{Dc as D,Eb as F,Ec as G,F as v,L as j,N as S,Oc as J,P as H,T as R,Z as r,d as P,eb as W,ja as U,m as E,q as O,va as d,y as N,z as x}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var M=class e{#o=r(y);#s=r(b);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=W({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&F(0,"router-outlet")},dependencies:[Z],encapsulation:2})};var ce={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var T=class e{#o=r(te);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),v(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})};var fe=()=>{let e=r(w);return e.token()?!0:e.refreshToken().pipe(O(()=>!0))},ge=()=>{let e=r(b),o=r(I),t=r(U),n=e.relayIsEnabled()?"longpoll":"websocket",p=[t.get(L).preload(!0),t.get(L).preloadFilterGroups(!0),t.get(T).preload(!0)];return e.configLoaded===null?N(p).pipe(O(()=>n)):e.configLoaded?.pipe(S(()=>N(p)))},le=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-F542ZCQR.js")},{path:"logout",loadComponent:()=>import("./chunk-EDK7X7O7.js")},{path:"",canActivate:[fe],children:[{path:"",canActivate:[ge],loadComponent:()=>import("./chunk-WDEJO2DY.js"),children:[{path:"",loadComponent:()=>import("./chunk-TQX52V4E.js")},{path:"add-backup",loadComponent:()=>import("./chunk-Q3GNE2V2.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-ARE7IWR6.js")},{path:"backup/import",loadComponent:()=>import("./chunk-7UYVE2SG.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-HDCC66NC.js"),loadChildren:()=>import("./chunk-GDWXEPO2.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-HDCC66NC.js"),loadChildren:()=>import("./chunk-GDWXEPO2.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-REA5KDFD.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-3FZUYC7D.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-YQGJVNGF.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-TY6F5J2H.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-DNWGFNME.js")},{path:"from-config",loadComponent:()=>import("./chunk-76TXW7BV.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-C4F4MUPA.js"),loadChildren:()=>import("./chunk-SVRIHRMT.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-C4F4MUPA.js"),loadChildren:()=>import("./chunk-SVRIHRMT.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-C4F4MUPA.js"),loadChildren:()=>import("./chunk-SVRIHRMT.js")},{path:"settings",loadComponent:()=>import("./chunk-UXWUA3GY.js")},{path:"about",loadComponent:()=>import("./chunk-YMOY5EMW.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-SIIP4YWD.js")},{path:"changelog",loadComponent:()=>import("./chunk-2QQJM43S.js")},{path:"libraries",loadComponent:()=>import("./chunk-AMEYNNK2.js")},{path:"system-info",loadComponent:()=>import("./chunk-AGCYH6MA.js")},{path:"logs",loadComponent:()=>import("./chunk-64ENL5GH.js")}]}]}]}]}];var A=null,me=(e,o)=>{let t=r(w),n=r(Q),p=r(y),i=r(u),m=p.getItem("locale"),s=r(ne),c=ie(m),f=e.url==="/api/v1/auth/login",l=e;if(t.token()&&e.url.startsWith(i.baseUrl)){let a=e.headers.set("Authorization",`Bearer ${t.token()}`);m&&m!=="en-US"&&(a=a.set("X-Ui-Language",c)),l=e.clone({headers:a})}return o(l).pipe(x(a=>{if(s.error(a.message),!f&&a.status===401&&!A&&(A=t.refreshToken().pipe(j())),!f&&a.status===401)return A.pipe(S(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))),x(g=>(n.navigate(["/logout"]),E(()=>g))),v(()=>A=null));let h=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:h}))}))};var ye="1.0.0",de="portal-proxy-client",be=1,k=class e{#o=1e3;#s=r(u);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=J(()=>{let o=this.#i(),t=this.#l(),n=this.#a();if(!n||!o||!t||t<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(o){let t=Uint8Array.from(atob(o),p=>p.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t){let n=t?.reconnect??!1;this.#e&&this.wsState()==="authenticated"&&!n||(this.#e&&this.wsState()!=="authenticated"&&this.#e.close(),this.#e=new WebSocket(this.#s.machineServerUrl),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(o),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let s={token:o,publicKey:"",clientVersion:ye,protocolVersion:be},c=this.createResponse(i,"authportal",s);this.#t.set("welcome"),this.#e?.send(c)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var m=JSON.parse(i.payload??"");if(m.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let s=this.#p.pop();s&&this.#r[s.messageId]&&this.activateCommand(s)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let s=this.#r[i.messageId];if(s){if(i.errorMessage){s.reject(i.errorMessage);return}else{let c=JSON.parse(i.payload??"");c.body=c?.body==null?null:this.utf8Atob(c.body),s.resolve(c)}delete this.#r[i.messageId],window.clearTimeout(s.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let p={from:de,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(p)}sendCommand(o,t,n,p,i,m,s=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o),new Promise((c,f)=>{let l=crypto.randomUUID(),h={from:de,to:t,type:"command",messageId:l,payload:JSON.stringify({method:n,path:p,body:i,headers:m})},g={resolve:c,reject:f,timer:window.setTimeout(()=>{let C=this.#r[l];C&&(delete this.#r[l],C.reject("Timeout"))},s)};this.#r[l]=g,this.#n()?this.activateCommand(h):this.#p.push(h)})}activateCommand(o){this.#e?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ce(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}var ue=(e,o)=>{let n=r(b).config(),p=r(u);if(n===null)return o(e);let i=r(k),m=Ce(e.body),s={};e.headers.keys().forEach(a=>{s[a]=e.headers.get(a)??""});let c=e.headers.get("timeout"),f=c!==null?parseInt(c):p.defaultTimeout,l=i.sendCommand(n.accessToken,n.clientId,e.method,e.url,m,s,f);return new P(a=>{l.then(h=>{let g=new $;s!=null&&Object.keys(s).forEach(V=>{g.set(V,s[V])});let C=new K({body:h.body,status:h.code,statusText:"OK",headers:g});a.next(C),a.complete()})})};var he={providers:[D(),Y(le,ee()),z(q(),_([ue,me])),y,{provide:u,useValue:ce},{provide:G,useValue:ae()},re,I,se,B,oe]};X(M,he);