@duplicati/ngclient 0.0.131 → 0.0.133

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 (115) hide show
  1. package/assets/spk.css +0 -3
  2. package/chunk-2VN6VG4I.js +1 -0
  3. package/{chunk-FPLBURO5.js → chunk-2YHX57UE.js} +1 -1
  4. package/{chunk-YFRT24NZ.js → chunk-32H7KC5E.js} +1 -1
  5. package/chunk-3EVYTAP3.js +1 -0
  6. package/{chunk-JWFYA3TO.js → chunk-3Q5JEF3K.js} +1 -1
  7. package/{chunk-EKZRKTLM.js → chunk-4MAZCWVO.js} +1 -1
  8. package/{chunk-ZE5QAS4M.js → chunk-5CUMYXCI.js} +1 -1
  9. package/{chunk-KA4H3PM5.js → chunk-5MMV45NA.js} +1 -1
  10. package/{chunk-K5AQUIEE.js → chunk-5RPDEEQ3.js} +1 -1
  11. package/{chunk-WY2KPAVB.js → chunk-67XQIEG5.js} +1 -1
  12. package/{chunk-K6EZTPNQ.js → chunk-67YRCRMI.js} +6 -6
  13. package/chunk-7RNTRIB4.js +3 -0
  14. package/chunk-7V6ZELYA.js +1 -0
  15. package/{chunk-4D2NUH5S.js → chunk-A7BFGBWF.js} +1 -1
  16. package/{chunk-R43ZLOB3.js → chunk-ACVXVBJ2.js} +1 -1
  17. package/chunk-AUWIW323.js +1 -0
  18. package/{chunk-RFBJR3ZC.js → chunk-B3N2KM6G.js} +1 -1
  19. package/{chunk-TUOSYDUU.js → chunk-BD5AB4OK.js} +1 -1
  20. package/{chunk-VNYGRDVP.js → chunk-BKHSNMGE.js} +1 -1
  21. package/{chunk-P4ZYFRD3.js → chunk-BSRYIN2F.js} +1 -1
  22. package/chunk-BWJZ3AMO.js +1 -0
  23. package/{chunk-DDV32SDB.js → chunk-CHCHAUQD.js} +1 -1
  24. package/{chunk-Q5QHAGHB.js → chunk-D3OE4S5N.js} +1 -1
  25. package/{chunk-LQ2PCH6Q.js → chunk-DLVU5GHR.js} +1 -1
  26. package/chunk-DNBOZ26J.js +1 -0
  27. package/{chunk-7LEXBIXG.js → chunk-DQM3ATT4.js} +1 -1
  28. package/chunk-EBYGIC45.js +1 -0
  29. package/chunk-EGCW3WY7.js +1 -0
  30. package/{chunk-Z2VKXGKY.js → chunk-EK2B2CO4.js} +1 -1
  31. package/{chunk-UHRBTTCA.js → chunk-EW3XN62R.js} +1 -1
  32. package/{chunk-XD26KCAE.js → chunk-F66HJES7.js} +1 -1
  33. package/{chunk-3PYBMCOB.js → chunk-FC45TEB6.js} +1 -1
  34. package/chunk-FX2XKS5C.js +1 -0
  35. package/chunk-G6LCHQJE.js +1 -0
  36. package/chunk-GORQL5YP.js +1 -0
  37. package/{chunk-VKD4Y3YQ.js → chunk-GP2W7XZF.js} +1 -1
  38. package/{chunk-MXNLMTFY.js → chunk-GQTJISMN.js} +1 -1
  39. package/chunk-HJQBTK5I.js +1 -0
  40. package/{chunk-KV7SEZ24.js → chunk-HPZ6HLJE.js} +1 -1
  41. package/{chunk-HWCTRSCV.js → chunk-IVP5ZHDB.js} +1 -1
  42. package/{chunk-Z24H5QI5.js → chunk-J64ETWKB.js} +1 -1
  43. package/chunk-KAKRPBPP.js +1 -0
  44. package/{chunk-K5P3KNHL.js → chunk-L6BZ6TEU.js} +1 -1
  45. package/{chunk-Q3ILJYED.js → chunk-LSNBRSNG.js} +1 -1
  46. package/chunk-LXZXQU7D.js +1 -0
  47. package/{chunk-BISTLAYK.js → chunk-MDO4PWV6.js} +1 -1
  48. package/{chunk-W2XSKJJ5.js → chunk-MOOM536C.js} +1 -1
  49. package/chunk-MVJXYZIV.js +1 -0
  50. package/chunk-NUL6XFC4.js +1 -0
  51. package/{chunk-WWHML7QK.js → chunk-O4HSW7GI.js} +1 -1
  52. package/{chunk-UVLJAD66.js → chunk-OQHMS5HM.js} +1 -1
  53. package/{chunk-LZGUK3CQ.js → chunk-PEPDXQBY.js} +1 -1
  54. package/{chunk-P45GAY6A.js → chunk-PETCW5PK.js} +1 -1
  55. package/{chunk-ABF3SFY5.js → chunk-PL2MNRTA.js} +1 -1
  56. package/chunk-PTFQBTH3.js +1 -0
  57. package/{chunk-KU6D4KVX.js → chunk-Q2YREFUE.js} +1 -1
  58. package/{chunk-D6CQCWWK.js → chunk-QNWYJ7OR.js} +1 -1
  59. package/chunk-SUMEJCXQ.js +1 -0
  60. package/chunk-T27DQWUZ.js +1 -0
  61. package/{chunk-CPQOWCF6.js → chunk-TIPHYMRQ.js} +1 -1
  62. package/{chunk-FWZV4DTQ.js → chunk-TKOD3RB3.js} +1 -1
  63. package/chunk-TVOVJS5N.js +1 -0
  64. package/{chunk-76QLZQIX.js → chunk-U44OBOIE.js} +1 -1
  65. package/{chunk-GU7U3EFF.js → chunk-UD32EXWK.js} +1 -1
  66. package/chunk-UUOPMSDB.js +1 -0
  67. package/chunk-VFFFKPK4.js +6 -0
  68. package/chunk-VNTD2QIZ.js +1 -0
  69. package/{chunk-CYLI6ZJ3.js → chunk-VWH7EODO.js} +1 -1
  70. package/{chunk-U4OAPG74.js → chunk-WBYTRHI7.js} +1 -1
  71. package/{chunk-E4Z6XEMU.js → chunk-WCMRN2KQ.js} +1 -1
  72. package/{chunk-F74MXVWD.js → chunk-WZIEF5KL.js} +1 -1
  73. package/chunk-X4NRDSTJ.js +1 -0
  74. package/chunk-X7GQQCVS.js +1 -0
  75. package/{chunk-KQAO2YHR.js → chunk-XBP565VF.js} +1 -1
  76. package/{chunk-FWVOVJCG.js → chunk-XD6MBGQY.js} +1 -1
  77. package/chunk-XHUQCM6F.js +1 -0
  78. package/chunk-XKDJSEMU.js +1 -0
  79. package/{chunk-B5FKLIHW.js → chunk-Y4VREVFM.js} +1 -1
  80. package/{chunk-XOZRQBBW.js → chunk-YPAIKA7K.js} +1 -1
  81. package/chunk-ZCT7SRIM.js +1 -0
  82. package/{chunk-WIJ3HW7I.js → chunk-ZIJ7ZEHR.js} +1 -1
  83. package/index.html +2 -2
  84. package/{main-JMFOP3Z7.js → main-BQ3NFYOR.js} +1 -1
  85. package/package.json +1 -1
  86. package/styles-4QA7NM7N.css +1 -0
  87. package/chunk-3IRKJXHE.js +0 -6
  88. package/chunk-3KIPRGE2.js +0 -1
  89. package/chunk-5PEBIF7G.js +0 -1
  90. package/chunk-5ZODA7EN.js +0 -1
  91. package/chunk-AGU2PEL5.js +0 -1
  92. package/chunk-CTRHZCKS.js +0 -1
  93. package/chunk-DM2VSIZA.js +0 -1
  94. package/chunk-FLMFEFKM.js +0 -1
  95. package/chunk-FO4W6SOP.js +0 -1
  96. package/chunk-GGT3NXAX.js +0 -1
  97. package/chunk-GW37Y5Z7.js +0 -1
  98. package/chunk-IAE5MH6W.js +0 -1
  99. package/chunk-LPSXYSH2.js +0 -1
  100. package/chunk-LXOONGVP.js +0 -1
  101. package/chunk-MHALSLG3.js +0 -1
  102. package/chunk-N334RUEQ.js +0 -1
  103. package/chunk-OMZ3W4RW.js +0 -1
  104. package/chunk-R3TWV35H.js +0 -4
  105. package/chunk-RVLLX2SW.js +0 -1
  106. package/chunk-RZWJA6W3.js +0 -3
  107. package/chunk-TOP2X7ZJ.js +0 -1
  108. package/chunk-UFZFKKK7.js +0 -1
  109. package/chunk-UIC4BWTY.js +0 -1
  110. package/chunk-UUG7G5LZ.js +0 -1
  111. package/chunk-UYWLCW5G.js +0 -1
  112. package/chunk-XHQO75TB.js +0 -1
  113. package/chunk-YBFTPRR5.js +0 -1
  114. package/chunk-YXIITZFM.js +0 -1
  115. package/styles-ORRIWQJ5.css +0 -1
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-EBYGIC45.js";import{a as Re}from"./chunk-ZIJ7ZEHR.js";import{a as rt,b as Ve,c as _t}from"./chunk-5RPDEEQ3.js";import{a as ae}from"./chunk-67XQIEG5.js";import{a as ot}from"./chunk-FC45TEB6.js";import{a as Ee}from"./chunk-2YHX57UE.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as lt,i as oe,j as he,k as Pe,n as at,o as Ne,p as st,q as De,r as Me,s as le,t as ye}from"./chunk-ZCT7SRIM.js";import{b as ne,d as H}from"./chunk-DQM3ATT4.js";import{A as Se,C as nt,a as j,b as Je,e as et,g as ie,l as q,p as tt,t as Y}from"./chunk-DNBOZ26J.js";import{h as it}from"./chunk-XD6MBGQY.js";import{Bb as x,F as we,Fc as R,Gc as me,Hb as g,Ib as C,Jb as T,Kc as ve,Lc as Be,Mb as Ue,Mc as Fe,Nb as F,Oa as r,Ob as u,S as pe,Wb as de,X as D,Xb as ge,Yb as Ge,_a as z,_b as Ce,ba as c,bc as I,ca as p,cc as xe,db as Ye,dc as Ze,gc as O,hc as $,ic as w,la as m,ob as Qe,pb as M,qb as y,qc as be,rb as ke,sb as Le,tb as Ie,ub as E,vb as a,wb as s,xb as d,yb as v,zb as B}from"./chunk-67YRCRMI.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var Oe=class l{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};function Ct(l,t){if(l&1){let e=x();a(0,"div",24)(1,"spk-form-field")(2,"label",25),T(3,7),s(),a(4,"input",26,0),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),F("focus",function(){c(e);let i=Ge(5);return p(i.showPicker())}),s(),a(6,"spk-icon",27),I(7,"clock"),s()(),a(8,"spk-form-field"),d(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),F("focus",function(){c(e);let i=Ge(11);return p(i.showPicker())}),s(),a(12,"spk-icon",27),I(13,"calendar"),s()()(),a(14,"div",24)(15,"spk-form-field")(16,"label",30),T(17,8),s(),a(18,"input",31),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),s()(),a(19,"spk-select",32)(20,"input",33),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),s()()(),a(21,"app-toggle-card",34),v(22,35),T(23,9),B(),a(24,"div",36)(25,"spk-toggle",19),g(26,10),a(27,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),s(),C(),s(),a(28,"spk-toggle",19),g(29,11),a(30,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),s(),C(),s(),a(31,"spk-toggle",19),g(32,12),a(33,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),s(),C(),s(),a(34,"spk-toggle",19),g(35,13),a(36,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),s(),C(),s(),a(37,"spk-toggle",19),g(38,14),a(39,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),s(),C(),s(),a(40,"spk-toggle",19),g(41,15),a(42,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),s(),C(),s(),a(43,"spk-toggle",19),g(44,16),a(45,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),s(),C(),s()()()}if(l&2){let e=u();r(4),O("ngModel",e.scheduleFields.nextTime().time),r(6),O("ngModel",e.scheduleFields.nextTime().date),r(8),O("ngModel",e.scheduleFields.runAgain().repeatValue),r(),E("options",e.unitOptions)("isClearable",!1),r(),O("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),E("disallowToggle",!0),r(6),O("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],te={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class l{#e=D(J);#t=D(H);#i=D(ne);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let S;S=$localize`Run again every`;let A;A=$localize`Allowed days`;let k;k=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,_,S,A,k,U,h,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),T(1,2),s(),a(2,"div",18)(3,"spk-toggle",19),g(4,3),a(5,"input",20),w("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),s(),C(),s(),a(6,"p"),T(7,4),s()(),M(8,Ct,46,14),a(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),g(11,5),d(12,"spk-icon"),C(),s(),a(13,"button",23),F("click",function(){return n.next()}),g(14,6),d(15,"spk-icon"),C(),s()()),e&2&&(r(5),O("ngModel",n.scheduleFields.autoRun),r(3),y(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Pe,Te,Z,oe,q,Se,j,ie,Y,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(l,t){if(l&1&&(v(0,4),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(l,t){if(l&1&&(v(0,5),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class l{path=Be.required();osType=Be();pathChange=ve();remove=ve();internalPath=m("");pathType=m("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=me(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(a(0,"spk-select",0)(1,"input",1),w("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s()(),a(2,"spk-form-field",2)(3,"input",3),w("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s(),M(4,Ft,2,1,"ng-container",4),M(5,St,2,1,"ng-container",5),s(),a(6,"div",6),F("click",function(){return n.removeFilter()}),a(7,"spk-icon",7),I(8,"x-circle"),s()()),e&2){let i,o;E("options",n.expressionOptions())("isClearable",!1),r(),O("ngModel",n.pathType),r(2),O("ngModel",n.internalPath),r(),y(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),r(),y(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,oe,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(l,t){if(l&1){let e=x();a(0,"spk-form-field",42)(1,"input",43),w("ngModelChange",function(i){c(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),s()(),a(2,"button",44),F("click",function(){c(e);let i=u(2);return p(i.updatePath())}),a(3,"spk-icon"),I(4,"floppy-disk"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"spk-icon"),I(7,"x-bold"),s()()}if(l&2){let e=u(2);r(),O("ngModel",e.editingPath),E("ngModelOptions",be(2,ct))}}function At(l,t){if(l&1){let e=x();a(0,"spk-form-field",42),d(1,"input",45),s(),a(2,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"spk-icon"),I(4,"pen"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"spk-icon"),I(7,"trash-simple"),s()()}if(l&2){let e=u().$implicit;Qe("readonly",!0),r(),E("ngModel",e)("ngModelOptions",be(3,ct))}}function ht(l,t){if(l&1&&(a(0,"div",30),M(1,ft,8,3)(2,At,8,4),s()),l&2){let e=t.$implicit,n=u();r(),y(n.oldPath()===e?1:2)}}function Pt(l,t){if(l&1){let e=x();a(0,"app-new-filter",47),F("pathChange",function(i){let o=c(e).$index,_=u(2);return p(_.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),s()}if(l&2){let e=t.$implicit,n=u(2);E("path",e)("osType",n.osType()??"")}}function Nt(l,t){if(l&1&&Le(0,Pt,1,2,"app-new-filter",46,ke),l&2){let e=u();Ie(e.pathArray())}}function Dt(l,t){if(l&1&&(a(0,"div",41)(1,"spk-form-field"),d(2,"input",48),s(),a(3,"spk-select",49),d(4,"input",50),s()()),l&2){let e=u();r(3),E("options",e.sizeOptions())("isClearable",!1)}}var V=new Me,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(l={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(l.path),excludes:V.group({hidden:V.control(l.excludes.hidden),system:V.control(l.excludes.system),temporary:V.control(l.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class l{#e=D(J);#t=D(H);#i=D(ne);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new lt("");filesLargerThan=R(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=m(Mt);osType=this.#e.osType;pathSignal=ae(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=m(null);editingPath=m(null);addingNewPath=m(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),o=this.pathArray().map((_,S)=>S===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&de(n.formRef,Tt,5),e&2&&ge()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let _;_=$localize`Source Data`;let S;S=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let k;k=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let U;U=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let re;re=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let f;f=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],_,S,A,k,U,h,L,K,b,X,N,ee,re,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),F("submit",function(){return c(i),p(n.next())}),a(2,"div",17)(3,"h3",18),T(4,1),s(),a(5,"app-file-tree",19)(6,"label",20),T(7,2),s(),d(8,"input",21),s(),a(9,"div",22)(10,"button",23),F("click",function(){return c(i),p(n.goBack())}),g(11,3),d(12,"spk-icon"),C(),s(),a(13,"button",24),g(14,4),d(15,"spk-icon"),C(),s()()(),a(16,"div",25)(17,"app-toggle-card",26),v(18,27),T(19,5),B(),a(20,"p",28),T(21,6),s(),a(22,"div",29),Le(23,ht,3,1,"div",30,ke),a(25,"div",31)(26,"spk-form-field"),d(27,"input",32),s(),a(28,"button",33),F("click",function(){return c(i),p(n.addNewPath())}),a(29,"spk-icon"),I(30,"plus"),s()()()()(),a(31,"app-toggle-card",26),v(32,27),T(33,7),B(),a(34,"p",28),T(35,8),s(),a(36,"button",34),F("click",function(){return c(i),p(n.addFilter())}),T(37,9),s(),M(38,Nt,2,0),s(),a(39,"app-toggle-card",35),v(40,27),T(41,10),B(),a(42,"p",28),T(43,11),s(),a(44,"spk-toggle",36),g(45,12),d(46,"input",37),C(),s(),a(47,"spk-toggle",36),g(48,13),d(49,"input",38),C(),s(),a(50,"spk-toggle",36),g(51,14),d(52,"input",39),C(),s(),a(53,"spk-toggle",40),F("click",function(){return c(i),p(n.toggleFilesLargerThan())}),T(54,15),s(),M(55,Dt,5,2,"div",41),s()()()}if(e&2){let i;E("formGroup",n.sourceDataForm),r(5),E("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),E("disallowToggle",!0),r(6),Ie(n.nonFilterPaths()),r(4),E("formControl",n.newPathCtrl),r(4),E("disallowToggle",!0),r(7),y((i=n.pathSignal())!=null&&i.length?38:-1),r(),E("disallowToggle",!0),r(14),Ce("active",n.filesLargerThan()),r(2),y(n.filesLargerThan()?55:-1)}},dependencies:[le,he,Q,Pe,Te,Z,Ae,oe,ye,at,Ne,De,st,q,j,ie,Se,Y,$e,ut,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class l{#e=D(H);#t=D(Ee);#i=D(et);#n=D(it);#o=D(Oe);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:m(te.autoRun),nextTime:m(te.nextTime),runAgain:m(te.runAgain)};settings=m([]);optionsFields={remoteVolumeSize:m("50MB"),backupRetention:m("all"),backupRetentionTime:m(""),backupRetentionVersions:m(0),backupRetentionCustom:m("")};targetUrlModel=m(null);oauthServiceLink=R(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=R(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=m(!1);backupId=m(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=m(!1);finishedLoading=m(!1);backupDefaults=m(null);applicationOptions=m(null);isNew=R(()=>this.backupId()==="new");osType=R(()=>this.#t.systemInfo()?.OSType);selectedOptions=m([]);sourceDataFormSignal=ae(this.sourceDataForm.valueChanges);generalFormSignal=ae(this.generalForm.valueChanges);encryptionFieldSignal=ae(this.generalForm.controls.encryption.valueChanges);destinationOptions=R(()=>this.#t.backendModules()??[]);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#l)??[]);#l(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[He,...t]});nonSelectedOptions=R(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#s(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#a(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#a(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(S=>`${S.Include?"":"-"}${S.Expression}`)??[],i=t.Settings?.find(S=>S.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(S=>S.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",o={name:t.Name??"",description:t.Description??""};i&&i!==""&&(o.encryption=i),n&&n!==""&&(o.password=n,o.repeatPassword=n),this.generalForm.patchValue(o)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#r(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var o="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(o)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#s(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let _=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,L])=>L).map(([h,L])=>h):[],S=n.path?.split("\0")??[],A=this.mapFormsToSettings(),k=Object.entries(n.excludes??{}).filter(([h,L])=>L&&h!=="filesLargerThan").map(([h])=>h),U=n.excludes?.filesLargerThan;return k.length&&A.push({Name:"--exclude-files-attributes",Value:k.join(",")}),U&&U.size!==null&&U.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${U.size}${U.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:S.filter(h=>!h.startsWith("-")),Settings:A,Filters:S.filter(h=>h.startsWith("-")).map((h,L)=>({Order:L,Include:!1,Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:_}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":o.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":o.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":o.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":o.push({Name:"retention-policy",Value:dt});break}let _=[...t,...n],S=this.settings().filter(A=>!_.includes(A.Name)).map(A=>{let k=A.Value;return typeof A.Value=="number"&&(k=A.Value.toString()),typeof A.Value=="boolean"&&(k=A.Value?"True":"False"),{Name:A.Name,Value:k}});return[...i,...o,...S]}#r(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#a(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(l,t){l&1&&(a(0,"spk-alert",17),g(1,5),d(2,"spk-icon",26),C(),s())}function Ot(l,t){if(l&1&&I(0),l&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(l,t){if(l&1&&d(0,"spk-progress-bar",40),l&2){let e=u(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),E("value",e.calculatePasswordStrength()*(100/5))}}function wt(l,t){l&1&&(a(0,"span",35),T(1,10),s())}function kt(l,t){l&1&&(g(0,8,1),d(1,"spk-icon"),C())}function Lt(l,t){l&1&&(g(0,8,2),d(1,"spk-icon"),C())}function It(l,t){l&1&&(g(0,11,1),d(1,"spk-icon",42),C())}function Ut(l,t){l&1&&(g(0,11,2),d(1,"spk-icon"),C())}function Gt(l,t){if(l&1){let e=x();a(0,"button",41),F("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),g(1,11),M(2,It,2,0)(3,Ut,2,0),C(),s()}if(l&2){let e=u(3);r(2),y(e.copiedPassword()?2:3)}}function xt(l,t){l&1&&(a(0,"spk-alert",39),T(1,12),s())}function bt(l,t){if(l&1){let e=x();a(0,"div",30)(1,"spk-form-field")(2,"label",31),g(3,7),d(4,"sup"),C(),s(),d(5,"input",32),s(),M(6,$t,1,9,"spk-progress-bar",33),a(7,"spk-form-field"),d(8,"input",34),M(9,wt,2,0,"span",35),s(),a(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),g(12,8),M(13,kt,2,0)(14,Lt,2,0),C(),s(),a(15,"button",37),F("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),g(16,9),d(17,"spk-icon"),C(),s(),M(18,Gt,4,1,"button",38),s(),M(19,xt,2,0,"spk-alert",39),s()}if(l&2){let e=u(2);r(5),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.password?6:-1),r(2),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),y(e.showPassword()?13:14),r(5),y(e.showCopyPassword()?18:-1),r(),y(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function vt(l,t){if(l&1&&(a(0,"spk-select",27)(1,"label",28),T(2,6),s(),d(3,"input",29),Ye(4,Ot,1,1,"ng-template"),s(),M(5,bt,20,7,"div",30)),l&2){let e=u();E("options",e.encryptionOptions())("isClearable",!1),r(5),y(e.encryptionFieldSignal()!==""?5:-1)}}function Bt(l,t){if(l&1&&(a(0,"button",24),g(1,13),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(l,t){if(l&1&&(a(0,"button",25),g(1,14),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var se=new Me,gt=(l={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>se.group({name:se.control(l.name,[fe.required]),description:se.control(l.description),encryption:se.control(l.encryption,[_t()]),password:se.control(l.password,[Ve(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:se.control(l.repeatPassword,[Ve(t=>t?.value.encryption!=="",[fe.required])])}),He={Key:"",DisplayName:"None"},je=class l{#e=D(H);#t=D(ne);#i=D(rt);#n=D(J);#o=D(Ee);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=m(!1);copiedPassword=m(!1);showCopyPassword=m(!1);encryptionEffect=me(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#l(t??""),this.copiedPassword.set(!0)}async#l(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[He,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&de(n.formRef,yt,5),e&2&&ge()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let S;S=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let U;U=$localize`Encryption`;let h;h=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ue(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let N;N=$localize`Passwords do not match`;let ee;ee=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ee=Ue(ee);let re;re=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,_,S,A,U,K,b,X,N,ee,re,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),F("submit",function(){return c(i),p(n.next())}),a(2,"h3",16),T(3,1),s(),M(4,Rt,3,0,"spk-alert",17),a(5,"spk-form-field")(6,"label",18),g(7,2),d(8,"sup"),C(),s(),d(9,"input",19),s(),a(10,"spk-form-field")(11,"label",20),T(12,3),s(),d(13,"textarea",21),s(),M(14,vt,6,3),a(15,"div",22)(16,"button",23),F("click",function(){return c(i),p(n.exit())}),g(17,4),d(18,"spk-icon"),C(),s(),M(19,Bt,3,1,"button",24)(20,Vt,3,1,"button",25),s()()}if(e&2){let i;E("formGroup",n.generalForm),r(4),y(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),y(n.isNew()?14:-1),r(5),y(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[ye,he,Q,Z,Ae,Ne,De,q,Y,ie,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,He as b,je as c,te as d,Ke as e,pt as f,ze as g,J as h};
@@ -1 +1 @@
1
- import{b as re}from"./chunk-WY2KPAVB.js";import{a as ne}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import{a as ie}from"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import{a as te}from"./chunk-JWFYA3TO.js";import{b as oe,e as ae,h as le,s as _e}from"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{d as q,e as H}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-MHALSLG3.js";import{h as ee}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Gc as B,Jb as c,Kb as D,Lb as S,Mb as F,Mc as j,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,r as K,rc as v,sc as z,ub as A,vb as i,vc as V,wb as o,yc as W}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
1
+ import{b as re}from"./chunk-67XQIEG5.js";import{a as ne}from"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import{a as ie}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{a as te}from"./chunk-3Q5JEF3K.js";import{b as oe,e as ae,i as le,s as _e}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as q,e as H}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-DNBOZ26J.js";import{h as ee}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Fc as B,Jb as c,Kb as D,Lb as S,Lc as j,Mb as F,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,qc as v,r as K,rc as z,ub as A,uc as V,vb as i,wb as o,xc as W}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
@@ -1 +1 @@
1
- import{d as b}from"./chunk-UVLJAD66.js";import"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{g as h}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Jb as c,Oa as u,Pb as f,Qb as l,X as p,_a as s,bc as O,pb as _,qb as C,vb as t,wb as i,xb as g}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(f(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),l(7),t(8,"footer"),l(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function y(n,o){n&1&&(t(0,"h3"),c(1,0),i())}function S(n,o){n&1&&(t(0,"h3"),c(1,1),i(),t(2,"button",3),c(3,2),i())}var d=class n{#e=p(b);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,y,2,0,"h3")(2,S,4,0),i()),e&2&&(u(),C(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
1
+ import{d as b}from"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{g as h}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Jb as c,Oa as u,Pb as f,Qb as l,X as p,_a as s,bc as O,pb as _,qb as C,vb as t,wb as i,xb as g}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(f(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),l(7),t(8,"footer"),l(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function y(n,o){n&1&&(t(0,"h3"),c(1,0),i())}function S(n,o){n&1&&(t(0,"h3"),c(1,1),i(),t(2,"button",3),c(3,2),i())}var d=class n{#e=p(b);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,y,2,0,"h3")(2,S,4,0),i()),e&2&&(u(),C(a.isLoggingOut()?1:2))},dependencies:[r,h],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-4MAZCWVO.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as Dt,b as mt}from"./chunk-VFFFKPK4.js";import"./chunk-5MMV45NA.js";import{c as gt}from"./chunk-FX2XKS5C.js";import{h as dt}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import{a as b}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{c as st,e as Ft,f as lt,g as ct,i as ut,j as _t,r as pt,s as Tt}from"./chunk-ZCT7SRIM.js";import{b as Z,d as tt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as et,b as nt,d as it,e as ot,l as at,o as rt}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as g,F as L,Fc as A,Hb as d,Ib as D,Jb as N,Kb as z,Lb as X,Mb as W,Mc as J,Nb as _,Oa as F,Ob as l,Wb as j,X as C,Xb as H,_a as V,_b as Q,ba as c,bc as O,ca as u,cc as B,dc as q,fa as K,gc as I,hc as E,ic as k,la as p,pb as S,qb as f,qc as Y,rb as $,sb as P,tb as M,ub as h,vb as a,wb as r,xb as T,yb as x,zb as U}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Ct=["formRef"],St=()=>({maxWidth:"700px",width:"100%"});function ft(o,e){o&1&&(d(0,2,2),T(1,"spk-icon"),D())}function Nt(o,e){o&1&&N(0,2,3)}function Ot(o,e){if(o&1){let t=g();d(0,2,1),a(1,"button",16),_("click",function(){c(t);let n=l();return u(n.testDestination())}),S(2,ft,2,0)(3,Nt,1,0),r(),D()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),f(t.successfulTest()?2:3)}}function It(o,e){if(o&1){let t=g();a(0,"p",22),_("click",function(){c(t);let n=l();return u(n.removeDestination())}),d(1,5),T(2,"strong")(3,"br")(4,"span",23),D(),r()}if(o&2){let t,i=l();F(4),z((t=i.selectedDestinationType())==null?null:t.displayName),X(1)}}function Et(o,e){if(o&1){let t=g();a(0,"div",29),_("click",function(){let n=c(t).$implicit,s=l(2);return u(s.setDestination(n.key))}),a(1,"h3"),O(2),r(),a(3,"p"),O(4),r()()}if(o&2){let t=e.$implicit;F(2),B(t.displayName),F(2),B(t.description)}}function kt(o,e){if(o&1){let t=g();a(0,"button",30,1),_("click",function(){let n=c(t).$implicit,s=l(2);return u(s.setDestination(n.key))}),O(2),r()}if(o&2){let t=e.$implicit;F(2),q(" ",t.displayName," ")}}function At(o,e){if(o&1&&(a(0,"div",24),P(1,Et,5,2,"div",25,$),r(),a(3,"spk-menu",26)(4,"button",27),N(5,6),r(),x(6,15),P(7,kt,3,1,"button",28,$),U(),r()),o&2){let t=l();F(),M(t.destinationTypeOptionsFocused()),F(2),h("searchable",!0),F(4),M(t.destinationTypeOptionsNotFocused())}}function yt(o,e){if(o&1){let t=g();a(0,"app-single-destination",31),k("targetUrlChange",function(n){c(t);let s=l();return E(s.targetUrlModel,n)||(s.targetUrlModel=n),u(n)}),r()}if(o&2){let t=l();I("targetUrl",t.targetUrlModel)}}function $t(o,e){if(o&1){let t=g();a(0,"spk-dialog",32),k("isOpenChange",function(n){c(t);let s=l();return E(s.targetUrlDialogOpen,n)||(s.targetUrlDialogOpen=n),u(n)}),a(1,"header",33)(2,"h2"),N(3,7),r(),a(4,"spk-alert",34),N(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),k("ngModelChange",function(n){c(t);let s=l();return E(s.targetUrlCtrl,n)||(s.targetUrlCtrl=n),u(n)}),r()()(),a(9,"footer",37)(10,"button",19),_("click",function(){c(t);let n=l();return u(n.closeTargetUrlDialog(!1))}),O(11,"Cancel"),r(),a(12,"button",38),_("click",function(){c(t);let n=l();return u(n.closeTargetUrlDialog(!0))}),d(13,9),T(14,"spk-icon"),D(),r()()()}if(o&2){let t=l();I("isOpen",t.targetUrlDialogOpen),h("options",Y(3,St)),F(8),I("ngModel",t.targetUrlCtrl)}}var y=new pt,jt=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Ht=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:i})=>y.group({destinationType:y.control(o),custom:e,dynamic:t,advanced:i}),R=class o{#e=C(tt);#n=C(Z);#t=C(dt);#i=C(ot);#o=C(Dt);injector=C(K);formRef=J.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);successfulTest=p(!1);testLoading=p(!1);destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=p(gt.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description})));destinationTypeOptionsFocused=A(()=>{let e=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return e.map(i=>t.find(n=>n.key===i))});selectedDestinationType=A(()=>{let e=this.#t.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return this.destinationTypeOptions().find(n=>t===n.key)});destinationTypeOptionsNotFocused=A(()=>{let e=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(i=>!e.includes(i.key))});openTargetUrlDialog(){let e=this.#t.targetUrlModel();this.targetUrlCtrl.set(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),i=this.targetUrlInitial();!e||t===i||!t||this.#t.setTargetUrl(t)}testDestination(e=0){let t=this.#t.targetUrlModel();t&&(this.testLoading.set(!0),this.#o.testDestination(t,e,!0).pipe(L(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#t.isNew()&&(i.containsBackup===!0?this.#i.open(b,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(b,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}let n=t.includes("?");i.action==="trust-cert"&&this.#t.setTargetUrl(t+`${n?"&":"?"}accept-specified-ssl-hash=${i.certData}`),i.action==="approve-host-key"&&this.#t.setTargetUrl(t+`${n?"&":"?"}ssh-fingerprint=${i.reportedHostKey}`),i.testAgain&&this.testDestination(i.destinationIndex)}}))}setDestination(e){this.#t.setTargetUrl(`${e}://`)}removeDestination(){this.#t.setTargetUrl(null)}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#t.isNew()||this.#t.submit(!0),this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-destination"]],viewQuery:function(t,i){t&1&&j(i.formRef,Ct,5),t&2&&H()},decls:24,vars:5,consts:()=>{let e;e=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,e=W(e);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let i;i=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let n;n=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let w;w=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let v;return v=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],e,t,i,n,s,w,G,v,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,i){if(t&1){let n=g();a(0,"form",10,0),_("submit",function(){return c(n),u(i.next())}),a(2,"header")(3,"h3",11),d(4,2),a(5,"div",12),S(6,Ot,4,5,"button",13),a(7,"spk-menu")(8,"button",14),T(9,"spk-icon"),r(),x(10,15),a(11,"button",16),_("click",function(){return c(n),u(i.openTargetUrlDialog())}),T(12,"spk-icon"),r(),U(),r()(),D(),r(),S(13,It,5,1,"p"),r(),S(14,At,9,1),S(15,yt,1,1,"app-single-destination",17),a(16,"div",18)(17,"button",19),_("click",function(){return c(n),u(i.goBack())}),d(18,3),T(19,"spk-icon"),D(),r(),a(20,"button",20),d(21,4),T(22,"spk-icon"),D(),r()()(),S(23,$t,15,4,"spk-dialog",21)}if(t&2){let n=!!i.targetUrlModel();F(6),f(n?6:-1),F(7),f(n?13:-1),F(),f(n?-1:14),F(),f(n?15:-1),F(8),f(i.targetUrlDialogOpen()?23:-1)}},dependencies:[mt,Tt,_t,st,Ft,lt,ut,ct,at,rt,et,it,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{jt as createDestinationForm,Ht as createDestinationFormGroup,R as default};
@@ -1,2 +1,2 @@
1
- import{a as q}from"./chunk-WY2KPAVB.js";import{a as W,d as X,g as z}from"./chunk-MHALSLG3.js";import{h as J}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as f,Hb as A,Hc as G,Ib as D,Jb as y,La as k,Nb as C,Oa as r,Ob as S,X as h,_a as F,ba as d,bc as s,ca as _,cc as I,dc as L,ec as w,gc as N,hc as $,ic as B,la as m,mc as V,pb as v,qb as M,r as E,rb as P,rc as U,sb as R,tb as x,ub as g,vb as o,wb as a,xb as u}from"./chunk-K6EZTPNQ.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{a as q}from"./chunk-67XQIEG5.js";import{a as W,d as X,g as z}from"./chunk-DNBOZ26J.js";import{h as J}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as f,Gc as G,Hb as A,Ib as D,Jb as y,La as k,Nb as C,Oa as r,Ob as S,X as h,_a as F,ba as d,bc as s,ca as _,cc as I,dc as L,ec as w,gc as N,hc as $,ic as B,la as m,mc as V,pb as v,qb as M,qc as U,r as E,rb as P,sb as R,tb as x,ub as g,vb as o,wb as a,xb as u}from"./chunk-67YRCRMI.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let i=0;i<e.length;i++)n+=`<li>${e[i]}</li>`;return n}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=F({type:l,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let i=f();o(0,"h3"),y(1,0),a(),R(2,H,13,5,"div",2,P),o(4,"spk-dialog",3),B("isOpenChange",function(p){return d(i),$(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),o(5,"header",4)(6,"h3"),s(7),a()(),o(8,"div",5)(9,"div",6),s(10),a()(),o(11,"footer",7)(12,"button",8),C("click",function(){return d(i),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),s(13,"Close"),a()()()}if(e&2){let i,c;r(2),x(n.licenses()),r(2),N("isOpen",n.dialogIsOpen),g("options",U(4,K)),r(3),I((i=n.dialogLicense())==null?null:i.Title);let p=((c=n.dialogLicense())==null?null:c.License)??"";r(3),L(" ",p," ")}},dependencies:[W,z,X],styles:["[_nghost-%COMP%]{display:block}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{b as default};
@@ -1,2 +1,2 @@
1
- import{wa as T}from"./chunk-VKD4Y3YQ.js";var d=":",x="|",B="@@",v="\u241F",E;function N(e){E??=new TextEncoder;let t=E.encode(e),n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=$(n,t.length,0),l=$(n,t.length,102072);return s==0&&(l==0||l==1)&&(s=s^319790063,l=l^-1801410264),BigInt.asUintN(32,BigInt(s))<<BigInt(32)|BigInt.asUintN(32,BigInt(l))}function C(e,t=""){let n=N(e);return t&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(t)),BigInt.asUintN(63,n).toString()}function $(e,t,n){let s=2654435769,l=2654435769,a=0,o=t-12;for(;a<=o;a+=12){s+=e.getUint32(a,!0),l+=e.getUint32(a+4,!0),n+=e.getUint32(a+8,!0);let i=R(s,l,n);s=i[0],l=i[1],n=i[2]}let r=t-a;return n+=t,r>=4?(s+=e.getUint32(a,!0),a+=4,r>=8?(l+=e.getUint32(a,!0),a+=4,r>=9&&(n+=e.getUint8(a++)<<8),r>=10&&(n+=e.getUint8(a++)<<16),r===11&&(n+=e.getUint8(a++)<<24)):(r>=5&&(l+=e.getUint8(a++)),r>=6&&(l+=e.getUint8(a++)<<8),r===7&&(l+=e.getUint8(a++)<<16))):(r>=1&&(s+=e.getUint8(a++)),r>=2&&(s+=e.getUint8(a++)<<8),r===3&&(s+=e.getUint8(a++)<<16)),R(s,l,n)[2]}function R(e,t,n){return e-=t,e-=n,e^=n>>>13,t-=n,t-=e,t^=e<<8,n-=e,n-=t,n^=t>>>13,e-=t,e-=n,e^=n>>>12,t-=n,t-=e,t^=e<<16,n-=e,n-=t,n^=t>>>5,e-=t,e-=n,e^=n>>>3,t-=n,t-=e,t^=e<<10,n-=e,n-=t,n^=t>>>15,[e,t,n]}function z(e,t,n,s,l=[]){let a={},o={},r={},i=y(e[0],e.raw[0]),u=[i.text],I=[],h=i.text;for(let c=1;c<e.length;c++){let{messagePart:S,placeholderName:f=P(c),associatedMessageId:A}=j(e[c],e.raw[c]);h+=`{$${f}}${S}`,t!==void 0&&(a[f]=t[c-1],o[f]=l[c-1]),I.push(f),A!==void 0&&(r[f]=A),u.push(S)}let L=i.customId||C(h,i.meaning||""),b=i.legacyIds?i.legacyIds.filter(c=>c!==L):[];return{id:L,legacyIds:b,substitutions:a,substitutionLocations:o,text:h,customId:i.customId,meaning:i.meaning||"",description:i.description||"",messageParts:u,messagePartLocations:s,placeholderNames:I,associatedMessageIds:r,location:n}}function y(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{text:n};{let[l,...a]=s.split(v),[o,r]=l.split(B,2),[i,u]=o.split(x,2);return u===void 0&&(u=i,i=void 0),u===""&&(u=void 0),{text:n,meaning:i,description:u,customId:r,legacyIds:a}}}function j(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{messagePart:n};{let[l,a]=s.split(B);return{messagePart:n,placeholderName:l,associatedMessageId:a}}}function O(e,t){if(t.charAt(0)!==d)return{text:e};{let n=_(e,t);return{block:e.substring(1,n),text:e.substring(n+1)}}}function P(e){return e===1?"PH":`PH_${e-1}`}function _(e,t){for(let n=1,s=1;n<e.length;n++,s++)if(t[s]==="\\")s++;else if(e[n]===d)return n;throw new Error(`Unterminated $localize metadata block in "${t}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(t){super(`No translation found for ${U(t)}.`),this.parsedMessage=t}};function D(e,t,n){let s=z(t,n),l=e[s.id];if(s.legacyIds!==void 0)for(let a=0;a<s.legacyIds.length&&l===void 0;a++)l=e[s.legacyIds[a]];if(l===void 0)throw new m(s);return[l.messageParts,l.placeholderNames.map(a=>{if(s.substitutions.hasOwnProperty(a))return s.substitutions[a];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${U(s)}.
1
+ import{wa as T}from"./chunk-GP2W7XZF.js";var d=":",x="|",B="@@",v="\u241F",E;function N(e){E??=new TextEncoder;let t=E.encode(e),n=new DataView(t.buffer,t.byteOffset,t.byteLength),s=$(n,t.length,0),l=$(n,t.length,102072);return s==0&&(l==0||l==1)&&(s=s^319790063,l=l^-1801410264),BigInt.asUintN(32,BigInt(s))<<BigInt(32)|BigInt.asUintN(32,BigInt(l))}function C(e,t=""){let n=N(e);return t&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(t)),BigInt.asUintN(63,n).toString()}function $(e,t,n){let s=2654435769,l=2654435769,a=0,o=t-12;for(;a<=o;a+=12){s+=e.getUint32(a,!0),l+=e.getUint32(a+4,!0),n+=e.getUint32(a+8,!0);let i=R(s,l,n);s=i[0],l=i[1],n=i[2]}let r=t-a;return n+=t,r>=4?(s+=e.getUint32(a,!0),a+=4,r>=8?(l+=e.getUint32(a,!0),a+=4,r>=9&&(n+=e.getUint8(a++)<<8),r>=10&&(n+=e.getUint8(a++)<<16),r===11&&(n+=e.getUint8(a++)<<24)):(r>=5&&(l+=e.getUint8(a++)),r>=6&&(l+=e.getUint8(a++)<<8),r===7&&(l+=e.getUint8(a++)<<16))):(r>=1&&(s+=e.getUint8(a++)),r>=2&&(s+=e.getUint8(a++)<<8),r===3&&(s+=e.getUint8(a++)<<16)),R(s,l,n)[2]}function R(e,t,n){return e-=t,e-=n,e^=n>>>13,t-=n,t-=e,t^=e<<8,n-=e,n-=t,n^=t>>>13,e-=t,e-=n,e^=n>>>12,t-=n,t-=e,t^=e<<16,n-=e,n-=t,n^=t>>>5,e-=t,e-=n,e^=n>>>3,t-=n,t-=e,t^=e<<10,n-=e,n-=t,n^=t>>>15,[e,t,n]}function z(e,t,n,s,l=[]){let a={},o={},r={},i=y(e[0],e.raw[0]),u=[i.text],I=[],h=i.text;for(let c=1;c<e.length;c++){let{messagePart:S,placeholderName:f=P(c),associatedMessageId:A}=j(e[c],e.raw[c]);h+=`{$${f}}${S}`,t!==void 0&&(a[f]=t[c-1],o[f]=l[c-1]),I.push(f),A!==void 0&&(r[f]=A),u.push(S)}let L=i.customId||C(h,i.meaning||""),b=i.legacyIds?i.legacyIds.filter(c=>c!==L):[];return{id:L,legacyIds:b,substitutions:a,substitutionLocations:o,text:h,customId:i.customId,meaning:i.meaning||"",description:i.description||"",messageParts:u,messagePartLocations:s,placeholderNames:I,associatedMessageIds:r,location:n}}function y(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{text:n};{let[l,...a]=s.split(v),[o,r]=l.split(B,2),[i,u]=o.split(x,2);return u===void 0&&(u=i,i=void 0),u===""&&(u=void 0),{text:n,meaning:i,description:u,customId:r,legacyIds:a}}}function j(e,t){let{text:n,block:s}=O(e,t);if(s===void 0)return{messagePart:n};{let[l,a]=s.split(B);return{messagePart:n,placeholderName:l,associatedMessageId:a}}}function O(e,t){if(t.charAt(0)!==d)return{text:e};{let n=_(e,t);return{block:e.substring(1,n),text:e.substring(n+1)}}}function P(e){return e===1?"PH":`PH_${e-1}`}function _(e,t){for(let n=1,s=1;n<e.length;n++,s++)if(t[s]==="\\")s++;else if(e[n]===d)return n;throw new Error(`Unterminated $localize metadata block in "${t}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(t){super(`No translation found for ${U(t)}.`),this.parsedMessage=t}};function D(e,t,n){let s=z(t,n),l=e[s.id];if(s.legacyIds!==void 0)for(let a=0;a<s.legacyIds.length&&l===void 0;a++)l=e[s.legacyIds[a]];if(l===void 0)throw new m(s);return[l.messageParts,l.placeholderNames.map(a=>{if(s.substitutions.hasOwnProperty(a))return s.substitutions[a];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${U(s)}.
2
2
  The translation contains a placeholder with name ${a}, which does not exist in the message.`)})]}function k(e){let t=e.split(/{\$([^}]*)}/),n=[t[0]],s=[];for(let a=1;a<t.length-1;a+=2)s.push(t[a]),n.push(`${t[a+1]}`);let l=n.map(a=>a.charAt(0)===d?"\\"+a:a);return{text:e,messageParts:G(n,l),placeholderNames:s}}function G(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function U(e){let t=e.meaning&&` - "${e.meaning}"`,n=e.legacyIds&&e.legacyIds.length>0?` [${e.legacyIds.map(s=>`"${s}"`).join(", ")}]`:"";return`"${e.id}"${n} ("${e.text}"${t})`}function M(e){$localize.translate||($localize.translate=K),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach(t=>{$localize.TRANSLATIONS[t]=k(e[t])})}function K(e,t){try{return D($localize.TRANSLATIONS,e,t)}catch(n){return console.warn(n.message),[e,t]}}var g="en-US",Y=[{value:"en",label:"English (en-US)"},{value:"en-GB",label:"English (en-GB)"},{value:"cs",label:"Czech (cs)"},{value:"da",label:"Danish (da)"},{value:"de",label:"German (de)"},{value:"es",label:"Spanish (es)"},{value:"fi",label:"Finnish (fi)"},{value:"fr",label:"French (fr)"},{value:"hu",label:"Hungarian (hu)"},{value:"it",label:"Italian (it)"},{value:"ja-JP",label:"Japanese (ja-JP)"},{value:"nl-NL",label:"Dutch (nl-NL)"},{value:"pl",label:"Polish (pl)"},{value:"pt-BR",label:"Portuguese (pt-BR)"},{value:"pt",label:"Portuguese (pt)"},{value:"ru",label:"Russian (ru)"},{value:"sr-RS",label:"Serbian (sr-RS)"},{value:"sv-SE",label:"Swedish (sv-SE)"},{value:"zh-CN",label:"Chinese (zh-CN)"},{value:"zh-TW",label:"Chinese (zh-TW)"}],p={en:"en","en-US":"en","en-GB":"en-GB","en-AU":"en","en-CA":"en",cs:"cs","cs-CZ":"cs",da:"da","da-DK":"da",de:"de","de-DE":"de","de-AT":"de",es:"es","es-ES":"es","es-MX":"es",fi:"fi","fi-FI":"fi",fr:"fr","fr-FR":"fr","fr-CA":"fr",hu:"hu","hu-HU":"hu",it:"it","it-IT":"it",ja:"ja-JP","ja-JP":"ja-JP",nl:"nl-NL","nl-NL":"nl-NL","nl-BE":"nl-NL",pl:"pl","pl-PL":"pl",pt:"pt","pt-BR":"pt-BR","pt-PT":"pt",ru:"ru","ru-RU":"ru",sr:"sr-RS","sr-RS":"sr-RS",sv:"sv-SE","sv-SE":"sv-SE","sv-FI":"sv-SE",zh:"zh-CN","zh-CN":"zh-CN","zh-SG":"zh-CN","zh-TW":"zh-TW","zh-HK":"zh-TW"},F={"ja-JP":"ja","nl-NL":"nl","sr-RS":"sr","sv-SE":"sv","zh-CN":"zh-Hans","zh-TW":"zh-Hant"},w=Array.from(new Set(Object.values(p)));function Z(e){return e?p[e]??"en":"en"}function q(){let e=localStorage.getItem("v1:duplicati:locale")||g,t=w.find(o=>o===e)??g,n=p[t]??p[t.split("-")[0]]??g;if(t===g)return t;import(`/locale/angular/${F[n]??n}.mjs`).then(o=>T(o.default));var l=n.replace(/-/g,"_");let a=t==="en"?"":"."+l;return fetch(`/locale/messages${a}.json`).then(o=>o.json()).then(o=>{M(o.translations),$localize.locale=t}),t}export{Y as a,Z as b,q as c};
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1 +1 @@
1
- import{h as u}from"./chunk-FWVOVJCG.js";import{F as s,Gc as r,Hc as g,S as n,X as o,la as l}from"./chunk-K6EZTPNQ.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{h as u}from"./chunk-XD6MBGQY.js";import{F as s,Fc as r,Gc as g,S as n,X as o,la as l}from"./chunk-67YRCRMI.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{a as M}from"./chunk-Q3ILJYED.js";import"./chunk-4D2NUH5S.js";import"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{c as O,e as C,f as S}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{y as d}from"./chunk-MHALSLG3.js";import"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Jb as n,_a as c,vb as e,wb as t,xb as l}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=c({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let u;u=$localize`System info`;let g;g=$localize`Server settings`;let T;T=$localize`Logs`;let A;return A=$localize`Crash log`,[_,o,r,u,g,T,A,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[M,d,O,C,S],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] spk-tabs[_ngcontent-%COMP%]{margin:0 2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{s as default};
1
+ import{a as M}from"./chunk-LSNBRSNG.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{c as O,e as C,f as S}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{y as d}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Jb as n,_a as c,vb as e,wb as t,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=c({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let u;u=$localize`System info`;let g;g=$localize`Server settings`;let T;T=$localize`Logs`;let A;return A=$localize`Crash log`,[_,o,r,u,g,T,A,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[M,d,O,C,S],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] spk-tabs[_ngcontent-%COMP%]{margin:0 2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{s as default};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-TVOVJS5N.js")},{path:"destination",loadComponent:()=>import("./chunk-T27DQWUZ.js")},{path:"source-data",loadComponent:()=>import("./chunk-VNTD2QIZ.js")},{path:"schedule",loadComponent:()=>import("./chunk-NUL6XFC4.js")},{path:"options",loadComponent:()=>import("./chunk-X4NRDSTJ.js")}];export{o as default};
@@ -0,0 +1,6 @@
1
+ import{a as Je,b as Ye}from"./chunk-5MMV45NA.js";import{a as je,b as We,c as Xe}from"./chunk-FX2XKS5C.js";import{h as Qe}from"./chunk-PTFQBTH3.js";import{a as Ue}from"./chunk-EBYGIC45.js";import{a as $}from"./chunk-FC45TEB6.js";import{a as ze}from"./chunk-2YHX57UE.js";import{a as Ke,c as ne,e as ie,i as oe,k as qe,s as ae,t as He}from"./chunk-ZCT7SRIM.js";import{A as Re,C as Ge,a as ee,e as Oe,g as te,l as Ae,o as Ie,p as Le,t as Ne,z as Pe}from"./chunk-DNBOZ26J.js";import{h as Be}from"./chunk-XD6MBGQY.js";import{ea as Me}from"./chunk-GP2W7XZF.js";import{Ab as U,Bb as h,Fc as Z,Gc as N,Hb as K,Ib as q,Kb as xe,Lb as Fe,Lc as _e,Mb as Te,Nb as F,Oa as s,Ob as l,Oc as $e,Pb as he,Qb as De,S as ge,Sb as Se,Tb as we,Ub as ye,X as O,Yb as A,_a as X,_b as Q,ba as C,bc as m,ca as g,db as b,dc as w,ec as de,f as W,fa as fe,gc as Ve,hc as ke,ic as ve,jc as I,kc as V,la as E,lc as d,oc as Ee,pb as f,pc as be,qb as x,rb as R,rc as J,sb as G,tb as B,tc as Y,ub as _,vb as c,wb as p,xb as z,yb as ce,yc as H,zb as pe}from"./chunk-67YRCRMI.js";import{a as S}from"./chunk-EUDKD2JW.js";var Ze=class n{#t=O(Be);#e=O(Oe);#n=O(ze);testDestination(t,e,o){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o):this.testDestinationv1(t,e,o)}testDestinationv2(t,e,o){return new W(i=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(i,t,e,a);return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let r=a?.error?.body;if(r?.Data?.FolderExists===!1||r?.StatusCode==="missing-folder"){o?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(r?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,r.Data?.HostCertificate);return}if(r?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,r.Data.ReportedHostKey,r.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,o){return new W(i=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,o).subscribe(r=>{i.next(r)})}})})}handleMissingFolder(t,e,o){this.#e.open($,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,o,i){this.#e.open($,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open($,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open($,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open($,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${a}
6
+ with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open($,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i){this.#e.open($,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}handleDestinationErrorv1(t,e,o,i){return new W(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,o):this.handleGenericError(a,e,o,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let r=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,o,r);return}if(t.startsWith("incorrect-host-key:")){let r=t.split('incorrect-host-key:"')[1].split('",')[0],D=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,o,r,D);return}this.handleGenericError(a,e,o,t)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})};var ot=["fileInput"],at=[[["label"]]],rt=["label"],re=class n{customId=_e();content=E("");readonly=E(!1);placeholder=_e("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=N(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Se(ot,5),e&2){let i;we(i=ye())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[be([{provide:Ke,useExisting:n,multi:!0}])],ngContentSelectors:rt,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,o){if(e&1){let i=h();he(at),De(0,0,["ngProjectAs","label",5,["label"]]),c(1,"div",2)(2,"button",3),F("click",function(){return C(i),g(o.triggerBrowse())}),K(3,1),z(4,"spk-icon"),q(),p()(),c(5,"div",4),F("drop",function(r){return C(i),g(o.onFileDrop(r))})("dragover",function(r){return C(i),g(o.onDragOver(r))}),c(6,"textarea",5),ve("ngModelChange",function(r){return C(i),ke(o.content,r)||(o.content=r),g(r)}),p()(),c(7,"input",6,0),F("change",function(r){return C(i),g(o.onFileSelected(r))}),p()}e&2&&(s(6),_("placeholder",o.placeholder()),Ve("ngModel",o.content),_("disabled",o.readonly()))},dependencies:[ae,ne,ie,oe,ee,te],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var lt=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),me=n=>({$implicit:n}),st=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),ct=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function pt(n,t){n&1&&U(0)}function dt(n,t){if(n&1&&b(0,pt,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17);l();let a=d(0),r=d(1);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,lt,o,e,a,r.oauthField)))}}function _t(n,t){n&1&&U(0)}function mt(n,t){if(n&1&&b(0,_t,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17);l();let a=d(0),r=d(1);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,st,o,e,a,r.oauthField)))}}function ut(n,t){if(n&1){let e=h();K(0,4,1),c(1,"button",12,1),F("click",function(){let i=C(e).$implicit,a=l(2);return g(a.addAdvancedOption(i))}),p(),q()}if(n&2){let e=t.$implicit;s(),xe(e.name),Fe(0)}}function Ct(n,t){n&1&&U(0)}function gt(n,t){if(n&1&&b(0,Ct,1,0,"ng-container",11),n&2){let e=t.$implicit,o=t.$index;l();let i=A(17),a=l(),r=d(0),D=d(1),M=a.getFormView("advanced",e)??a.getDefaultFormView(e);_("ngTemplateOutlet",i)("ngTemplateOutletContext",J(7,me,Y(2,ct,o,M,r,D.oauthField)))}}function ft(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function xt(n,t){if(n&1){let e=h();c(0,"app-file-tree",14)(1,"label",20),m(2),f(3,ft,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);_("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",r)("ngModel",i)}}function Ft(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Tt(n,t){if(n&1){let e=h();c(0,"app-file-tree",15)(1,"label",20),m(2),f(3,Ft,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);_("hideShortcuts",!0)("startingPath",a),s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",r)("ngModel",i)}}function ht(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Dt(n,t){if(n&1&&(c(0,"spk-icon",26),m(1," link "),p()),n&2){l();let e=d(5),o=d(6);Q("error",e&&o==="error")("warn",e&&o==="warning"),_("spkTooltip",e)}}function St(n,t){n&1&&(c(0,"spk-icon",25),m(1,"envelope"),p())}function wt(n,t){n&1&&(c(0,"spk-icon",25),m(1,"textbox"),p())}function yt(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,ht,2,1,"spk-icon",21),p(),c(4,"input",23),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),I(5)(6),f(7,Dt,2,5,"spk-icon",24)(8,St,2,0,"spk-icon",25)(9,wt,2,0,"spk-icon",25),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(3),r=d(4);s(),_("for",r),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("type",e.formView.type==="Email"?"email":"text")("id",r)("ngModel",i);let D=a,M=l(2).hasDoubleLeadingSlashes(D??"");s(),V(M&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),s(),V(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),s(),x(e.formView.type==="Path"?7:e.formView.type==="Email"?8:9)}}function Vt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function kt(n,t){if(n&1){let e=h();c(0,"span",30),F("click",function(){C(e);let i=l(2).$implicit,a=l(2);return g(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name))}),m(1," AuthID "),p()}}function vt(n,t){n&1&&(c(0,"spk-icon",25),m(1,"password"),p())}function Et(n,t){if(n&1){let e=h();c(0,"spk-icon",31),F("click",function(){C(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),p()}}function bt(n,t){if(n&1){let e=h();c(0,"spk-icon",31),F("click",function(){C(e);let i=l(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),p()}}function $t(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,Vt,2,1,"spk-icon",21),p(),c(4,"input",27),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),f(5,kt,2,0,"span",28)(6,vt,2,0,"spk-icon",25),f(7,Et,2,0,"spk-icon",29)(8,bt,2,0,"spk-icon",29),p()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("type",e.formView.showPassword?"text":"password")("id",a)("ngModel",i),s(),x(e.oauthField===e.formView.name?5:6),s(2),x(e.formView.showPassword?7:8)}}function Mt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(3).$implicit;_("spkTooltip",e.formView.longDescription)}}function Ot(n,t){if(n&1&&m(0),n&2){let e=l().$implicit;de(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function At(n,t){if(n&1&&m(0),n&2){let e=l().$implicit;w(" ",e," ")}}function It(n,t){if(n&1&&f(0,Ot,1,2)(1,At,1,1),n&2){let e=l(3).$implicit;x(e.formView.loadOptions?0:1)}}function Lt(n,t){if(n&1){let e=h();c(0,"spk-select",32)(1,"label",20),m(2),f(3,Mt,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,It,2,1,"ng-template",null,2,H)}if(n&2){let e=A(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),D=d(4);_("options",o)("isClearable",!1)("optionTemplate",e),s(),_("for",D),s(),w(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),_("id",D)("ngModel",r)}}function Nt(n,t){if(n&1&&(I(0),f(1,Lt,7,8)),n&2){let e=l().$implicit,o=V(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:-1)}}function Pt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(3).$implicit;_("spkTooltip",e.formView.longDescription)}}function Rt(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;de(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Gt(n,t){if(n&1){let e=h();c(0,"spk-select",34)(1,"label",20),m(2),f(3,Pt,2,1,"spk-icon",21),p(),c(4,"input",22),F("ngModelChange",function(i){C(e);let a=l(2).$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,Rt,1,2,"ng-template",null,3,H)}if(n&2){let e=A(6);l();let o=d(0),i=l().$implicit,a=d(1),r=d(2),D=d(4);_("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),s(),_("for",D),s(),w(" ",a," "),s(),x(i.formView.longDescription?3:-1),s(),_("id",D)("ngModel",r)}}function Bt(n,t){n&1&&z(0,"spk-progress-bar",33)}function zt(n,t){if(n&1&&(I(0),f(1,Gt,7,9)(2,Bt,1,0,"spk-progress-bar",33)),n&2){let e=l().$implicit,o=V(e.formView.loadOptions?e.formView.loadOptions(l(2).injector)():e.formView.options);s(),x(o?1:2)}}function Kt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function qt(n,t){if(n&1){let e=h();c(0,"app-size",35),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),m(2),f(3,Kt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);_("inputType",e.Name)("ngModel",i)("customId",a),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Ht(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function jt(n,t){if(n&1){let e=h();c(0,"spk-form-field")(1,"label",20),m(2),f(3,Ht,2,1,"spk-icon",21),p(),c(4,"input",36),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p(),c(5,"spk-icon",25),m(6,"numpad"),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1),s(),_("id",a)("ngModel",i)}}function Wt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Xt(n,t){if(n&1){let e=h();c(0,"spk-toggle",37),F("click",function(){C(e);let i=l().$implicit,a=d(2),r=l(2);return g(r.updateFieldValue(i.fieldGroup,i.formView.name,a==="true"?"false":"true"))}),c(1,"label",20),m(2),f(3,Wt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);Q("active",i==="true"),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function Ut(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Qt(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;w(" ",e," ")}}function Jt(n,t){if(n&1){let e=h();c(0,"spk-select",38)(1,"label",20),m(2),f(3,Ut,2,1,"spk-icon",21),p(),c(4,"input",39),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),p()(),b(5,Qt,1,1,"ng-template",null,3,H)}if(n&2){let e=A(6),o=l().$implicit,i=d(1),a=d(2);_("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),s(),_("for",Ee("destination-",o.fieldGroup,"-",o.index)),s(),w(" ",i," "),s(),x(o.formView.longDescription?3:-1),s(),_("ngModel",a)}}function Yt(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function Zt(n,t){if(n&1){let e=h();c(0,"app-timespan",35),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label",20),m(2),f(3,Yt,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(1),i=d(2),a=d(4);_("inputType",e.formView.name)("ngModel",i)("customId",a),s(),_("for",a),s(),w(" ",o," "),s(),x(e.formView.longDescription?3:-1)}}function en(n,t){if(n&1&&(c(0,"spk-icon",21),m(1,"question"),p()),n&2){let e=l(2).$implicit;_("spkTooltip",e.formView.longDescription)}}function tn(n,t){if(n&1){let e=h();c(0,"app-file-drop-textarea",40),F("ngModelChange",function(i){C(e);let a=l().$implicit,r=l(2);return g(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(1,"label"),m(2),f(3,en,2,1,"spk-icon",21),p()()}if(n&2){let e=l().$implicit,o=d(2),i=d(4);_("ngModel",o)("customId",i)("placeholder",e.formView.longDescription),s(2),w(" ",e.formView.shortDescription??e.formView.name," "),s(),x(e.formView.longDescription?3:-1)}}function nn(n,t){if(n&1){let e=h();c(0,"button",41),F("click",function(){C(e);let i=l().$implicit,a=l(2);return g(a.removeAdvancedOption(i.formView.name))}),c(1,"spk-icon"),m(2,"x-circle"),p()()}}function on(n,t){if(n&1&&(c(0,"div",13),I(1)(2)(3)(4),f(5,xt,5,11,"app-file-tree",14)(6,Tt,5,7,"app-file-tree",15)(7,yt,10,9,"spk-form-field")(8,$t,9,8,"spk-form-field")(9,Nt,2,2)(10,zt,3,2)(11,qt,4,6,"app-size",16)(12,jt,7,5,"spk-form-field")(13,Xt,4,5,"spk-toggle",17)(14,Jt,7,9)(15,Zt,4,6,"app-timespan",16)(16,tn,4,5,"app-file-drop-textarea",18),f(17,nn,3,0,"button",19),p()),n&2){let e=t.$implicit;l();let o=d(0),i=l();Q("single-field",e.fieldGroup!=="advanced"),s(),V(e.formView.shortDescription??e.formView.name),s(),V(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),s(),V(i.getFieldValue(e.fieldGroup,e.formView.name)),s(),V("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),s(),x(e.formView.type==="FileTree"?5:e.formView.type==="FolderTree"?6:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?7:e.formView.type==="Password"?8:e.formView.type==="Enumeration"?9:e.formView.type==="NonValidatedSelectableString"?10:e.formView.type==="Size"?11:e.formView.type==="Integer"?12:e.formView.type==="Boolean"?13:e.formView.type==="Flags"?14:e.formView.type==="Timespan"||e.formView.type==="DateTime"?15:e.formView.type==="FreeText"?16:-1),s(12),x(e.fieldGroup==="advanced"?17:-1)}}function an(n,t){if(n&1&&(I(0),G(1,dt,1,9,"ng-container",null,R),G(3,mt,1,9,"ng-container",null,R),c(5,"spk-toggle-card",5),ce(6,6),K(7,4),c(8,"spk-menu",7)(9,"button",8),z(10,"spk-icon"),p(),ce(11,9),G(12,ut,3,1,"button",10,R),pe(),p(),q(),pe(),G(14,gt,1,9,"ng-container",null,R),p(),b(16,on,18,8,"ng-template",null,0,H)),n&2){let e=l(),o=d(1);V(e.destinationForm()),s(),B(o.custom),s(2),B(o.dynamic),s(2),_("disallowToggle",!0);let i=e.nonSelectedAdvancedFormViews();s(3),_("searchable",!0),s(),_("disabled",i.length===0),s(3),B(i),s(2),B(e.advancedFormFieldNames())}}var tt=class n{#t=O(Qe);injector=O(fe);targetUrl=$e.required();#e=null;destinationType=Z(()=>{let t=this.targetUrl();if(!t)return null;let e=t.split("://")[0];return this.#e=e,e});destinationForm=E({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Z(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=E(null);nonSelectedAdvancedFormViews=Z(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=N(()=>{let t=this.destinationType(),e=Xe.find(T=>T.customKey===t||T.key===t),o=e?.key,i=this.#t.destinationOptions().find(T=>T.Key===o);if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},D=e&&e.dynamicFields?e.dynamicFields:[],M=e&&e.advancedFields?e.advancedFields:[],le=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([T,u],k)=>{v.custom.push(S({order:900+k},u))});for(let T=0;T<i.Options.length;T++){let u=i.Options[T];if(u.Deprecated)continue;let k=D.find(y=>y===u.Name||u.Aliases?.includes(y.name)||y.name===u.Name);if(k){let y=u.Aliases?.indexOf(k.name)??-1,ue=u.Aliases&&y>-1?u.Aliases[y]:u.Name,L=k&&typeof k!="string",Ce=L?k?.defaultValue??u.DefaultValue:u.DefaultValue,P={name:ue,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+T},se=L?S(S({},P),k):P;v.dynamic.push(se)}else{let y=u.Name;if(le.find(j=>j===y))continue;let L=M.find(j=>j===y||j.name===y),Ce=L&&typeof L!="string",P={name:y,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:u.DefaultValue,order:900+T},se=Ce?S(S({},P),L):P;v.advanced.push(se)}}v.custom.sort((T,u)=>T.order-u.order),v.dynamic.sort((T,u)=>T.order-u.order),v.advanced.sort((T,u)=>T.order-u.order),this.destinationFormConfig.set(v)});targetUrlEffect=N(()=>{if(!this.destinationFormConfig())return;let e=this.targetUrl();if(!e)return;let o=We(e);if(!o)return;let i={custom:o.custom,dynamic:o.dynamic,advanced:o.advanced};this.destinationForm.update(a=>(a.custom=S(S({},a.custom),i.custom),a.dynamic=S(S({},a.dynamic),i.dynamic),a.advanced=S(S({},a.advanced),i.advanced),a))});destinationFormEffect=N(()=>{let t=this.#e,e=this.destinationForm();if(!e||!t)return;let o=je({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasDoubleLeadingSlashes(t){return t.startsWith("//")}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(S({},e))}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(S({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(S({},e))}#n=E("https://duplicati-oauth-handler.appspot.com/").asReadonly();#o=E(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#i=E(!1);oauthStartTokenCreation(t,e,o){this.#i.set(!0);let i=this.#o(),a=450,r=600,D=this.#n()+"?type="+t+"&token="+i,M=screen.width/2-a/2,le=screen.height/2-r/2,v=window.open(D,"_blank","height="+r+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+M+",top="+le);return window.addEventListener("message",T=>{let u=T.data.startsWith("authid:"),k=u?T.data.replace("authid:",""):null;u&&(this.destinationForm.update(y=>(y[e][o]=k,y)),this.#i.set(!1),v?.close())}),!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;return t=$localize` Advanced options ${"\uFFFD#8\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#9\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#11\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*13:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_MENU:`,t=Te(t),[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],t,[1,"advanced-options",3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"click"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],[3,"ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(I(0)(1),f(2,an,18,4)),e&2){let i=V(o.destinationType());s();let a=V(o.destinationFormConfig());s(),x(i&&a?2:-1)}},dependencies:[He,ne,qe,ie,ae,oe,Me,Ue,Je,Ye,re,Ae,te,ee,Pe,Ie,Ne,Ge,Re,Le],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}"],changeDetection:0})};export{Ze as a,tt as b};
@@ -0,0 +1 @@
1
+ import{f as a,g as b}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as $}from"./chunk-Q3ILJYED.js";import{a as R}from"./chunk-WY2KPAVB.js";import"./chunk-4D2NUH5S.js";import"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{b as A,e as N}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as k,g as B}from"./chunk-MHALSLG3.js";import{h as O}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Gc as M,Hb as c,Ib as d,Jb as l,Mb as g,Nb as I,Oa as i,X as C,_a as p,bc as E,dc as L,la as r,pb as s,qb as u,rb as f,sb as S,tb as T,vb as F,wb as a,xb as _}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";function b(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function h(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=C(O);#e=C(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=p({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"spk-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,b,1,0),s(12,P,1,0),s(13,h,1,0),s(14,v,1,0),d(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}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{D as default};
1
+ import{a as $}from"./chunk-LSNBRSNG.js";import{a as R}from"./chunk-67XQIEG5.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as A,e as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as k,g as B}from"./chunk-DNBOZ26J.js";import{h as O}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Fc as M,Hb as c,Ib as d,Jb as l,Mb as g,Nb as I,Oa as i,X as C,_a as p,bc as E,dc as L,la as r,pb as s,qb as u,rb as f,sb as S,tb as T,vb as F,wb as a,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function b(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function h(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=C(O);#e=C(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=p({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"spk-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,b,1,0),s(12,P,1,0),s(13,h,1,0),s(14,v,1,0),d(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}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{D as default};
@@ -1,2 +1,2 @@
1
- import{a as w,g as U,x as z}from"./chunk-MHALSLG3.js";import{h as X}from"./chunk-FWVOVJCG.js";import{la as y}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Bb as M,F as k,Hb as N,Hc as v,Ib as B,Jb as _,Nb as F,Oa as l,Ob as p,X as G,Zb as I,_a as $,_b as h,ba as S,bc as d,ca as u,cc as g,la as r,pb as O,qb as f,rb as T,sb as E,tb as C,ub as L,vb as i,vc as x,wb as a,xb as b,xc as A}from"./chunk-K6EZTPNQ.js";import{a as P,b as R}from"./chunk-EUDKD2JW.js";function V(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;l(),g(t)}}function K(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),E(4,V,2,1,"li",null,T),a()()()()),o&2){let t=p().$implicit,n=p();l(),I("grid-column","1 / -1")("height","auto"),l(3),C(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),F("click",function(){let s=S(t).$index,c=p();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"spk-icon"),d(11,"caret-down"),a()()()(),O(12,K,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=p();l(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),l(3),g(t.BackupID>=0?t.BackupID:"-"),l(2),g(t.Message),l(2),h("rotated-icon",n===s.openRowIndex()),l(3),f(n===s.openRowIndex()?12:-1)}}function q(o,e){o&1&&_(0,4,1)}function H(o,e){o&1&&_(0,4,2)}var J=["BackupID","Timestamp","Message","actions"],D=class o{#e=G(X);displayedColumns=r(J);openRowIndex=r(null);noMoreItems=r(!1);logsIsLoading=r(!1);logs=r([]);pagination=r({offsetTime:void 0,pagesize:10});paginationEffect=v(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(k(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
1
+ import{a as w,g as U,x as z}from"./chunk-DNBOZ26J.js";import{h as X}from"./chunk-XD6MBGQY.js";import{la as y}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as M,F as k,Gc as v,Hb as N,Ib as B,Jb as _,Nb as F,Oa as l,Ob as p,X as G,Zb as I,_a as $,_b as h,ba as S,bc as d,ca as u,cc as g,la as r,pb as O,qb as f,rb as T,sb as E,tb as C,ub as L,uc as x,vb as i,wb as a,wc as A,xb as b}from"./chunk-67YRCRMI.js";import{a as P,b as R}from"./chunk-EUDKD2JW.js";function V(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;l(),g(t)}}function K(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),E(4,V,2,1,"li",null,T),a()()()()),o&2){let t=p().$implicit,n=p();l(),I("grid-column","1 / -1")("height","auto"),l(3),C(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),F("click",function(){let s=S(t).$index,c=p();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"spk-icon"),d(11,"caret-down"),a()()()(),O(12,K,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=p();l(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),l(3),g(t.BackupID>=0?t.BackupID:"-"),l(2),g(t.Message),l(2),h("rotated-icon",n===s.openRowIndex()),l(3),f(n===s.openRowIndex()?12:-1)}}function q(o,e){o&1&&_(0,4,1)}function H(o,e){o&1&&_(0,4,2)}var J=["BackupID","Timestamp","Message","actions"],D=class o{#e=G(X);displayedColumns=r(J);openRowIndex=r(null);noMoreItems=r(!1);logsIsLoading=r(!1);logs=r([]);pagination=r({offsetTime:void 0,pagesize:10});paginationEffect=v(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(k(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
2
  `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>R(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=$({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["table-header",""],["table-no-rows",""],["spk-button","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"spk-table",5)(1,"tr",6)(2,"th"),_(3,0),a(),i(4,"th"),_(5,1),a(),i(6,"th"),_(7,2),a(),b(8,"th"),a(),E(9,j,13,9,null,null,T),i(11,"div",7),_(12,3),a()(),i(13,"footer")(14,"button",8),F("click",function(){return S(s),u(n.loadMore())}),N(15,4),O(16,q,1,0)(17,H,1,0),B(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),l(9),C(s),l(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),l(2),f(n.noMoreItems()?16:17)}},dependencies:[z,y,w,U],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-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}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{a as W}from"./chunk-Q3ILJYED.js";import"./chunk-4D2NUH5S.js";import{a as z}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-3PYBMCOB.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import"./chunk-JWFYA3TO.js";import"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{e as S}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{a as g,g as E,h as R,k as G,p as w}from"./chunk-MHALSLG3.js";import{h as X}from"./chunk-FWVOVJCG.js";import"./chunk-KV7SEZ24.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import"./chunk-LQ2PCH6Q.js";import{Hb as y,Ib as A,Jb as s,Kb as I,Lb as B,Oa as a,Ob as d,X as u,_a as T,bc as r,db as O,ec as L,mb as M,nb as P,pb as F,qb as N,rb as x,rc as m,sb as $,sc as v,tb as D,ub as _,vb as t,wb as i,xb as l,yb as b,zb as h}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var j=()=>[R,E,g,S],K=()=>["/restore-from-files"],q=()=>["/restore/from-config"],V=n=>["/restore",n];function H(n,o){if(n&1&&(t(0,"spk-card",5),l(1,"img",10),t(2,"div",7)(3,"h3"),s(4,1),i(),t(5,"p"),r(6),i()(),t(7,"button",8),y(8,2),l(9,"spk-icon"),A(),i()()),n&2){let e=o.$implicit;a(4),I((e.Backup==null?null:e.Backup.Name)??"Backup name missing"),B(4),a(2),L(" ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," "),a(),_("routerLink",v(4,V,e.Backup==null?null:e.Backup.ID))}}function J(n,o){if(n&1&&$(0,H,10,6,"spk-card",5,x),n&2){let e=d(2);D(e.backups())}}function Q(n,o){n&1&&(b(0),s(1,3),h())}function U(n,o){if(n&1&&F(0,J,2,0)(1,Q,2,0,"ng-container"),n&2){let e=d();N(e.backups().length?0:1)}}function Y(n,o){n&1&&(t(0,"div",11),l(1,"spk-progress-bar",12),t(2,"div",7)(3,"h3"),s(4,4),i()()())}var f=class n{#e=u(z);#t=u(X);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=T({type:n,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let e;e=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let k;k=$localize`No backups founds`;let C;return C=$localize`Loading backups...`,[o,e,p,k,C,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,p){e&1&&(l(0,"app-status-bar"),t(1,"section")(2,"h2"),s(3,0),i(),t(4,"spk-card",5),l(5,"img",6),t(6,"div",7)(7,"h3"),r(8,"Direct restore from backup files"),i(),t(9,"p"),r(10,"Point to your backup files and restore from there."),i()(),t(11,"button",8),r(12," Start "),t(13,"spk-icon"),r(14,"play-circle"),i()()(),t(15,"spk-card",5),l(16,"img",9),t(17,"div",7)(18,"h3"),r(19,"Restore from configuration"),i(),t(20,"p"),r(21,"Load destination from an exported job or a storage provider"),i()(),t(22,"button",8),r(23," Start "),t(24,"spk-icon"),r(25,"play-circle"),i()()(),t(26,"spk-divider"),r(27,"Or existing"),i(),O(28,U,2,1)(29,Y,5,0),M(30,28,j,null,29),i()),e&2&&(a(11),_("routerLink",m(3,K)),a(11),_("routerLink",m(4,q)),a(8),P(!p.backupsLoading()))},dependencies:[W,R,E,G,g,w,S],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{f as default};
1
+ import{a as W}from"./chunk-LSNBRSNG.js";import"./chunk-A7BFGBWF.js";import{a as z}from"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{e as S}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as g,g as E,h as R,k as G,p as w}from"./chunk-DNBOZ26J.js";import{h as X}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Hb as y,Ib as A,Jb as s,Kb as I,Lb as B,Oa as a,Ob as d,X as u,_a as T,bc as r,db as O,ec as L,mb as M,nb as P,pb as F,qb as N,qc as m,rb as x,rc as v,sb as $,tb as D,ub as _,vb as t,wb as i,xb as l,yb as b,zb as h}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var j=()=>[R,E,g,S],K=()=>["/restore-from-files"],q=()=>["/restore/from-config"],V=n=>["/restore",n];function H(n,o){if(n&1&&(t(0,"spk-card",5),l(1,"img",10),t(2,"div",7)(3,"h3"),s(4,1),i(),t(5,"p"),r(6),i()(),t(7,"button",8),y(8,2),l(9,"spk-icon"),A(),i()()),n&2){let e=o.$implicit;a(4),I((e.Backup==null?null:e.Backup.Name)??"Backup name missing"),B(4),a(2),L(" ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," "),a(),_("routerLink",v(4,V,e.Backup==null?null:e.Backup.ID))}}function J(n,o){if(n&1&&$(0,H,10,6,"spk-card",5,x),n&2){let e=d(2);D(e.backups())}}function Q(n,o){n&1&&(b(0),s(1,3),h())}function U(n,o){if(n&1&&F(0,J,2,0)(1,Q,2,0,"ng-container"),n&2){let e=d();N(e.backups().length?0:1)}}function Y(n,o){n&1&&(t(0,"div",11),l(1,"spk-progress-bar",12),t(2,"div",7)(3,"h3"),s(4,4),i()()())}var f=class n{#e=u(z);#t=u(X);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=T({type:n,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let e;e=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let k;k=$localize`No backups founds`;let C;return C=$localize`Loading backups...`,[o,e,p,k,C,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,p){e&1&&(l(0,"app-status-bar"),t(1,"section")(2,"h2"),s(3,0),i(),t(4,"spk-card",5),l(5,"img",6),t(6,"div",7)(7,"h3"),r(8,"Direct restore from backup files"),i(),t(9,"p"),r(10,"Point to your backup files and restore from there."),i()(),t(11,"button",8),r(12," Start "),t(13,"spk-icon"),r(14,"play-circle"),i()()(),t(15,"spk-card",5),l(16,"img",9),t(17,"div",7)(18,"h3"),r(19,"Restore from configuration"),i(),t(20,"p"),r(21,"Load destination from an exported job or a storage provider"),i()(),t(22,"button",8),r(23," Start "),t(24,"spk-icon"),r(25,"play-circle"),i()()(),t(26,"spk-divider"),r(27,"Or existing"),i(),O(28,U,2,1)(29,Y,5,0),M(30,28,j,null,29),i()),e&2&&(a(11),_("routerLink",m(3,K)),a(11),_("routerLink",m(4,q)),a(8),P(!p.backupsLoading()))},dependencies:[W,R,E,G,g,w,S],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{a as m}from"./chunk-LQ2PCH6Q.js";import{X as p,bb as a}from"./chunk-K6EZTPNQ.js";var u=class e{#t=p(m);transform(t,n=!1,...f){if(!t)return"";let r=t.split(".")[0],s=parseInt(r.split(":")[0])??0,i=parseInt(r.split(":")[1])??0,o=parseInt(r.split(":")[2])??0;return n?`${s}h ${i}m ${o}s`:this.#t.duration({hours:s,minutes:i,seconds:o}).humanize()}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=a({name:"durationFormat",type:e,pure:!0})};export{u as a};
1
+ import{a as m}from"./chunk-DLVU5GHR.js";import{X as p,bb as a}from"./chunk-67YRCRMI.js";var u=class e{#t=p(m);transform(t,n=!1,...f){if(!t)return"";let r=t.split(".")[0],s=parseInt(r.split(":")[0])??0,i=parseInt(r.split(":")[1])??0,o=parseInt(r.split(":")[2])??0;return n?`${s}h ${i}m ${o}s`:this.#t.duration({hours:s,minutes:i,seconds:o}).humanize()}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=a({name:"durationFormat",type:e,pure:!0})};export{u as a};
@@ -0,0 +1 @@
1
+ import{a as le}from"./chunk-BD5AB4OK.js";import{a as se,b as ae}from"./chunk-5MMV45NA.js";import{h as ie}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{c as Z,e as J,i as ee,k as ne,s as te,t as oe}from"./chunk-ZCT7SRIM.js";import{b as V,d as q}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as M,Fc as k,Hb as S,Ib as O,Jb as r,Mc as W,Nb as I,Oa as p,Ob as c,Wb as x,X as C,Xb as G,_a as K,_b as U,ba as P,ca as f,gc as u,hc as d,ic as m,la as v,pb as N,qb as F,qc as X,ub as T,vb as t,wb as i,xb as g}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","compression-module","--no-encryption","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,l){s&1&&(S(0,1,1),g(1,"spk-icon",20),O())}function ce(s,l){s&1&&(t(0,"p",20),r(1,6),i())}function ue(s,l){s&1&&(t(0,"p"),r(1,7),i())}function de(s,l){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,a)||(o.optionsFields.backupRetentionTime=a),f(a)}),t(3,"label",29),r(4,9),i()()}if(s&2){let n=c();p(2),T("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,l){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",30),r(4,11),i(),t(5,"input",31),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,a)||(o.optionsFields.backupRetentionVersions=a),f(a)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,l){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,l){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",32),r(6,15),i(),t(7,"input",33),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,a)||(o.optionsFields.backupRetentionCustom=a),f(a)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Te=["Bytes","KB","MB","GB","TB","PB"],ge=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(ie);#n=C(q);#t=C(V);formRef=W.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=v(ge);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let l=this.sizeSplit().value,n=this.sizeSplit().unit;if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,Te.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&x(e.formRef,_e,5),n&2&&G()},decls:30,vars:15,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[l,n,e,a,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",20),t(9,"p"),S(10,2),t(11,"a",21),g(12,"spk-icon",22),i(),O(),i()(),t(13,"spk-select",23)(14,"label",19),r(15,3),i(),t(16,"input",24),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",25),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",26)(24,"button",27),I("click",function(){return e.goBack()}),S(25,4),g(26,"spk-icon"),O(),i(),t(27,"button",28),I("click",function(){return e.submit()}),S(28,5),g(29,"spk-icon"),O(),i()()()),n&2&&(p(4),T("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),T("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),T("applicationOptions",e.applicationOptions())("hiddenOptions",X(14,re)),p(5),U("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,le,H,Y,j,se,ae,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-WZIEF5KL.js";import"./chunk-DLVU5GHR.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as DurationFormatPipe};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-FPLBURO5.js";import{b as P,d as $}from"./chunk-UVLJAD66.js";import{e as g}from"./chunk-MHALSLG3.js";import{h as W}from"./chunk-FWVOVJCG.js";import{qa as M}from"./chunk-VKD4Y3YQ.js";import{Gc as h,Hb as O,Hc as w,Ib as R,Jb as N,Kb as _,Lb as I,O as k,Oa as T,S as d,X as r,_a as C,i as m,la as n,vb as D,vc as A,wb as v,xb as E,xc as F}from"./chunk-K6EZTPNQ.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{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||s)};static \u0275cmp=C({type:s,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,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};
1
+ import{a as G}from"./chunk-2YHX57UE.js";import{b as P,d as $}from"./chunk-OQHMS5HM.js";import{e as g}from"./chunk-DNBOZ26J.js";import{h as W}from"./chunk-XD6MBGQY.js";import{qa as M}from"./chunk-GP2W7XZF.js";import{Fc as h,Gc as w,Hb as O,Ib as R,Jb as N,Kb as _,Lb as I,O as k,Oa as T,S as d,X as r,_a as C,i as m,la as n,uc as A,vb as D,wb as v,wc as F,xb as E}from"./chunk-67YRCRMI.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{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||s)};static \u0275cmp=C({type:s,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,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};