@duplicati/ngclient 0.0.218 → 0.0.220

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 (134) hide show
  1. package/assets/ship.css +0 -2
  2. package/{chunk-UT42UQWA.js → chunk-22AR7ES3.js} +1 -1
  3. package/{chunk-6HY2QKBL.js → chunk-23SRH7FI.js} +1 -1
  4. package/{chunk-IHNPTBK2.js → chunk-2J2554EV.js} +1 -1
  5. package/chunk-37ODVJFS.js +1 -0
  6. package/chunk-3RCF6UT4.js +1 -0
  7. package/{chunk-DQISAVUL.js → chunk-4E7D5F6K.js} +1 -1
  8. package/chunk-4J6L5OV3.js +1 -0
  9. package/chunk-4OA2FFS5.js +1 -0
  10. package/chunk-4OJPTRZJ.js +1 -0
  11. package/{chunk-B7PXB6LO.js → chunk-5KJPC3V5.js} +1 -1
  12. package/{chunk-X6S2TQ5D.js → chunk-5RNU5BNO.js} +1 -1
  13. package/{chunk-MZAGGSG2.js → chunk-6JS7B4FW.js} +1 -1
  14. package/{chunk-7PBEL6UP.js → chunk-7C2YZVSQ.js} +1 -1
  15. package/chunk-ACTATISC.js +1 -0
  16. package/chunk-ACTJSKQZ.js +2 -0
  17. package/{chunk-OMOPTBR2.js → chunk-AIAUP7OE.js} +1 -1
  18. package/{chunk-Y3LMRA5G.js → chunk-ANSV4G2K.js} +1 -1
  19. package/{chunk-PAXRIMTV.js → chunk-BACKG7KA.js} +1 -1
  20. package/{chunk-XZS6HRVR.js → chunk-BKEJZADV.js} +2 -2
  21. package/{chunk-NXEMSNQO.js → chunk-BLSV7CNZ.js} +1 -1
  22. package/{chunk-6PPCACHR.js → chunk-BZXBH4CN.js} +1 -1
  23. package/chunk-C3PQFWVO.js +1 -0
  24. package/{chunk-O6ZQRIZA.js → chunk-C6PICAXB.js} +1 -1
  25. package/{chunk-LFWCPFV7.js → chunk-CAQ3XMFP.js} +1 -1
  26. package/chunk-DJXLNIMV.js +11 -0
  27. package/{chunk-4KFQXVKU.js → chunk-DSYNIXJF.js} +1 -1
  28. package/chunk-DSZ644JT.js +1 -0
  29. package/chunk-EADZVBRA.js +1 -0
  30. package/{chunk-Y6WYFFBC.js → chunk-EDLHTWBA.js} +1 -1
  31. package/{chunk-VJ3PK33N.js → chunk-EKVZKEQJ.js} +1 -1
  32. package/{chunk-HSAIFBZZ.js → chunk-ELCA5MKF.js} +2 -2
  33. package/chunk-EPIYGHPM.js +1 -0
  34. package/{chunk-GEATZGKK.js → chunk-EXMYBMGI.js} +1 -1
  35. package/{chunk-YEMKFHRS.js → chunk-FBU3EBFO.js} +1 -1
  36. package/{chunk-5VAN6GVG.js → chunk-FD5CKX3J.js} +1 -1
  37. package/{chunk-KDWGBKDI.js → chunk-GKGMP6VF.js} +1 -1
  38. package/chunk-GN7AO4B6.js +1 -0
  39. package/{chunk-3374ABNZ.js → chunk-GRE6GKVP.js} +2 -2
  40. package/chunk-I6MIXWIT.js +1 -0
  41. package/{chunk-TMS3I5A2.js → chunk-IFSZJSGH.js} +1 -1
  42. package/{chunk-B7CN4JEV.js → chunk-IG7XUEED.js} +1 -1
  43. package/chunk-IMQUTGIK.js +1 -0
  44. package/chunk-IQL3REGJ.js +1 -0
  45. package/chunk-IRT2UBDI.js +2 -0
  46. package/{chunk-BOD6INK4.js → chunk-JPCUISZG.js} +1 -1
  47. package/{chunk-Y4TMGQ3H.js → chunk-KDV2OE64.js} +1 -1
  48. package/{chunk-SXNQOAUJ.js → chunk-KZTFESBJ.js} +1 -1
  49. package/{chunk-X5TRWBWL.js → chunk-M3PW6DLD.js} +1 -1
  50. package/{chunk-7BK2K5ML.js → chunk-N2AU7VKX.js} +1 -1
  51. package/chunk-N3NJW75G.js +1 -0
  52. package/{chunk-5Q47XWAA.js → chunk-NHS6CQO2.js} +1 -1
  53. package/{chunk-EZZPO6ZZ.js → chunk-NKUA7I47.js} +2 -2
  54. package/chunk-NPFPMA4P.js +1 -0
  55. package/{chunk-HKQDPKTA.js → chunk-NX35OQ3V.js} +1 -1
  56. package/{chunk-AAUAZ76N.js → chunk-O2SMJYPC.js} +1 -1
  57. package/{chunk-S36F6ZJZ.js → chunk-OHYENIPP.js} +1 -1
  58. package/{chunk-MI3BETEH.js → chunk-OPHQNXYO.js} +1 -1
  59. package/chunk-P4R3ERID.js +1 -0
  60. package/chunk-PG4G4RLP.js +1 -0
  61. package/{chunk-DJIBS7A6.js → chunk-PIGMTUUT.js} +1 -1
  62. package/chunk-PXI3UZ4R.js +1 -0
  63. package/chunk-QDDVZ4CR.js +1 -0
  64. package/{chunk-JJ5XEJ75.js → chunk-QOWXL7ZL.js} +1 -1
  65. package/chunk-QZQS7M3D.js +1 -0
  66. package/{chunk-RZTMWVAA.js → chunk-RGFJ5UMA.js} +1 -1
  67. package/{chunk-54IBJBVK.js → chunk-RJ2JM7C7.js} +1 -1
  68. package/{chunk-2C3OMPC2.js → chunk-RLWICOKH.js} +1 -1
  69. package/chunk-RRDLQLTM.js +1 -0
  70. package/{chunk-SDKAVOP6.js → chunk-TCXCC5BM.js} +1 -1
  71. package/chunk-TQTOIWBK.js +4 -0
  72. package/chunk-UCHK3SHH.js +3 -0
  73. package/{chunk-AC34YYIW.js → chunk-UTXZPAY6.js} +1 -1
  74. package/chunk-VC55KFAX.js +1 -0
  75. package/chunk-VKQQDCUN.js +1 -0
  76. package/{chunk-VOHSRCTH.js → chunk-WOKYULBU.js} +1 -1
  77. package/{chunk-OZDUAVJM.js → chunk-X276XFCH.js} +1 -1
  78. package/{chunk-KQR3DEQ4.js → chunk-XDBSTUYC.js} +1 -1
  79. package/chunk-XEG3CP74.js +1 -0
  80. package/chunk-XWTB7XRI.js +1 -0
  81. package/chunk-XXVDL5TR.js +1 -0
  82. package/{chunk-FHH444ZI.js → chunk-YCJYEQF7.js} +1 -1
  83. package/chunk-YWBZLU6M.js +1 -0
  84. package/chunk-YWUUX3S6.js +1 -0
  85. package/{chunk-GIITUFAQ.js → chunk-ZC23RK4J.js} +1 -1
  86. package/{chunk-SRILTSQM.js → chunk-ZEFSBETQ.js} +1 -1
  87. package/chunk-ZHQI6LYB.js +1 -0
  88. package/chunk-ZNYN6ES6.js +1 -0
  89. package/chunk-ZNYRWXQR.js +1 -0
  90. package/{chunk-2LDEHODA.js → chunk-ZP3QZ43W.js} +1 -1
  91. package/{chunk-PSISW3DT.js → chunk-ZYRB2TUK.js} +1 -1
  92. package/index.html +2 -2
  93. package/{main-57XFFSWO.js → main-7J2QXC6H.js} +1 -1
  94. package/package.json +1 -1
  95. package/ship-ui-assets/mcp/components.json +137 -350
  96. package/styles-S2CJL4OY.css +1 -0
  97. package/chunk-4U5P2NHK.js +0 -1
  98. package/chunk-53YJLSUR.js +0 -1
  99. package/chunk-5DB5LJ2V.js +0 -1
  100. package/chunk-5QCIXYJ2.js +0 -1
  101. package/chunk-5TT43ERP.js +0 -1
  102. package/chunk-6LPGVWBH.js +0 -1
  103. package/chunk-6XWKOOJR.js +0 -1
  104. package/chunk-C56RQYG4.js +0 -2
  105. package/chunk-CL2S4OQ7.js +0 -1
  106. package/chunk-E3UAEGAI.js +0 -1
  107. package/chunk-G5IUH2UI.js +0 -1
  108. package/chunk-GNMIMW7D.js +0 -1
  109. package/chunk-GQWUTQIZ.js +0 -1
  110. package/chunk-HN6343SO.js +0 -3
  111. package/chunk-IFZC7RUJ.js +0 -2
  112. package/chunk-IM6CS76E.js +0 -1
  113. package/chunk-J6OYVDRR.js +0 -1
  114. package/chunk-JNWS5H5A.js +0 -1
  115. package/chunk-KTRNTLNO.js +0 -1
  116. package/chunk-LRZXNEAQ.js +0 -1
  117. package/chunk-NFXXT6A3.js +0 -4
  118. package/chunk-NPL5UWFD.js +0 -1
  119. package/chunk-O42PEGVX.js +0 -1
  120. package/chunk-OW2XLFBF.js +0 -1
  121. package/chunk-Q6A652RP.js +0 -1
  122. package/chunk-R3H3RDDJ.js +0 -1
  123. package/chunk-RLWCEUKT.js +0 -1
  124. package/chunk-RXWMHEJY.js +0 -1
  125. package/chunk-S235GCI6.js +0 -1
  126. package/chunk-TSDCJYMP.js +0 -1
  127. package/chunk-UOTOQXS3.js +0 -1
  128. package/chunk-V42HCQ3A.js +0 -1
  129. package/chunk-V4NNTODH.js +0 -1
  130. package/chunk-V6U75SVY.js +0 -1
  131. package/chunk-YXRM2NKT.js +0 -11
  132. package/chunk-ZJAQQH7X.js +0 -1
  133. package/chunk-ZXAPMIF3.js +0 -1
  134. package/styles-VWVVVLVS.css +0 -1
