@duplicati/ngclient 0.0.184 → 0.0.185

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 (54) hide show
  1. package/{chunk-4UDRQ7SJ.js → chunk-27ICL4CS.js} +1 -1
  2. package/{chunk-K5BA43JC.js → chunk-42L3D2F7.js} +1 -1
  3. package/{chunk-WCU7A255.js → chunk-43HR5ZDT.js} +1 -1
  4. package/chunk-4RKO4YFU.js +1 -0
  5. package/{chunk-ECXAVCLV.js → chunk-4YC2YMYH.js} +1 -1
  6. package/{chunk-SA6T6NYJ.js → chunk-5G4V55RS.js} +1 -1
  7. package/{chunk-BZSP7EIX.js → chunk-5LYRKTAV.js} +1 -1
  8. package/{chunk-XJXBZISB.js → chunk-67L5H6HO.js} +1 -1
  9. package/{chunk-WRURLVII.js → chunk-67Q6QMQY.js} +1 -1
  10. package/chunk-A4RSARWN.js +1 -0
  11. package/{chunk-QASUFPL6.js → chunk-AV5KKRMA.js} +1 -1
  12. package/chunk-B2VS7Z6E.js +1 -0
  13. package/{chunk-MIXALKMU.js → chunk-BBRK364M.js} +1 -1
  14. package/chunk-CGQ2WKCU.js +1 -0
  15. package/{chunk-RYNESQNU.js → chunk-DUIZM4ZO.js} +1 -1
  16. package/{chunk-X7WEJAAK.js → chunk-EBSK6KZQ.js} +1 -1
  17. package/{chunk-I7DKD6VJ.js → chunk-EXFIQK72.js} +1 -1
  18. package/{chunk-VUOL2M6R.js → chunk-H5XAYRQ6.js} +1 -1
  19. package/{chunk-OKWBFXS6.js → chunk-HO5WBGKU.js} +1 -1
  20. package/{chunk-SAKHOLXS.js → chunk-HRCZ5SXI.js} +1 -1
  21. package/{chunk-TYPKT3ZZ.js → chunk-I3GPRGH5.js} +1 -1
  22. package/{chunk-LZBEKGBK.js → chunk-IQ3RNWGH.js} +1 -1
  23. package/{chunk-ES756JBG.js → chunk-JNMQJO3U.js} +1 -1
  24. package/{chunk-QQ2F3BER.js → chunk-JRJXFRW7.js} +1 -1
  25. package/{chunk-FHY4QVD4.js → chunk-JU5OZOO2.js} +1 -1
  26. package/{chunk-DUVQ5DQX.js → chunk-LJ2P7K2Z.js} +1 -1
  27. package/{chunk-WDMQH4ZC.js → chunk-LVX3DTQM.js} +1 -1
  28. package/{chunk-RFA232NB.js → chunk-MM36XELZ.js} +1 -1
  29. package/{chunk-CCM6IIS4.js → chunk-MNHB4VKJ.js} +1 -1
  30. package/{chunk-QNAAXVL5.js → chunk-NF4VR5PI.js} +1 -1
  31. package/{chunk-SL454JCD.js → chunk-OITOOW5H.js} +1 -1
  32. package/{chunk-THM235PB.js → chunk-P3AUEHHI.js} +1 -1
  33. package/{chunk-E7TXHOJI.js → chunk-QEE2RRQ4.js} +1 -1
  34. package/{chunk-IMDBR2SZ.js → chunk-QIUMBQM5.js} +1 -1
  35. package/{chunk-GYUN5SXR.js → chunk-QKYDZL4G.js} +1 -1
  36. package/{chunk-DWRVQLJL.js → chunk-QT7EG3ZF.js} +1 -1
  37. package/{chunk-36YDXQGU.js → chunk-RD5JFFHQ.js} +1 -1
  38. package/{chunk-FPDCZ73R.js → chunk-SJTXV6AC.js} +1 -1
  39. package/{chunk-6JEFZ6UK.js → chunk-UAMORY54.js} +1 -1
  40. package/{chunk-4VCGLPSI.js → chunk-UFTPS2J6.js} +1 -1
  41. package/{chunk-NL7JLA2L.js → chunk-V42KLXW4.js} +1 -1
  42. package/{chunk-7E34ZROH.js → chunk-VGYWG5A3.js} +1 -1
  43. package/{chunk-NV45UNPE.js → chunk-WA53HHVH.js} +1 -1
  44. package/{chunk-OG6NP7IP.js → chunk-WVF3GRDZ.js} +1 -1
  45. package/{chunk-MBWEBR5X.js → chunk-XUPDFNDB.js} +1 -1
  46. package/{chunk-VAXPG4R2.js → chunk-YYSJESAX.js} +1 -1
  47. package/{chunk-4OE4TUF6.js → chunk-ZTDAMLNP.js} +1 -1
  48. package/index.html +1 -1
  49. package/{main-GZ3TBDRZ.js → main-BV7ROS25.js} +1 -1
  50. package/package.json +1 -1
  51. package/chunk-FPYNIDJR.js +0 -1
  52. package/chunk-G4SK3PS7.js +0 -1
  53. package/chunk-KONVFYXE.js +0 -1
  54. package/chunk-SJWKQCBL.js +0 -1