@@ -1 +1 @@
1
- import{a as F}from"./chunk-GEATZGKK.js";import{a as te}from"./chunk-5TT43ERP.js";import{e as ee}from"./chunk-MZAGGSG2.js";import{B as Q,L as Y,w as K,x as W,z as q}from"./chunk-E3UAEGAI.js";import{a as H,d as Z}from"./chunk-4KFQXVKU.js";import{b as U,d as j}from"./chunk-G5IUH2UI.js";import{$b as s,Ab as v,Bb as y,Cb as m,Db as a,Eb as l,Fb as S,Jb as k,Kb as D,Mb as u,Pa as M,Rc as h,Sa as r,Tb as G,Ub as z,Vb as _,Xc as A,Zb as p,_ as d,da as I,ea as f,gb as E,mc as V,nc as P,oc as L,pa as b,pc as J,vc as X,wb as N,wc as B,xb as T,xc as g}from"./chunk-NFXXT6A3.js";function ae(i,t){if(i&1&&(a(0,"div",11),P(1),l()),i&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function re(i,t){if(i&1&&(a(0,"div"),G(1,1),S(2,"a",15),z(),l()),i&2){let e=s();r(2),m("href",e.downloadLink(),M)}}function le(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doRepair(c.BackupID))}),_(1,2),l()}}function ce(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doDownloadBugreport(c))}),_(1,3),l()}}function _e(i,t){if(i&1&&S(0,"sh-progress-bar",17),i&2){let e,o=s(2);m("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function se(i,t){if(i&1){let e=u();a(0,"div",11),k(1),_(2,4),D(),a(3,"a",16),P(4),l(),N(5,_e,1,1,"sh-progress-bar",17),a(6,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowUpdate())}),_(7,5),l()()}if(i&2){let e,o,n=s(),c=g(0);r(3),m("href",(e=n.serverState())==null?null:e.UpdateDownloadLink,M),r(),L(c.Message),r(),T(((o=n.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function de(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return f(n.doShowLog(c.BackupID))}),_(1,6),l()}}function Ne(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function Te(i,t){if(i&1){let e=u();a(0,"button",14),p("click",function(){I(e);let n=s();return f(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ce={Error:"error",Warning:"warn",Information:"primary"},x=class i{#e=d(j);#a=d(U);#r=d(q);#t=d(W);#i=d(F);#n=d(Z);#l=d(ee);#o=b(null);serverState=this.#i.serverState;index=A.required();notification=A.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(te,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let n=H.BASE||"",c=this.#l.xsrfQueryParam(),O=`${location.origin}${n}/api/v1/bugreport/${e}?token=${o.Token}${c?`&${c}`:""}`;t.DownloadLink=O,this.#o.set(O),this.triggerDownload(O)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let n;n=$localize`Download`;let c;c=$localize`New update found:`;let O;O=$localize`Show Update`;let $;$=$localize`Show Log`;let w;w=$localize` Show Help `;let R;return R=$localize` Show Help `,[t,e,o,n,c,O,$,w,R,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1&&(X(0),a(1,"sh-alert")(2,"div",9),P(3),l(),a(4,"div",10),N(5,ae,2,1,"div",11),N(6,re,3,1,"div"),a(7,"div",12),N(8,le,2,0,"button",13),N(9,ce,2,0,"button",13),N(10,se,8,3,"div",11),N(11,de,2,0,"button",13),N(12,Ne,2,0,"button",13),N(13,Te,2,0,"button",13),a(14,"button",14),p("click",function(){return o.deleteNotificationByIndex()}),_(15,0),l()()()()),e&2){let n=B(o.notification());r(),V(o.getAlertType(n.Type)),r(2),L(n.Title),r(2),T(n.Action!=="update:new"&&n.Action!=="update:manual"?5:-1),r(),T(o.downloadLink()?6:-1),r(2),T(n.Message!=null&&n.Message.includes("please run repair")?8:-1),r(),T(n.Action!=null&&n.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),T(n.Action==="update:new"?10:-1),r(),T(n.Action==="backup:show-log"?11:-1),r(),T(n.Action==="config:issue:unencrypted-database"?12:-1),r(),T(n.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,Q,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"],changeDetection:0})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&S(0,"app-notification",1),i&2){let e=t.$implicit,o=t.$index;m("index",o)("notification",e)}}function fe(i,t){i&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ie=class i{#e=d(F);notificationFilterPredicate=A();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&v(0,Ie,1,2,"app-notification",1,pe,!1,fe,3,0,"div",2),e&2&&y(o.notifications())},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{x as a,ie as b};
1
+ import{a as F}from"./chunk-EXMYBMGI.js";import{a as te}from"./chunk-IMQUTGIK.js";import{e as ee}from"./chunk-6JS7B4FW.js";import{B as Q,L as Y,w as K,x as W,z as q}from"./chunk-VKQQDCUN.js";import{a as H,d as Z}from"./chunk-DSYNIXJF.js";import{b as U,d as j}from"./chunk-NPFPMA4P.js";import{$b as s,Ab as R,Bb as v,Cb as O,Db as a,Eb as l,Fb as S,Jb as k,Kb as D,Mb as f,Pa as M,Qc as h,Sa as r,Tb as G,Ub as z,Vb as _,Wc as A,Zb as p,_ as d,da as I,ea as u,gb as E,mc as V,nc as P,oc as y,pa as w,pc as J,vc as X,wb as N,wc as B,xb as T,xc as g}from"./chunk-TQTOIWBK.js";function ae(i,t){if(i&1&&(a(0,"div",11),P(1),l()),i&2){s();let e=g(0);r(),J(" ",e.Message," ")}}function re(i,t){if(i&1&&(a(0,"div"),G(1,1),S(2,"a",15),z(),l()),i&2){let e=s();r(2),O("href",e.downloadLink(),M)}}function le(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doRepair(c.BackupID))}),_(1,2),l()}}function ce(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doDownloadBugreport(c))}),_(1,3),l()}}function _e(i,t){if(i&1&&S(0,"sh-progress-bar",17),i&2){let e,o=s(2);O("value",(e=o.serverState())==null?null:e.UpdateDownloadProgress)}}function se(i,t){if(i&1){let e=f();a(0,"div",11),k(1),_(2,4),D(),a(3,"a",16),P(4),l(),N(5,_e,1,1,"sh-progress-bar",17),a(6,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowUpdate())}),_(7,5),l()()}if(i&2){let e,o,n=s(),c=g(0);r(3),O("href",(e=n.serverState())==null?null:e.UpdateDownloadLink,M),r(),y(c.Message),r(),T(((o=n.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function de(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s(),c=g(0);return u(n.doShowLog(c.BackupID))}),_(1,6),l()}}function Ne(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function Te(i,t){if(i&1){let e=f();a(0,"button",14),p("click",function(){I(e);let n=s();return u(n.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var Ce={Error:"error",Warning:"warn",Information:"primary"},x=class i{#e=d(j);#a=d(U);#r=d(q);#t=d(W);#i=d(F);#n=d(Z);#l=d(ee);#o=w(null);serverState=this.#i.serverState;index=A.required();notification=A.required();downloadLink=h(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(te,{maxWidth:"550px",width:"100%",data:o})}else this.#t.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#e.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let n=H.BASE||"",c=this.#l.xsrfQueryParam(),m=`${location.origin}${n}/api/v1/bugreport/${e}?token=${o.Token}${c?`&${c}`:""}`;t.DownloadLink=m,this.#o.set(m),this.triggerDownload(m)},error:o=>{this.#t.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click()}catch{}document.body.removeChild(e)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let n;n=$localize`Download`;let c;c=$localize`New update found:`;let m;m=$localize`Show Update`;let b;b=$localize`Show Log`;let L;L=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,o,n,c,m,b,L,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,o){if(e&1&&(X(0),a(1,"sh-alert")(2,"div",9),P(3),l(),a(4,"div",10),N(5,ae,2,1,"div",11),N(6,re,3,1,"div"),a(7,"div",12),N(8,le,2,0,"button",13),N(9,ce,2,0,"button",13),N(10,se,8,3,"div",11),N(11,de,2,0,"button",13),N(12,Ne,2,0,"button",13),N(13,Te,2,0,"button",13),a(14,"button",14),p("click",function(){return o.deleteNotificationByIndex()}),_(15,0),l()()()()),e&2){let n=B(o.notification());r(),V(o.getAlertType(n.Type)),r(2),y(n.Title),r(2),T(n.Action!=="update:new"&&n.Action!=="update:manual"?5:-1),r(),T(o.downloadLink()?6:-1),r(2),T(n.Message!=null&&n.Message.includes("please run repair")?8:-1),r(),T(n.Action!=null&&n.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),T(n.Action==="update:new"?10:-1),r(),T(n.Action==="backup:show-log"?11:-1),r(),T(n.Action==="config:issue:unencrypted-database"?12:-1),r(),T(n.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,Q,K],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"],changeDetection:0})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&S(0,"app-notification",1),i&2){let e=t.$implicit,o=t.$index;O("index",o)("notification",e)}}function ue(i,t){i&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var ie=class i{#e=d(F);notificationFilterPredicate=A();notifications=h(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=E({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,o){e&1&&R(0,Ie,1,2,"app-notification",1,pe,!1,ue,3,0,"div",2),e&2&&v(o.notifications())},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{x as a,ie as b};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-TCXCC5BM.js";import"./chunk-GKGMP6VF.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as RelativeTimePipe};
@@ -0,0 +1,2 @@
1
+ import{b as j}from"./chunk-IQL3REGJ.js";import{B as X,v as U,y as W}from"./chunk-VKQQDCUN.js";import{d as z}from"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as f,Ab as D,Ac as J,Bb as x,Cb as m,Db as o,Eb as r,Fb as u,Mb as C,Pa as R,Sa as a,Tb as A,Ub as y,Vb as w,Zb as S,_ as E,da as p,ea as _,gb as v,nc as s,oc as I,pa as g,pc as h,q as O,qc as B,ra as F,sc as $,tc as k,uc as G,wb as M,xb as N,yb as P,yc as V}from"./chunk-TQTOIWBK.js";import{a as T,b}from"./chunk-7CGTOI24.js";var q=()=>({maxWidth:"700px",width:"100%"});function H(l,n){if(l&1&&(o(0,"a",9)(1,"sh-icon"),s(2,"link"),r()()),l&2){let e=f().$implicit;m("href",V(e.Url),R)}}function K(l,n){if(l&1){let e=C();o(0,"div",2)(1,"h4"),s(2),M(3,H,3,2,"a",9),r(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),r()(),o(9,"div",10)(10,"button",11),S("click",function(){let i=p(e).$implicit,c=f();return _(c.openLicense(i))}),A(11,1),u(12,"sh-icon"),y(),r()()()}if(l&2){let e=n.$implicit;a(2),B(" ",e.Title," - ",e.data==null?null:e.data.license," "),a(),N(e.Url?3:-1),a(2),h(" ",e.data==null?null:e.data.description," "),a(3),I(e.data==null?null:e.data.notes)}}var L=class l{#e=E(z);licenses=j(this.#e.getApiV1Licenses().pipe(O(n=>n.map(e=>b(T({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=g(!1);dialogLicense=g(null);#n=F(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(n){this.dialogLicense.set(n)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(n){let e=n.split(`
2
+ `),t="";for(let i=0;i<e.length;i++)t+=`<li>${e[i]}</li>`;return t}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=v({type:l,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let n;n=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[n,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["shButton","","type","button",3,"click"],[3,"href"],[1,"actions"],["shButton","",3,"click"]]},template:function(e,t){if(e&1){let i=C();o(0,"h3"),w(1,0),r(),D(2,K,13,5,"div",2,P),o(4,"sh-dialog",3),G("isOpenChange",function(d){return p(i),k(t.dialogIsOpen,d)||(t.dialogIsOpen=d),_(d)}),o(5,"header",4)(6,"h3"),s(7),r()(),o(8,"div",5)(9,"div",6),s(10),r()(),o(11,"footer",7)(12,"button",8),S("click",function(){return p(i),t.dialogLicense.set(null),_(t.dialogIsOpen.set(!1))}),s(13,"Close"),r()()()}if(e&2){let i,c;a(2),x(t.licenses()),a(2),$("isOpen",t.dialogIsOpen),m("options",J(4,q)),a(3),I((i=t.dialogLicense())==null?null:i.Title);let d=((c=t.dialogLicense())==null?null:c.License)??"";a(3),h(" ",d," ")}},dependencies:[U,X,W],styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"],changeDetection:0})};export{L as default};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-O6ZQRIZA.js";import{c as j,e as q}from"./chunk-MZAGGSG2.js";import{z as b}from"./chunk-E3UAEGAI.js";import{a as x,d as v}from"./chunk-4KFQXVKU.js";import{ma as L}from"./chunk-GIITUFAQ.js";import{Gb as N,Gc as G,Hb as C,Ib as _,Ic as $,M as O,Rc as p,Sa as M,Tb as A,Ub as w,V as h,Vb as P,Wb as F,Xb as W,_ as c,f as m,g as y,gb as I,pa as n,ra as R}from"./chunk-NFXXT6A3.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{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=I({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"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),G(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),W(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;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 y,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.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=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(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=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.#t.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});#h=0;#d=null;start(){this.shouldConnect.set(!0),this.#g()}#g(){this.#d&&(clearTimeout(this.#d),this.#d=null);let e=this.#e.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 l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:i=>{console.error("Error refreshing token after WebSocket auth failed",i)}});return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#p?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),this.#d&&clearTimeout(this.#d),this.#d=setTimeout(()=>this.#g(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.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.#h}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&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=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.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.#h())}#h(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#d();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#h()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#h()},3e3)}})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
1
+ import{a as D}from"./chunk-C6PICAXB.js";import{c as j,e as q}from"./chunk-6JS7B4FW.js";import{z as b}from"./chunk-VKQQDCUN.js";import{a as x,d as v}from"./chunk-DSYNIXJF.js";import{ma as L}from"./chunk-ZC23RK4J.js";import{Fc as G,Gb as N,Hb as C,Hc as $,Ib as _,M as O,Qc as p,Sa as M,Tb as A,Ub as w,V as h,Vb as P,Wb as F,Xb as W,_ as c,f as m,g as y,gb as I,pa as n,ra as R}from"./chunk-TQTOIWBK.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=R(()=>{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=I({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"),P(2,0),C()(),N(3,"div",3)(4,"p"),A(5,1),_(6,"strong"),G(7,"number"),w(),C()()),t&2&&(M(7),F($(7,1,s.countdown(),"2.0-0")),W(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var T=class r{dialog=c(b);#e=c(v);#i=n("disconnected");#s=n(null);#t=n(-1);#r=n(0);#l=n(!1);#u=new y;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 y,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.#e.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,l=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(l),setTimeout(()=>{this.#c()},l)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#t.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,k=class r{#e=c(q);#i=c(D);dialog=c(b);#s=null;#t=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.#t.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});#h=0;#d=null;start(){this.shouldConnect.set(!0),this.#g()}#g(){this.#d&&(clearTimeout(this.#d),this.#d=null);let e=this.#e.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 l=window.location.hostname,g=x.BASE||"",f=this.#e.xsrfQueryParam(),Q=this.#i.hasWebSocketAuth()?`${t}//${l}${s}${g}/notifications${f?`?${f}`:""}`:`${t}//${l}${s}${g}/notifications?token=${e}${f?`&${f}`:""}`;this.#t.set("connecting"),this.#s=new WebSocket(Q),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e,Action:"auth"}))):this.#S()},this.#s.onmessage=d=>{if(this.#t()==="authenticating")try{let o=JSON.parse(d.data);if(o.Success){u&&console.log("WebSocket authentication successful"),this.#S();return}else if(o?.Type==="legacystatus")u&&console.log("WebSocket authentication successful"),this.#S();else{console.error("WebSocket authentication failed:",o.Message),this.#t.set("disconnected"),this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:i=>{console.error("Error refreshing token after WebSocket auth failed",i)}});return}}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#t.set("disconnected");return}try{let o=JSON.parse(d.data),a=o?.Type;if(a==="legacystatus"||a==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(a==="reply"){let i=o;i.Success||console.error("WebSocket reply error:",i.Message)}else if(a==="progress"){let i=o;u&&console.log("Received progress update:",i.Data),this.#l.set(i.Data)}else if(a==="serversettings"){let i=o;u&&console.log("Received server settings update:",i.Data),this.#u.set(i.Data)}else if(a==="taskqueue"){let i=o;u&&console.log("Received task update:",i.Data),this.#o.set(i.Data)}else if(a==="taskcompleted"){let i=o;u&&console.log("Received task completed:",i.Data),this.#p?.next(i.Data)}else if(a==="backuplist"){let i=o;u&&console.log("Received backup list update:",i.Data),this.#c.set(i.Data)}else console.warn("Unknown WebSocket message type:",a)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#t.set("disconnected");var o=d.code===4401;o&&this.#e.refreshToken().subscribe({next:()=>{this.reconnect()},error:a=>{console.error("Error refreshing token",a)}}),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),this.#d&&clearTimeout(this.#d),this.#d=setTimeout(()=>this.#g(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#t.set("disconnected")}}#S(){this.#t.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.#h}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),l=s[e];(!l||JSON.stringify(l)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#t()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#h}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var V=10,J=class r{#e=c(k);#i=c(T);#s=c(v);#t=c(D);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#t.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#e.subscribe("taskcompleted"),this.#e.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>V&&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=p(()=>this.#r()==="websocket"?this.#e.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#e.serverState():this.#i.serverState());progressState=this.#e.serverProgress;taskQueueState=this.#e.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#e.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#e.backupListState());setConnectionMethod(e){e==="websocket"?(this.#e.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#e.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#e.subscribe(e,t)}unsubscribe(e){this.#e.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(l=>l.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.#h())}#h(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#d();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>V&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#h()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#h()},3e3)}})}#d(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{k as a,J as b};
@@ -1 +1 @@
1
- import{a as f}from"./chunk-MZAGGSG2.js";import{_ as m,a as S,b as i,pa as c}from"./chunk-NFXXT6A3.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
1
+ import{a as f}from"./chunk-6JS7B4FW.js";import{_ as m,a as S,b as i,pa as c}from"./chunk-TQTOIWBK.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
@@ -1 +1 @@
1
- import{b as d}from"./chunk-J6OYVDRR.js";import{a as u,b as E}from"./chunk-OMOPTBR2.js";import{d as p}from"./chunk-4KFQXVKU.js";import{A as g,Rc as o,V as v,_ as s,pa as h,ra as l}from"./chunk-NFXXT6A3.js";import{a as i}from"./chunk-7CGTOI24.js";var A="shown-welcome-page-v1",_="hide-console-connection-status",f="disable-console-control",C="disable-tray-icon-login",S="server-listen-interface",O="allowed-hostnames",b="server-passphrase",R="update-channel",T="startup-delay",D="usage-reporter-level",N="power-mode-provider",m=class n{#t=s(p);#r=s(u);#s=s(E);#n=d(this.#t.getApiV1Serversettings());#e=h(void 0);serverSettings=o(()=>this.#e()||this.#n());#o=l(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e)});constructor(){this.#r.subscribe("serversettings")}isConsoleConnectionStatusHidden=o(()=>{let e=this.serverSettings();return e?e[_]==="True":!1});refreshServerSettings(){this.#s.getConnectionMethod()!=="websocket"&&this.#t.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e)}})}#i(e,t){var r=i({},e);for(let[a,c]of Object.entries(t))c===null?delete r[a]:r[a]=c;return r}patchServerSettings(e){let t=i({},this.serverSettings());return this.#e.set(this.#i(this.serverSettings()??{},e)),this.#t.patchApiV1Serversettings({requestBody:e}).pipe(g(r=>{throw this.#e.set(t),r}))}patchServerSetting(e,t){let r={};return r[e]=t,this.patchServerSettings(r)}setShownWelcomePage(){return this.patchServerSetting(A,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(_,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(C,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(f,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(S,e)}setRemoteAccessAllowedHostnames(e){var t={[O]:e};return this.serverSettings()?.[S]==="loopback"&&(t[S]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(b,e)}setUpdateChannel(e){return this.patchServerSetting(R,e)}setStartupDelay(e){return this.patchServerSetting(T,e)}setUsageReporterLevel(e){return this.patchServerSetting(D,e)}setPowerModeProvider(e){return this.patchServerSetting(N,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{b as d}from"./chunk-IQL3REGJ.js";import{a as u,b as E}from"./chunk-AIAUP7OE.js";import{d as p}from"./chunk-DSYNIXJF.js";import{A as g,Qc as o,V as v,_ as s,pa as h,ra as l}from"./chunk-TQTOIWBK.js";import{a as i}from"./chunk-7CGTOI24.js";var A="shown-welcome-page-v1",_="hide-console-connection-status",f="disable-console-control",C="disable-tray-icon-login",S="server-listen-interface",O="allowed-hostnames",b="server-passphrase",R="update-channel",T="startup-delay",D="usage-reporter-level",N="power-mode-provider",m=class n{#t=s(p);#r=s(u);#s=s(E);#n=d(this.#t.getApiV1Serversettings());#e=h(void 0);serverSettings=o(()=>this.#e()||this.#n());#o=l(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e)});constructor(){this.#r.subscribe("serversettings")}isConsoleConnectionStatusHidden=o(()=>{let e=this.serverSettings();return e?e[_]==="True":!1});refreshServerSettings(){this.#s.getConnectionMethod()!=="websocket"&&this.#t.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e)}})}#i(e,t){var r=i({},e);for(let[a,c]of Object.entries(t))c===null?delete r[a]:r[a]=c;return r}patchServerSettings(e){let t=i({},this.serverSettings());return this.#e.set(this.#i(this.serverSettings()??{},e)),this.#t.patchApiV1Serversettings({requestBody:e}).pipe(g(r=>{throw this.#e.set(t),r}))}patchServerSetting(e,t){let r={};return r[e]=t,this.patchServerSettings(r)}setShownWelcomePage(){return this.patchServerSetting(A,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(_,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(C,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(f,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(S,e)}setRemoteAccessAllowedHostnames(e){var t={[O]:e};return this.serverSettings()?.[S]==="loopback"&&(t[S]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(b,e)}setUpdateChannel(e){return this.patchServerSetting(R,e)}setStartupDelay(e){return this.patchServerSetting(T,e)}setUsageReporterLevel(e){return this.patchServerSetting(D,e)}setPowerModeProvider(e){return this.patchServerSetting(N,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1,2 +1,2 @@
1
- import{d as P}from"./chunk-4KFQXVKU.js";import"./chunk-7BK2K5ML.js";import"./chunk-MI3BETEH.js";import{$b as L,Ab as v,Bb as b,F as p,Gb as o,Hb as i,Rc as x,Sa as s,V as h,_ as r,gb as u,jc as E,nc as a,oc as M,pa as c,wb as f,xb as C,yb as _}from"./chunk-NFXXT6A3.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>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 O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(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(),M(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),v(3,w,2,1,"li",null,_),i()()()),e&2){let n=L();E("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var g=class e{#e=r(l);logsLoading=x(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
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,d){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,D,5,4,"div",1)),n&2){let m;s(2),C(d.logsLoading()?2:d.crashLog()==null||((m=d.crashLog())==null?null:m.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
1
+ import{d as x}from"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import"./chunk-OPHQNXYO.js";import{$b as L,Ab as _,Bb as v,F as p,Gb as o,Hb as i,Qc as M,Sa as s,V as h,_ as r,gb as u,jc as y,nc as a,oc as E,pa as c,wb as f,xb as C,yb as b}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(x);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>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 O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(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(),E(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),_(3,w,2,1,"li",null,b),i()()()),e&2){let n=L();y("grid-column","1 / -1")("height","auto"),s(3),v(n.breakIntoLines(n.crashLog()))}}var m=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
+ `):[]}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,d){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,D,5,4,"div",1)),n&2){let g;s(2),C(d.logsLoading()?2:d.crashLog()==null||((g=d.crashLog())==null?null:g.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-AC34YYIW.js";import{a as l}from"./chunk-Y3LMRA5G.js";import{xa as r}from"./chunk-GIITUFAQ.js";import{Rc as n,V as o,_ as e,ia as a,pa as t,ra as s,za as d}from"./chunk-NFXXT6A3.js";var m=class i{#i=e(c);#t=e(a);#o=e(d);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=n(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{a as c}from"./chunk-UTXZPAY6.js";import{a as l}from"./chunk-ANSV4G2K.js";import{xa as r}from"./chunk-ZC23RK4J.js";import{Qc as d,V as o,_ as e,ia as a,pa as t,ra as s,za as n}from"./chunk-TQTOIWBK.js";var m=class i{#i=e(c);#t=e(a);#o=e(n);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=d(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-S36F6ZJZ.js";import{a as Q}from"./chunk-AC34YYIW.js";import"./chunk-5TT43ERP.js";import{a as Y}from"./chunk-PAXRIMTV.js";import"./chunk-J6OYVDRR.js";import"./chunk-OMOPTBR2.js";import"./chunk-O6ZQRIZA.js";import"./chunk-MZAGGSG2.js";import{B as K,C as j,H,L as q,c as G,e as W,i as V,s as J,v as X,w as z}from"./chunk-E3UAEGAI.js";import"./chunk-4KFQXVKU.js";import{d as B,e as U}from"./chunk-G5IUH2UI.js";import"./chunk-AAUAZ76N.js";import"./chunk-7BK2K5ML.js";import"./chunk-GIITUFAQ.js";import"./chunk-MI3BETEH.js";import{$b as a,Cb as x,Db as r,Eb as l,Fb as T,Fc as A,Mb as h,Qc as R,Rc as O,Sa as s,Tb as S,Ub as P,Vb as p,Xc as I,Yb as k,Zb as E,_ as f,da as m,ea as F,gb as D,ja as b,mc as w,nc as d,pa as N,ra as y,sc as L,tc as $,uc as v,wb as c,xb as _}from"./chunk-NFXXT6A3.js";import"./chunk-7CGTOI24.js";var ee=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function te(n,t){n&1&&p(0,0,1)}function ne(n,t){n&1&&p(0,0,2)}function ie(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){m(e);let o=a(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function oe(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,te,1,0)(4,ne,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,ie,2,0,"button",9),l()),n&2){let e=a();s(3),_(e.state()==="unknown"?3:4),s(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function re(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),v("ngModelChange",function(o){m(e);let C=a();return $(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),E("click",function(){m(e);let o=a();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=a();s(3),L("ngModel",e.customRegisterUrl),s(4),x("disabled",!e.customRegisterUrlValid())}}function le(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){m(e);let o=a(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function se(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){m(e);let o=a(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function ae(n,t){if(n&1&&c(0,le,5,0)(1,se,4,0),n&2){let e=a();_(e.claimUrl()!==null?0:1)}}function ce(n,t){n&1&&(S(0,5,1),T(1,"p"),P())}function _e(n,t){n&1&&(S(0,5,2),T(1,"p"),P())}function de(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ce,2,0,"p")(3,_e,2,0,"p"),P(),l(),r(4,"button",10),E("click",function(){m(e);let o=a();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(n&2){let e=a();s(2),_(e.typeParam()==="link"?2:3)}}function Ce(n,t){n&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var M=class n{#n=f(B);#l=f(Q);#e=f(Z);#i=f(Y);isOldOpen=N(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;#t=null;#s=f(b);constructor(){this.#s.onDestroy(()=>{this.#r()})}stateEffect=y(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||R(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#a())),e==="registering"?R(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),R(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#a(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=k(u),[t,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,oe,7,2,"div",7),c(2,re,9,2),c(3,ae,2,1),c(4,de,8,1),c(5,Ce,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";w(A(7,ee,o,C,u,g,i.state()==="registered")),s(),_(o?1:-1),s(),_(C?2:-1),s(),_(i.state()==="registered"?3:-1),s(),_(g?4:-1),s(),_(u?5:-1)}},dependencies:[U,J,G,W,V,H,K,q,j,z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{M as default};
1
+ import{a as Z}from"./chunk-OHYENIPP.js";import{a as Q}from"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import{a as Y}from"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import{B as K,C as j,H,L as q,c as G,e as W,i as V,s as J,v as X,w as z}from"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import{d as B,e as U}from"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as s,Cb as x,Db as r,Eb as l,Ec as A,Fb as T,Mb as h,Pc as N,Qc as R,Sa as a,Tb as S,Ub as y,Vb as p,Wc as I,Yb as k,Zb as E,_ as f,da as m,ea as F,gb as D,ja as b,mc as w,nc as d,pa as P,ra as M,sc as L,tc as $,uc as v,wb as c,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var ee=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function te(n,t){n&1&&p(0,0,1)}function ne(n,t){n&1&&p(0,0,2)}function ie(n,t){if(n&1){let e=h();r(0,"button",10),E("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function oe(n,t){if(n&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,te,1,0)(4,ne,1,0),y(),l(),T(5,"sh-progress-bar",8),c(6,ie,2,0,"button",9),l()),n&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function re(n,t){if(n&1){let e=h();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),v("ngModelChange",function(o){m(e);let u=s();return $(u.customRegisterUrl,o)||(u.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),E("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(n&2){let e=s();a(3),L("ngModel",e.customRegisterUrl),a(4),x("disabled",!e.customRegisterUrlValid())}}function le(n,t){if(n&1){let e=h();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function ae(n,t){if(n&1){let e=h();r(0,"p"),p(1,4),l(),r(2,"button",10),E("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function se(n,t){if(n&1&&c(0,le,5,0)(1,ae,4,0),n&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ce(n,t){n&1&&(S(0,5,1),T(1,"p"),y())}function _e(n,t){n&1&&(S(0,5,2),T(1,"p"),y())}function de(n,t){if(n&1){let e=h();r(0,"sh-alert",16),S(1,5),c(2,ce,2,0,"p")(3,_e,2,0,"p"),y(),l(),r(4,"button",10),E("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(n&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function ue(n,t){n&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var O=class n{#n=f(B);#l=f(Q);#e=f(Z);#i=f(Y);isOldOpen=P(!1);typeParam=I.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=R(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=P(!1);customRegisterUrlValid=R(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(t.length===0||!e.test(t))});registeringCounter=P(null);didTry=!1;triedFinishConnection=!1;#t=null;#a=f(b);constructor(){this.#a.onDestroy(()=>{this.#r()})}stateEffect=M(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=!0,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||N(()=>this.claimUrl())!==null&&(this.triedFinishConnection=!0,this.#s())),e==="registering"?N(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o()}):(this.#r(),N(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})})});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o()},1e3)}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null)}ngOnInit(){this.#e.refreshRemoteControlStatus()}#s(){let t=this.#e.claimUrl();this.#l.open(`${t}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let u;u=$localize`Something failed during registration we're missing claimUrl, please try again`;let g;return g=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,g=k(g),[t,e,i,o,u,g,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,oe,7,2,"div",7),c(2,re,9,2),c(3,se,2,1),c(4,de,8,1),c(5,ue,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",u=i.typeParam()==="link"&&i.state()==="inactive",g=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",C=i.state()==="registeringfaulted";w(A(7,ee,o,u,g,C,i.state()==="registered")),a(),_(o?1:-1),a(),_(u?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(C?4:-1),a(),_(g?5:-1)}},dependencies:[U,J,G,W,V,H,K,q,j,z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{O as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-XXVDL5TR.js";import"./chunk-GRE6GKVP.js";import"./chunk-DJXLNIMV.js";import"./chunk-CAQ3XMFP.js";import"./chunk-VC55KFAX.js";import"./chunk-ZEFSBETQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YCJYEQF7.js";import"./chunk-OHYENIPP.js";import"./chunk-UTXZPAY6.js";import"./chunk-IMQUTGIK.js";import"./chunk-BACKG7KA.js";import"./chunk-IQL3REGJ.js";import"./chunk-AIAUP7OE.js";import"./chunk-C6PICAXB.js";import"./chunk-6JS7B4FW.js";import"./chunk-VKQQDCUN.js";import"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{d as m}from"./chunk-4KFQXVKU.js";import{F as u,N as d,Rc as s,V as p,_ as l,pa as i}from"./chunk-NFXXT6A3.js";var c=class r{#s=l(m);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],a=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...a]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(a=>a.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{d as m}from"./chunk-DSYNIXJF.js";import{F as u,N as d,Qc as s,V as p,_ as l,pa as i}from"./chunk-TQTOIWBK.js";var c=class r{#s=l(m);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],a=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...a]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(a=>a.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{b as s}from"./chunk-6Q6SSTBK.js";import{V as c}from"./chunk-NFXXT6A3.js";import{a as i}from"./chunk-7CGTOI24.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
1
+ import{b as s}from"./chunk-6Q6SSTBK.js";import{V as c}from"./chunk-TQTOIWBK.js";import{a as i}from"./chunk-7CGTOI24.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function y(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function F(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,y as b,F as c,C as d};