package/chunk-G4SK3PS7.js DELETED
@@ -1 +0,0 @@
1
- import{a as l,c as _}from"./chunk-BGTK25UG.js";import{d as b}from"./chunk-A4LPGPDU.js";import{a as O,d as T}from"./chunk-QPTSKQZ2.js";import{ua as P,va as i}from"./chunk-OTPG7USH.js";import{C as c,E as N,M as h,R as a,W as s,f as S,i as E,l as A,la as n,p as R,wa as v,z as y}from"./chunk-T2WO6CVD.js";var f=class r{platformId=s(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return i(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return P(this.platformId)?localStorage.length:0}getItem(e){return i(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){i(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!i(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){i(this.platformId)||localStorage.clear()}clear(){if(!i(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return i(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};function k(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function L(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function V(){let r=k();if(r&&r.length>0){let e=r;e.startsWith("/")||(e=`/${e}`),e.endsWith("/")&&(e=e.slice(0,-1)),l.BASE=e}else l.BASE=""}var u=class r{#s=s(f);#o=n(null);#t=window.self!==window.top&&L();#r=n(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let p=this.#s.getItem("locale")??"en-US",I=o.locale??"en-US";p!==I&&(this.#s.setItem("locale",I),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var d="PROXY_AUTHED_FAKE_TOKEN",g="refreshNonce",m="v1:persist:duplicati:refreshNonce",$=class r{#s=s(b);#o=s(T);#t=s(_);#r=s(u);#e=n(null);#i=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#i.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(g);return}t?localStorage.setItem(m,e||""):sessionStorage.setItem(g,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(g),t=localStorage.getItem(m),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(c(1),h(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set(d),new S(o=>{o.next({AccessToken:d}),o.complete()});let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(c(1),h(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}))}checkProxyAuthed(){let e=new O({"custom-proxy-check":"true"}),t=l.BASE||"";return this.#o.get(`${t}/api/v1/systeminfo`,{headers:e}).pipe(R(()=>(this.#e.set(d),!0)),y(()=>A(!1)))}logout(){this.#i.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(g),t&&localStorage.removeItem(m),this.#t.postApiV1AuthRefreshLogout(e).pipe(c(1),N(()=>{this.#i.set(!1),this.#e.set(null),this.#s.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{f as a,V as b,u as c,d,$ as e};
package/chunk-KONVFYXE.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-36YDXQGU.js")},{path:"destination",loadComponent:()=>import("./chunk-DWRVQLJL.js")},{path:"source-data",loadComponent:()=>import("./chunk-X7WEJAAK.js")},{path:"schedule",loadComponent:()=>import("./chunk-MBWEBR5X.js")},{path:"options",loadComponent:()=>import("./chunk-QASUFPL6.js")}];export{o as default};
package/chunk-SJWKQCBL.js DELETED
@@ -1 +0,0 @@
1
- import{a as v}from"./chunk-TELPJYLN.js";import{c as j,e as x}from"./chunk-G4SK3PS7.js";import{z as f}from"./chunk-HPNLQHW6.js";import{a as $,c as b}from"./chunk-BGTK25UG.js";import{ka as L}from"./chunk-OTPG7USH.js";import{Cb as N,Cc as G,Db as y,Eb as I,Ec as W,L as E,Mc as h,Pa as R,Pb as _,Qb as A,R as p,Rb as w,Sb as P,Tb as F,W as c,cb as M,f as m,g as k,la as n,na as O}from"./chunk-T2WO6CVD.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/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(t){return new(t||r)};static \u0275cmp=M({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$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:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),w(2,0),y()(),N(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),G(7,"number"),A(),y()()),t&2&&(R(7),P(W(7,1,s.countdown(),"2.0-0")),F(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var D=class r{dialog=c(f);#t=c(b);#i=n("disconnected");#s=n(null);#e=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c(j).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(E(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(a),setTimeout(()=>{this.#c()},a)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#e.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,T=class r{#t=c(x);#i=c(v);dialog=c(f);#s=null;#e=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#p=null;taskCompleted=new m(e=>{this.#p=e});#d=0;start(){this.#h(),this.shouldConnect.set(!0)}#h(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,g=$.BASE||"",J=this.#i.hasWebSocketAuth()?`${t}//${a}${s}${g}/notifications`:`${t}//${a}${s}${g}/notifications?token=${e}`;this.#e.set("connecting"),this.#s=new WebSocket(J),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#S()},this.#s.onmessage=d=>{if(this.#e()==="authenticating")try{let i=JSON.parse(d.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#S()):(console.error("WebSocket authentication failed:",i.Message),this.#e.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#e.set("disconnected");return}try{let i=JSON.parse(d.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#r.set(i);else if(l==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(l==="progress"){let o=i;u&&console.log("Received progress update:",o.Data),this.#l.set(o.Data)}else if(l==="serversettings"){let o=i;u&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(l==="taskqueue"){let o=i;u&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(l==="taskcompleted"){let o=i;u&&console.log("Received task completed:",o.Data),this.#p?.next(o.Data)}else if(l==="backuplist"){let o=i;u&&console.log("Received backup list update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#e.set("disconnected"),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#h(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#e.set("disconnected")}}#S(){this.#e.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#e()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};var q=10,V=class r{#t=c(T);#i=c(D);#s=c(b);#e=c(v);#r=n("longpoll");#l=n(!1);#u=h(()=>this.#e.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>q&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=h(()=>this.#r()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=h(()=>this.#r()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=h(()=>this.#r()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=h(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#p()})}#p(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#h();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>q&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#h(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,V as b};