@duplicati/ngclient 0.0.132 → 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 (65) hide show
  1. package/assets/spk.css +0 -3
  2. package/{chunk-M65WTTXI.js → chunk-2VN6VG4I.js} +1 -1
  3. package/{chunk-MAHKEFZE.js → chunk-32H7KC5E.js} +1 -1
  4. package/{chunk-DXY7PV4P.js → chunk-3EVYTAP3.js} +1 -1
  5. package/{chunk-6XD3ZTV3.js → chunk-4MAZCWVO.js} +1 -1
  6. package/{chunk-3TKRL3US.js → chunk-5MMV45NA.js} +1 -1
  7. package/{chunk-6FOROLCM.js → chunk-7RNTRIB4.js} +1 -1
  8. package/chunk-7V6ZELYA.js +1 -0
  9. package/{chunk-FBULENUD.js → chunk-A7BFGBWF.js} +1 -1
  10. package/{chunk-RIMBSV7X.js → chunk-ACVXVBJ2.js} +1 -1
  11. package/{chunk-UXQ6EH3H.js → chunk-B3N2KM6G.js} +1 -1
  12. package/{chunk-D4QBTQXT.js → chunk-BD5AB4OK.js} +1 -1
  13. package/{chunk-WYY5FAMC.js → chunk-BKHSNMGE.js} +1 -1
  14. package/{chunk-NVMLEB3O.js → chunk-BWJZ3AMO.js} +1 -1
  15. package/{chunk-UEX6XU6A.js → chunk-CHCHAUQD.js} +1 -1
  16. package/{chunk-F47NJAFQ.js → chunk-D3OE4S5N.js} +1 -1
  17. package/chunk-DNBOZ26J.js +1 -0
  18. package/{chunk-XLVTJGQW.js → chunk-EBYGIC45.js} +1 -1
  19. package/chunk-EGCW3WY7.js +1 -0
  20. package/{chunk-EKL346XU.js → chunk-EK2B2CO4.js} +1 -1
  21. package/{chunk-T3KWCIYP.js → chunk-F66HJES7.js} +1 -1
  22. package/chunk-G6LCHQJE.js +1 -0
  23. package/chunk-GORQL5YP.js +1 -0
  24. package/{chunk-3UMUFU7J.js → chunk-GQTJISMN.js} +1 -1
  25. package/{chunk-FQAHXSGY.js → chunk-KAKRPBPP.js} +1 -1
  26. package/{chunk-FJ2TDPI3.js → chunk-LSNBRSNG.js} +1 -1
  27. package/{chunk-DXX4SHGM.js → chunk-LXZXQU7D.js} +1 -1
  28. package/{chunk-ENGSZPK6.js → chunk-MDO4PWV6.js} +1 -1
  29. package/{chunk-ZXT5JBAK.js → chunk-MOOM536C.js} +1 -1
  30. package/{chunk-DSRTEY6R.js → chunk-MVJXYZIV.js} +1 -1
  31. package/{chunk-PTDOM6EA.js → chunk-NUL6XFC4.js} +1 -1
  32. package/{chunk-ULGBY3HN.js → chunk-PEPDXQBY.js} +1 -1
  33. package/{chunk-NPPD4I4N.js → chunk-PETCW5PK.js} +1 -1
  34. package/{chunk-53F47EOA.js → chunk-PTFQBTH3.js} +1 -1
  35. package/{chunk-3NGXNVFE.js → chunk-Q2YREFUE.js} +1 -1
  36. package/{chunk-JADCKIQ4.js → chunk-QNWYJ7OR.js} +1 -1
  37. package/{chunk-RNYYB7Z7.js → chunk-SUMEJCXQ.js} +1 -1
  38. package/{chunk-QB3BX6FC.js → chunk-T27DQWUZ.js} +1 -1
  39. package/{chunk-52WBX72O.js → chunk-TIPHYMRQ.js} +1 -1
  40. package/{chunk-XH2AUUSU.js → chunk-TVOVJS5N.js} +1 -1
  41. package/{chunk-AKQVOUES.js → chunk-UD32EXWK.js} +1 -1
  42. package/chunk-UUOPMSDB.js +1 -0
  43. package/{chunk-NQVDTTCD.js → chunk-VFFFKPK4.js} +1 -1
  44. package/{chunk-4IODEYNF.js → chunk-VNTD2QIZ.js} +1 -1
  45. package/{chunk-33FTKAPW.js → chunk-VWH7EODO.js} +1 -1
  46. package/{chunk-Q6YWYUN4.js → chunk-WBYTRHI7.js} +1 -1
  47. package/{chunk-6HRKFGKD.js → chunk-WCMRN2KQ.js} +1 -1
  48. package/{chunk-ZF3UEKWP.js → chunk-X4NRDSTJ.js} +1 -1
  49. package/{chunk-5CYNJ3KI.js → chunk-XBP565VF.js} +1 -1
  50. package/{chunk-ZJQCMD5B.js → chunk-XHUQCM6F.js} +1 -1
  51. package/{chunk-LGC2UEAO.js → chunk-XKDJSEMU.js} +1 -1
  52. package/{chunk-BTTHW7KA.js → chunk-Y4VREVFM.js} +1 -1
  53. package/{chunk-2ASDVUFT.js → chunk-YPAIKA7K.js} +1 -1
  54. package/{chunk-4JHY2ZIQ.js → chunk-ZIJ7ZEHR.js} +1 -1
  55. package/index.html +2 -2
  56. package/{main-MG43J5KN.js → main-BQ3NFYOR.js} +1 -1
  57. package/package.json +1 -1
  58. package/styles-4QA7NM7N.css +1 -0
  59. package/chunk-2W4JV5JL.js +0 -1
  60. package/chunk-5ER6KMMG.js +0 -1
  61. package/chunk-GXCMYX2K.js +0 -1
  62. package/chunk-LLV2UR7Z.js +0 -1
  63. package/chunk-NKYXZEX2.js +0 -1
  64. package/chunk-TQPOMS6Q.js +0 -1
  65. package/styles-YRN2WTKF.css +0 -1
@@ -1 +1 @@
1
- import{a as R}from"./chunk-2YHX57UE.js";import{a as w,n as D}from"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import{ea as b}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Ab as u,Bb as M,Fc as A,Jb as P,Nb as k,Oa as l,Ob as s,X as O,Yb as C,Zb as E,_a as h,_b as S,ba as x,bc as a,ca as T,cc as N,db as m,la as _,pb as d,qb as f,rc as p,sb as I,sc as F,tb as v,ub as g,vb as c,wb as r,yc as $}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"spk-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"spk-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(5,Y,F(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=x(n).$implicit,L=s(2);return T(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"spk-icon",5)(3,G,2,0,"spk-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),N(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"spk-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var y=class e{#e=O(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=h({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,$)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(4,Y,p(2,V,o.treeStructure())))}},dependencies:[D,w,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{y as default};
1
+ import{a as R}from"./chunk-2YHX57UE.js";import{a as w,n as D}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import{ea as b}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Ab as u,Bb as M,Fc as A,Jb as P,Nb as k,Oa as l,Ob as s,X as O,Yb as C,Zb as E,_a as h,_b as S,ba as x,bc as a,ca as T,cc as N,db as m,la as _,pb as d,qb as f,rc as p,sb as I,sc as F,tb as v,ub as g,vb as c,wb as r,yc as $}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"spk-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"spk-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(5,Y,F(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=x(n).$implicit,L=s(2);return T(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"spk-icon",5)(3,G,2,0,"spk-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),N(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"spk-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var y=class e{#e=O(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=h({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,$)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",p(4,Y,p(2,V,o.treeStructure())))}},dependencies:[D,w,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{y as default};
@@ -1 +1 @@
1
- import{a as se,b as _e}from"./chunk-3TKRL3US.js";import{a as pe}from"./chunk-XLVTJGQW.js";import{a as te}from"./chunk-2YHX57UE.js";import{b as ne,c as ie,e as oe,i as re,k as le,s as ae}from"./chunk-ZCT7SRIM.js";import{A as Z,C as ee,a as q,g as H,l as J,o as Q,t as W,z as Y}from"./chunk-5ER6KMMG.js";import{ea as j}from"./chunk-GP2W7XZF.js";import{Ab as T,Bb as C,Fc as B,Hb as $,Ib as b,Jb as K,Lc as N,Nb as g,Oa as l,Ob as p,Oc as X,X as G,Yb as x,_a as z,_b as A,ba as d,bc as m,ca as u,cc as D,db as f,dc as k,jc as U,kc as R,la as E,lc as S,pb as O,qb as F,rb as V,sb as I,tb as L,ub as _,vb as a,wb as s,xb as h,yb as v,yc as P,zb as M}from"./chunk-67YRCRMI.js";import{a as w,b as y}from"./chunk-EUDKD2JW.js";function de(t,o){if(t&1){let e=C();a(0,"button",14),g("click",function(){d(e);let n=p();return u(n.addFreeTextSetting())}),$(1,6),h(2,"spk-icon"),b(),s()}}function ue(t,o){if(t&1){let e=C();a(0,"button",16,0),g("click",function(){let n=d(e).$implicit,r=p(2);return u(r.addSetting(n))}),m(2),s()}if(t&2){let e=o.$implicit;A("deprecated",e.deprecatedDescription),l(2),k(" ",e.name," ")}}function ge(t,o){if(t&1&&(a(0,"h3",8),m(1),s(),I(2,ue,3,3,"button",15,V)),t&2){let e=o.$implicit;l(),D(e.displayName),l(),L(e.options)}}function Ce(t,o){t&1&&(a(0,"div",13),m(1,"Add a setting above to get started."),s())}function fe(t,o){t&1&&(a(0,"spk-icon",24),m(1," warning-octagon "),s())}function xe(t,o){if(t&1&&(a(0,"spk-icon",25),m(1,"archive"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.deprecatedDescription)}}function Se(t,o){if(t&1&&(a(0,"spk-icon",26),m(1,"question"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.longDescription)}}function Te(t,o){if(t&1&&(O(0,fe,2,0,"spk-icon",24),a(1,"span"),m(2),s(),O(3,xe,2,1,"spk-icon",25)(4,Se,2,1,"spk-icon",26)),t&2){let e=p().$implicit,i=S(1);F(i?0:-1),l(),A("deprecated",e.FormView.deprecatedDescription),l(),D(e.FormView.shortDescription),l(),F(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Oe(t,o){t&1&&T(0)}function Fe(t,o){if(t&1){let e=C();a(0,"div",18)(1,"label"),f(2,Oe,1,0,"ng-container",27),s(),a(3,"div",28)(4,"spk-form-field")(5,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateFreeTextSettingName(r,n))}),s(),a(6,"spk-icon",30),m(7,"rectangle-dashed"),s()(),a(8,"spk-form-field")(9,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(10,"spk-icon",30),m(11,"textbox"),s()()()()}if(t&2){let e=p().$implicit,i=x(3);l(2),_("ngTemplateOutlet",i),l(3),_("ngModel",e.Name),l(4),_("ngModel",e.Value())}}function we(t,o){t&1&&T(0)}function ye(t,o){if(t&1){let e=C();a(0,"app-file-tree",19)(1,"label",31),f(2,we,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ve(t,o){if(t&1){let e=C();a(0,"app-file-tree",20),h(1,"label",31),a(2,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=S(0);_("startingPath",e.Value()),l(),_("for",i),l(),_("id",i)("ngModel",e.Value())}}function Ie(t,o){t&1&&T(0)}function Le(t,o){t&1&&(a(0,"spk-icon",30),m(1,"link"),s())}function he(t,o){t&1&&(a(0,"spk-icon",30),m(1,"textbox"),s())}function Me(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Ie,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),O(4,Le,2,0,"spk-icon",30)(5,he,2,0,"spk-icon",30),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value()),l(),F(e.FormView.type==="Path"?4:5)}}function ke(t,o){t&1&&T(0)}function Pe(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye "),s()}}function Ne(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye-slash "),s()}}function Ee(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,ke,1,0,"ng-container",27),s(),a(3,"input",33),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"password"),s(),O(6,Pe,2,0,"spk-icon",34)(7,Ne,2,0,"spk-icon",34),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),F(e.showPassword?6:7)}}function ve(t,o){t&1&&T(0)}function $e(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function be(t,o){if(t&1){let e=C();a(0,"spk-select",36)(1,"label",31),f(2,ve,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,$e,1,1,"ng-template",null,2,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("id",r)("ngModel",i.Value())}}function Ae(t,o){t&1&&T(0)}function De(t,o){if(t&1){let e=C();a(0,"app-size",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,Ae,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function Re(t,o){t&1&&T(0)}function Be(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Re,1,0,"ng-container",27),s(),a(3,"input",38),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"numpad"),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ge(t,o){t&1&&T(0)}function ze(t,o){if(t&1){let e=C();a(0,"spk-toggle",22)(1,"label",31),f(2,Ge,1,0,"ng-container",27),s(),a(3,"input",39),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ke(t,o){t&1&&T(0)}function Ue(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function Xe(t,o){if(t&1){let e=C();a(0,"spk-select",40)(1,"label",31),f(2,Ke,1,0,"ng-container",27),s(),a(3,"input",41),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,Ue,1,1,"ng-template",null,3,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("ngModel",i.Value())}}function je(t,o){t&1&&T(0)}function qe(t,o){if(t&1){let e=C();a(0,"app-timespan",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,je,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function He(t,o){if(t&1){let e=C();U(0)(1),f(2,Te,5,5,"ng-template",null,1,P),a(4,"div",17),O(5,Fe,12,3,"div",18)(6,ye,4,9,"app-file-tree",19)(7,Ve,3,4,"app-file-tree",20)(8,Me,6,5,"spk-form-field")(9,Ee,8,6,"spk-form-field")(10,be,6,7)(11,De,3,5,"app-size",21)(12,Be,6,4,"spk-form-field")(13,ze,4,4,"spk-toggle",22)(14,Xe,6,6)(15,qe,3,5,"app-timespan",21),a(16,"button",23),g("click",function(){let n=d(e).$implicit,r=p();return u(r.removeSetting(n))}),a(17,"spk-icon"),m(18,"x-bold"),s()()()}if(t&2){let e=o.$implicit,i=o.$index,n=p();R("destination-"+e.Name+i),l(),R(n.inAppOptions(e.Name)),l(4),F(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?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:-1)}}var ce=class t{#e=G(te);options=X.required();hiddenOptions=N([]);hasFreeTextSettings=N(!1);applicationOptions=N();allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=B(()=>{let o=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(me=>me.name===n.Name?.replace("--","")),c=n.Value??"";return r&&!o.includes(r.name)?(r.type==="Boolean"&&(c=c&&c.toLowerCase()==="true"||!1),r.type==="Integer"&&(c=parseInt(c)||0),y(w({},n),{Value:E(c),FormView:r})):this.hasFreeTextSettings()?y(w({},n),{Value:E(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}}):null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=B(()=>{let o=this.options().map(i=>i.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>y(w({},i),{options:i.options.filter(n=>!o.includes(n.name)&&!e.includes(n.name))})).filter(i=>i.options.length>0)});inAppOptions(o){let e=this.applicationOptions()?.findIndex(i=>i.Name?.replace("--","")===o);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:"--"+o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return o.FormView.type==="Boolean"?(n[r].Value=e?"True":"False",n):o.FormView.type==="Integer"?(n[r].Value=e.toString(),n):(n[r].Value=e,n)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return n[r].Name=e,n})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;return n=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],["spkTooltip",n,1,"error"],[1,"warning",3,"spkTooltip"],[1,"primary",3,"spkTooltip"],[4,"ngTemplateOutlet"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(a(0,"spk-toggle-card",7),v(1,8)(2),K(3,4),M(),a(4,"div",9),O(5,de,3,0,"button",10),a(6,"spk-menu",11)(7,"button",10),$(8,5),h(9,"spk-icon"),b(),s(),v(10,12),I(11,ge,4,1,null,null,V),M(),s()(),M(),O(13,Ce,2,0,"div",13),I(14,He,19,3,null,null,V),s()),e&2&&(_("disallowToggle",!0),l(5),F(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),L(i.nonSelectedOptionsGrouped()),l(2),F(i.selectedSettings().length===0?13:-1),l(),L(i.selectedSettings()))},dependencies:[ae,ie,le,ne,oe,re,pe,Y,J,H,Q,ee,q,W,Z,se,_e,j],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem;position:relative;z-index:1}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}"],changeDetection:0})};export{ce as a};
1
+ import{a as se,b as _e}from"./chunk-5MMV45NA.js";import{a as pe}from"./chunk-EBYGIC45.js";import{a as te}from"./chunk-2YHX57UE.js";import{b as ne,c as ie,e as oe,i as re,k as le,s as ae}from"./chunk-ZCT7SRIM.js";import{A as Z,C as ee,a as q,g as H,l as J,o as Q,t as W,z as Y}from"./chunk-DNBOZ26J.js";import{ea as j}from"./chunk-GP2W7XZF.js";import{Ab as T,Bb as C,Fc as B,Hb as $,Ib as b,Jb as K,Lc as N,Nb as g,Oa as l,Ob as p,Oc as X,X as G,Yb as x,_a as z,_b as A,ba as d,bc as m,ca as u,cc as D,db as f,dc as k,jc as U,kc as R,la as E,lc as S,pb as O,qb as F,rb as V,sb as I,tb as L,ub as _,vb as a,wb as s,xb as h,yb as v,yc as P,zb as M}from"./chunk-67YRCRMI.js";import{a as w,b as y}from"./chunk-EUDKD2JW.js";function de(t,o){if(t&1){let e=C();a(0,"button",14),g("click",function(){d(e);let n=p();return u(n.addFreeTextSetting())}),$(1,6),h(2,"spk-icon"),b(),s()}}function ue(t,o){if(t&1){let e=C();a(0,"button",16,0),g("click",function(){let n=d(e).$implicit,r=p(2);return u(r.addSetting(n))}),m(2),s()}if(t&2){let e=o.$implicit;A("deprecated",e.deprecatedDescription),l(2),k(" ",e.name," ")}}function ge(t,o){if(t&1&&(a(0,"h3",8),m(1),s(),I(2,ue,3,3,"button",15,V)),t&2){let e=o.$implicit;l(),D(e.displayName),l(),L(e.options)}}function Ce(t,o){t&1&&(a(0,"div",13),m(1,"Add a setting above to get started."),s())}function fe(t,o){t&1&&(a(0,"spk-icon",24),m(1," warning-octagon "),s())}function xe(t,o){if(t&1&&(a(0,"spk-icon",25),m(1,"archive"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.deprecatedDescription)}}function Se(t,o){if(t&1&&(a(0,"spk-icon",26),m(1,"question"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.longDescription)}}function Te(t,o){if(t&1&&(O(0,fe,2,0,"spk-icon",24),a(1,"span"),m(2),s(),O(3,xe,2,1,"spk-icon",25)(4,Se,2,1,"spk-icon",26)),t&2){let e=p().$implicit,i=S(1);F(i?0:-1),l(),A("deprecated",e.FormView.deprecatedDescription),l(),D(e.FormView.shortDescription),l(),F(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Oe(t,o){t&1&&T(0)}function Fe(t,o){if(t&1){let e=C();a(0,"div",18)(1,"label"),f(2,Oe,1,0,"ng-container",27),s(),a(3,"div",28)(4,"spk-form-field")(5,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateFreeTextSettingName(r,n))}),s(),a(6,"spk-icon",30),m(7,"rectangle-dashed"),s()(),a(8,"spk-form-field")(9,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(10,"spk-icon",30),m(11,"textbox"),s()()()()}if(t&2){let e=p().$implicit,i=x(3);l(2),_("ngTemplateOutlet",i),l(3),_("ngModel",e.Name),l(4),_("ngModel",e.Value())}}function we(t,o){t&1&&T(0)}function ye(t,o){if(t&1){let e=C();a(0,"app-file-tree",19)(1,"label",31),f(2,we,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ve(t,o){if(t&1){let e=C();a(0,"app-file-tree",20),h(1,"label",31),a(2,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=S(0);_("startingPath",e.Value()),l(),_("for",i),l(),_("id",i)("ngModel",e.Value())}}function Ie(t,o){t&1&&T(0)}function Le(t,o){t&1&&(a(0,"spk-icon",30),m(1,"link"),s())}function he(t,o){t&1&&(a(0,"spk-icon",30),m(1,"textbox"),s())}function Me(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Ie,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),O(4,Le,2,0,"spk-icon",30)(5,he,2,0,"spk-icon",30),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value()),l(),F(e.FormView.type==="Path"?4:5)}}function ke(t,o){t&1&&T(0)}function Pe(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye "),s()}}function Ne(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye-slash "),s()}}function Ee(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,ke,1,0,"ng-container",27),s(),a(3,"input",33),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"password"),s(),O(6,Pe,2,0,"spk-icon",34)(7,Ne,2,0,"spk-icon",34),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),F(e.showPassword?6:7)}}function ve(t,o){t&1&&T(0)}function $e(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function be(t,o){if(t&1){let e=C();a(0,"spk-select",36)(1,"label",31),f(2,ve,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,$e,1,1,"ng-template",null,2,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("id",r)("ngModel",i.Value())}}function Ae(t,o){t&1&&T(0)}function De(t,o){if(t&1){let e=C();a(0,"app-size",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,Ae,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function Re(t,o){t&1&&T(0)}function Be(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Re,1,0,"ng-container",27),s(),a(3,"input",38),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"numpad"),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ge(t,o){t&1&&T(0)}function ze(t,o){if(t&1){let e=C();a(0,"spk-toggle",22)(1,"label",31),f(2,Ge,1,0,"ng-container",27),s(),a(3,"input",39),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ke(t,o){t&1&&T(0)}function Ue(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function Xe(t,o){if(t&1){let e=C();a(0,"spk-select",40)(1,"label",31),f(2,Ke,1,0,"ng-container",27),s(),a(3,"input",41),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,Ue,1,1,"ng-template",null,3,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("ngModel",i.Value())}}function je(t,o){t&1&&T(0)}function qe(t,o){if(t&1){let e=C();a(0,"app-timespan",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,je,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function He(t,o){if(t&1){let e=C();U(0)(1),f(2,Te,5,5,"ng-template",null,1,P),a(4,"div",17),O(5,Fe,12,3,"div",18)(6,ye,4,9,"app-file-tree",19)(7,Ve,3,4,"app-file-tree",20)(8,Me,6,5,"spk-form-field")(9,Ee,8,6,"spk-form-field")(10,be,6,7)(11,De,3,5,"app-size",21)(12,Be,6,4,"spk-form-field")(13,ze,4,4,"spk-toggle",22)(14,Xe,6,6)(15,qe,3,5,"app-timespan",21),a(16,"button",23),g("click",function(){let n=d(e).$implicit,r=p();return u(r.removeSetting(n))}),a(17,"spk-icon"),m(18,"x-bold"),s()()()}if(t&2){let e=o.$implicit,i=o.$index,n=p();R("destination-"+e.Name+i),l(),R(n.inAppOptions(e.Name)),l(4),F(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?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:-1)}}var ce=class t{#e=G(te);options=X.required();hiddenOptions=N([]);hasFreeTextSettings=N(!1);applicationOptions=N();allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=B(()=>{let o=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(me=>me.name===n.Name?.replace("--","")),c=n.Value??"";return r&&!o.includes(r.name)?(r.type==="Boolean"&&(c=c&&c.toLowerCase()==="true"||!1),r.type==="Integer"&&(c=parseInt(c)||0),y(w({},n),{Value:E(c),FormView:r})):this.hasFreeTextSettings()?y(w({},n),{Value:E(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}}):null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=B(()=>{let o=this.options().map(i=>i.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>y(w({},i),{options:i.options.filter(n=>!o.includes(n.name)&&!e.includes(n.name))})).filter(i=>i.options.length>0)});inAppOptions(o){let e=this.applicationOptions()?.findIndex(i=>i.Name?.replace("--","")===o);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:"--"+o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return o.FormView.type==="Boolean"?(n[r].Value=e?"True":"False",n):o.FormView.type==="Integer"?(n[r].Value=e.toString(),n):(n[r].Value=e,n)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return n[r].Name=e,n})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;return n=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],["spkTooltip",n,1,"error"],[1,"warning",3,"spkTooltip"],[1,"primary",3,"spkTooltip"],[4,"ngTemplateOutlet"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(a(0,"spk-toggle-card",7),v(1,8)(2),K(3,4),M(),a(4,"div",9),O(5,de,3,0,"button",10),a(6,"spk-menu",11)(7,"button",10),$(8,5),h(9,"spk-icon"),b(),s(),v(10,12),I(11,ge,4,1,null,null,V),M(),s()(),M(),O(13,Ce,2,0,"div",13),I(14,He,19,3,null,null,V),s()),e&2&&(_("disallowToggle",!0),l(5),F(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),L(i.nonSelectedOptionsGrouped()),l(2),F(i.selectedSettings().length===0?13:-1),l(),L(i.selectedSettings()))},dependencies:[ae,ie,le,ne,oe,re,pe,Y,J,H,Q,ee,q,W,Z,se,_e,j],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem;position:relative;z-index:1}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}"],changeDetection:0})};export{ce as a};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-U44OBOIE.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as K,f as V,o as h}from"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as R,Hb as l,Ib as s,Jb as b,Kb as y,Lb as v,Nb as u,Oa as p,Ob as c,X as T,_a as D,ba as a,ca as S,la as $,pb as P,qb as N,ub as G,vb as i,wb as t,xb as _,yb as M,zb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();G("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),N(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
1
+ import{a as z}from"./chunk-U44OBOIE.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as K,f as V,o as h}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as R,Hb as l,Ib as s,Jb as b,Kb as y,Lb as v,Nb as u,Oa as p,Ob as c,X as T,_a as D,ba as a,ca as S,la as $,pb as P,qb as N,ub as G,vb as i,wb as t,xb as _,yb as M,zb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();G("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.isPolling.set(!0),this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),N(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
@@ -1 +1 @@
1
- import{g as mt}from"./chunk-6XD3ZTV3.js";import{a as Dt,b as St}from"./chunk-NQVDTTCD.js";import"./chunk-3TKRL3US.js";import{c as dt}from"./chunk-FX2XKS5C.js";import{h as L}from"./chunk-53F47EOA.js";import"./chunk-XLVTJGQW.js";import"./chunk-4JHY2ZIQ.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 lt,e as ct,f as _t,g as ut,i as Tt,j as pt,s as gt}from"./chunk-ZCT7SRIM.js";import{b as et,d as nt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as it,b as ot,d as at,e as rt,l as st,o as Ft}from"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as d,F as G,Fc as k,Gc as Z,Hb as D,Ib as S,Jb as O,Kb as W,Lb as z,Mb as X,Mc as tt,Nb as u,Oa as F,Ob as l,Wb as j,X as p,Xb as H,_a as K,_b as Q,ba as c,bc as f,ca as _,cc as x,dc as q,fa as V,gc as R,hc as N,ic as I,la as T,pb as E,pc as Y,qb as C,qc as J,rb as A,sb as $,tb as y,ub as M,vb as a,wb as r,xb as g,yb as h,zb as P}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Et=["formRef"],Ct=()=>({maxWidth:"700px",width:"100%"});function Ot(o,e){o&1&&(D(0,2,2),g(1,"spk-icon"),S())}function ft(o,e){o&1&&O(0,2,3)}function Rt(o,e){if(o&1){let t=d();D(0,2,1),a(1,"button",16),u("click",function(){c(t);let n=l();return _(n.testDestination())}),E(2,Ot,2,0)(3,ft,1,0),r(),S()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),C(t.successfulTest()?2:3)}}function Nt(o,e){if(o&1){let t=d();a(0,"p",22),u("click",function(){c(t);let n=l();return _(n.removeDestination())}),D(1,5),g(2,"strong")(3,"br")(4,"span",23),S(),r()}if(o&2){let t,i=l();F(4),W((t=i.selectedDestinationType())==null?null:t.displayName),z(1)}}function It(o,e){if(o&1){let t=d();a(0,"div",29),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),a(1,"h3"),f(2),r(),a(3,"p"),f(4),r()()}if(o&2){let t=e.$implicit;F(2),x(t.displayName),F(2),x(t.description)}}function kt(o,e){if(o&1){let t=d();a(0,"button",30,1),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),f(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),$(1,It,5,2,"div",25,A),r(),a(3,"spk-menu",26)(4,"button",27),O(5,6),r(),h(6,15),$(7,kt,3,1,"button",28,A),P(),r()),o&2){let t=l();F(),y(t.destinationTypeOptionsFocused()),F(2),M("searchable",!0),F(4),y(t.destinationTypeOptionsNotFocused())}}function $t(o,e){if(o&1){let t=d();a(0,"app-single-destination",31),I("targetUrlChange",function(n){c(t);let s=l();return N(s.targetUrlModel,n)||(s.targetUrlModel=n),_(n)}),r()}if(o&2){let t=l();R("targetUrl",t.targetUrlModel)}}function yt(o,e){if(o&1){let t=d();a(0,"spk-dialog",32),I("isOpenChange",function(n){c(t);let s=l();return N(s.targetUrlDialogOpen,n)||(s.targetUrlDialogOpen=n),_(n)}),a(1,"header",33)(2,"h2"),O(3,7),r(),a(4,"spk-alert",34),O(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),I("ngModelChange",function(n){c(t);let s=l();return N(s.targetUrlCtrl,n)||(s.targetUrlCtrl=n),_(n)}),r()()(),a(9,"footer",37)(10,"button",19),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!1))}),f(11,"Cancel"),r(),a(12,"button",38),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!0))}),D(13,9),g(14,"spk-icon"),S(),r()()()}if(o&2){let t=l();R("isOpen",t.targetUrlDialogOpen),M("options",J(3,Ct)),F(8),R("ngModel",t.targetUrlCtrl)}}var w=class o{#e=p(nt);#n=p(et);#t=p(L);#i=p(rt);#o=p(Dt);injector=p(V);#a=p(mt);formRef=tt.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=T(null);targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);toggleNewDestination=T(!0);targetUrlEffect=Z(()=>{let e=this.#t.targetUrlModel();this.#a.updateTargetUrl(e??null)});successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(dt.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description})));destinationTypeOptionsFocused=k(()=>{let e=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return e.map(i=>t.find(n=>n.key===i))});selectedDestinationType=k(()=>{let e=this.#t.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return this.destinationTypeOptions().find(n=>t===n.key)});destinationTypeOptionsNotFocused=k(()=>{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(G(()=>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(["encryption"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=K({type:o,selectors:[["app-restore-destination"]],viewQuery:function(t,i){t&1&&j(i.formRef,Et,5),t&2&&H()},features:[Y([L])],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=X(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 U;U=$localize`Edit target URL`;let v;v=$localize` Be careful, this will overwrite everything you have in your destination. `;let B;return B=$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,U,v,B,[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=d();a(0,"form",10,0),u("submit",function(){return c(n),_(i.next())}),a(2,"header")(3,"h3",11),D(4,2),a(5,"div",12),E(6,Rt,4,5,"button",13),a(7,"spk-menu")(8,"button",14),g(9,"spk-icon"),r(),h(10,15),a(11,"button",16),u("click",function(){return c(n),_(i.openTargetUrlDialog())}),g(12,"spk-icon"),r(),P(),r()(),S(),r(),E(13,Nt,5,1,"p"),r(),E(14,At,9,1),E(15,$t,1,1,"app-single-destination",17),a(16,"div",18)(17,"button",19),u("click",function(){return c(n),_(i.goBack())}),D(18,3),g(19,"spk-icon"),S(),r(),a(20,"button",20),D(21,4),g(22,"spk-icon"),S(),r()()(),E(23,yt,15,4,"spk-dialog",21)}if(t&2){let n=!!i.targetUrlModel();F(6),C(n?-1:6),F(7),C(n?13:-1),F(),C(n?-1:14),F(),C(n?15:-1),F(8),C(i.targetUrlDialogOpen()?23:-1)}},dependencies:[St,gt,pt,lt,ct,_t,Tt,ut,st,Ft,it,at,ot],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}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.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}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{w as default};
1
+ import{g as mt}from"./chunk-4MAZCWVO.js";import{a as Dt,b as St}from"./chunk-VFFFKPK4.js";import"./chunk-5MMV45NA.js";import{c as dt}from"./chunk-FX2XKS5C.js";import{h as L}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 lt,e as ct,f as _t,g as ut,i as Tt,j as pt,s as gt}from"./chunk-ZCT7SRIM.js";import{b as et,d as nt}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as it,b as ot,d as at,e as rt,l as st,o as Ft}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as d,F as G,Fc as k,Gc as Z,Hb as D,Ib as S,Jb as O,Kb as W,Lb as z,Mb as X,Mc as tt,Nb as u,Oa as F,Ob as l,Wb as j,X as p,Xb as H,_a as K,_b as Q,ba as c,bc as f,ca as _,cc as x,dc as q,fa as V,gc as R,hc as N,ic as I,la as T,pb as E,pc as Y,qb as C,qc as J,rb as A,sb as $,tb as y,ub as M,vb as a,wb as r,xb as g,yb as h,zb as P}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var Et=["formRef"],Ct=()=>({maxWidth:"700px",width:"100%"});function Ot(o,e){o&1&&(D(0,2,2),g(1,"spk-icon"),S())}function ft(o,e){o&1&&O(0,2,3)}function Rt(o,e){if(o&1){let t=d();D(0,2,1),a(1,"button",16),u("click",function(){c(t);let n=l();return _(n.testDestination())}),E(2,Ot,2,0)(3,ft,1,0),r(),S()}if(o&2){let t=l();F(),Q("loader",t.testLoading())("success",t.successfulTest()),F(),C(t.successfulTest()?2:3)}}function Nt(o,e){if(o&1){let t=d();a(0,"p",22),u("click",function(){c(t);let n=l();return _(n.removeDestination())}),D(1,5),g(2,"strong")(3,"br")(4,"span",23),S(),r()}if(o&2){let t,i=l();F(4),W((t=i.selectedDestinationType())==null?null:t.displayName),z(1)}}function It(o,e){if(o&1){let t=d();a(0,"div",29),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),a(1,"h3"),f(2),r(),a(3,"p"),f(4),r()()}if(o&2){let t=e.$implicit;F(2),x(t.displayName),F(2),x(t.description)}}function kt(o,e){if(o&1){let t=d();a(0,"button",30,1),u("click",function(){let n=c(t).$implicit,s=l(2);return _(s.setDestination(n.key))}),f(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),$(1,It,5,2,"div",25,A),r(),a(3,"spk-menu",26)(4,"button",27),O(5,6),r(),h(6,15),$(7,kt,3,1,"button",28,A),P(),r()),o&2){let t=l();F(),y(t.destinationTypeOptionsFocused()),F(2),M("searchable",!0),F(4),y(t.destinationTypeOptionsNotFocused())}}function $t(o,e){if(o&1){let t=d();a(0,"app-single-destination",31),I("targetUrlChange",function(n){c(t);let s=l();return N(s.targetUrlModel,n)||(s.targetUrlModel=n),_(n)}),r()}if(o&2){let t=l();R("targetUrl",t.targetUrlModel)}}function yt(o,e){if(o&1){let t=d();a(0,"spk-dialog",32),I("isOpenChange",function(n){c(t);let s=l();return N(s.targetUrlDialogOpen,n)||(s.targetUrlDialogOpen=n),_(n)}),a(1,"header",33)(2,"h2"),O(3,7),r(),a(4,"spk-alert",34),O(5,8),r()(),a(6,"div",35)(7,"spk-form-field")(8,"textarea",36),I("ngModelChange",function(n){c(t);let s=l();return N(s.targetUrlCtrl,n)||(s.targetUrlCtrl=n),_(n)}),r()()(),a(9,"footer",37)(10,"button",19),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!1))}),f(11,"Cancel"),r(),a(12,"button",38),u("click",function(){c(t);let n=l();return _(n.closeTargetUrlDialog(!0))}),D(13,9),g(14,"spk-icon"),S(),r()()()}if(o&2){let t=l();R("isOpen",t.targetUrlDialogOpen),M("options",J(3,Ct)),F(8),R("ngModel",t.targetUrlCtrl)}}var w=class o{#e=p(nt);#n=p(et);#t=p(L);#i=p(rt);#o=p(Dt);injector=p(V);#a=p(mt);formRef=tt.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=T(null);targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);toggleNewDestination=T(!0);targetUrlEffect=Z(()=>{let e=this.#t.targetUrlModel();this.#a.updateTargetUrl(e??null)});successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(dt.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description})));destinationTypeOptionsFocused=k(()=>{let e=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return e.map(i=>t.find(n=>n.key===i))});selectedDestinationType=k(()=>{let e=this.#t.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return this.destinationTypeOptions().find(n=>t===n.key)});destinationTypeOptionsNotFocused=k(()=>{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(G(()=>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(["encryption"],{relativeTo:this.#n.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=K({type:o,selectors:[["app-restore-destination"]],viewQuery:function(t,i){t&1&&j(i.formRef,Et,5),t&2&&H()},features:[Y([L])],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=X(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 U;U=$localize`Edit target URL`;let v;v=$localize` Be careful, this will overwrite everything you have in your destination. `;let B;return B=$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,U,v,B,[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=d();a(0,"form",10,0),u("submit",function(){return c(n),_(i.next())}),a(2,"header")(3,"h3",11),D(4,2),a(5,"div",12),E(6,Rt,4,5,"button",13),a(7,"spk-menu")(8,"button",14),g(9,"spk-icon"),r(),h(10,15),a(11,"button",16),u("click",function(){return c(n),_(i.openTargetUrlDialog())}),g(12,"spk-icon"),r(),P(),r()(),S(),r(),E(13,Nt,5,1,"p"),r(),E(14,At,9,1),E(15,$t,1,1,"app-single-destination",17),a(16,"div",18)(17,"button",19),u("click",function(){return c(n),_(i.goBack())}),D(18,3),g(19,"spk-icon"),S(),r(),a(20,"button",20),D(21,4),g(22,"spk-icon"),S(),r()()(),E(23,yt,15,4,"spk-dialog",21)}if(t&2){let n=!!i.targetUrlModel();F(6),C(n?-1:6),F(7),C(n?13:-1),F(),C(n?-1:14),F(),C(n?15:-1),F(8),C(i.targetUrlDialogOpen()?23:-1)}},dependencies:[St,gt,pt,lt,ct,_t,Tt,ut,st,Ft,it,at,ot],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}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.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}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{w as default};
@@ -1 +1 @@
1
- import{a as x}from"./chunk-BTTHW7KA.js";import{a as Q}from"./chunk-FC45TEB6.js";import{b as U,d as H}from"./chunk-DQM3ATT4.js";import{b as K,c as j,e as W,g as q,p as Y}from"./chunk-5ER6KMMG.js";import{h as J}from"./chunk-XD6MBGQY.js";import{Bb as f,Fc as B,Hb as R,Ib as D,Jb as _,La as M,Lc as S,Nb as u,Oa as r,Ob as s,X as N,_a as A,ac as V,ba as C,bc as F,ca as I,cc as P,dc as z,jc as G,kc as X,lc as O,pb as d,qb as p,sb as b,tb as v,ub as m,vb as a,wb as l,xb as g,yb as y,zb as L}from"./chunk-67YRCRMI.js";function it(n,e){if(n&1&&F(0),n&2){s();let t=O(0);z(" ",t.Message," ")}}function nt(n,e){if(n&1&&(a(0,"div"),R(1,1),g(2,"a",15),D(),l()),n&2){s();let t=O(0);r(2),m("href",t.DownloadLink,M)}}function ot(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doRepair(c.BackupID))}),_(1,2),l()}}function at(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doDownloadBugreport(c))}),_(1,3),l()}}function rt(n,e){if(n&1&&g(0,"spk-progress-bar",17),n&2){let t,o=s(2);m("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function lt(n,e){if(n&1){let t=f();a(0,"div",13),y(1),_(2,4),L(),a(3,"a",16),F(4),l(),d(5,rt,1,1,"spk-progress-bar",17),a(6,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowUpdate())}),_(7,5),l()()}if(n&2){let t,o,i=s(),c=O(0);r(3),m("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,M),r(),P(c.Message),r(),p(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function ct(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doShowLog(c.BackupID))}),_(1,6),l()}}function _t(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function st(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var dt={Error:"error",Warning:"warn",Information:"primary"},E=class n{#t=N(H);#o=N(U);#a=N(W);#e=N(j);#i=N(x);#n=N(J);serverState=this.#i.serverState;index=S.required();notification=S.required();deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(e){return e&&dt[e]||"primary"}doShowLog(e){this.#n.getApiV1BackupByIdIsactive({id:e}).subscribe({next:t=>{this.#t.navigate(["/backup/"+e+"/log"])},error:t=>{if(t.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(e)+""!=e&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#a.open(Q,{maxWidth:"550px",width:"100%",data:o})}else this.#e.error($localize`Failed to find backup: `+t.message)}})}doRepair(e){this.#n.postApiV1BackupByIdRepair({id:e}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#t.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#o})},error:t=>{this.#e.error($localize`Failed to repair backup: `+t.message)}})}doShowUpdate(){this.#t.navigate(["/about/changelog"])}doShowLink(e){window.open(e,"_blank")}doDownloadBugreport(e){let t=e.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:`bugreport/${t}`}).subscribe({next:o=>{if(!o.Token){this.#e.error("Failed to get bug report URL: No token generated");return}e.DownloadLink=o.Token},error:o=>{this.#e.error(`Failed to get bug report URL: ${o.message}`)}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let e;e=$localize`Dismiss`;let t;t=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let c;c=$localize`New update found:`;let $;$=$localize`Show Update`;let h;h=$localize`Show Log`;let k;k=$localize` Show Help `;let w;return w=$localize` Show Help `,[e,t,o,i,c,$,h,k,w,["sparkle-alert-title",""],["sparkle-alert-content","",1,"content"],[1,"actions"],["spk-button","",1,"small","outlined"],[1,"message"],["spk-button","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(t,o){if(t&1){let i=f();G(0),a(1,"spk-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,it,1,1),d(6,nt,3,1,"div"),a(7,"div",11),d(8,ot,2,0,"button",12),d(9,at,2,0,"button",12),d(10,lt,8,3,"div",13),d(11,ct,2,0,"button",12),d(12,_t,2,0,"button",12),d(13,st,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),_(15,0),l()()()()}if(t&2){let i=X(o.notification());r(),V(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),p(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),p(i!=null&&i.DownloadLink?6:-1),r(2),p(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),p(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!i.DownloadLink?9:-1),r(),p(i.Action==="update:new"?10:-1),r(),p(i.Action==="backup:show-log"?11:-1),r(),p(i.Action==="config:issue:unencrypted-database"?12:-1),r(),p(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=(n,e)=>e.ID;function Nt(n,e){if(n&1&&g(0,"app-notification",1),n&2){let t=e.$implicit,o=e.$index;m("index",o)("notification",t)}}function Tt(n,e){n&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var Z=class n{#t=N(x);notificationFilterPredicate=S();notifications=B(()=>{let e=this.notificationFilterPredicate()?.predicate,t=this.#t.notifications();return typeof e!="function"?t:t.filter(e)});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let e;return e=$localize`No more notifications`,[e,[3,"index","notification"],[1,"notification-list"]]},template:function(t,o){t&1&&b(0,Nt,1,2,"app-notification",1,pt,!1,Tt,3,0,"div",2),t&2&&v(o.notifications())},dependencies:[E],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{E as a,Z as b};
1
+ import{a as x}from"./chunk-Y4VREVFM.js";import{a as Q}from"./chunk-FC45TEB6.js";import{b as U,d as H}from"./chunk-DQM3ATT4.js";import{b as K,c as j,e as W,g as q,p as Y}from"./chunk-DNBOZ26J.js";import{h as J}from"./chunk-XD6MBGQY.js";import{Bb as f,Fc as B,Hb as R,Ib as D,Jb as _,La as M,Lc as S,Nb as u,Oa as r,Ob as s,X as N,_a as A,ac as V,ba as C,bc as F,ca as I,cc as P,dc as z,jc as G,kc as X,lc as O,pb as d,qb as p,sb as b,tb as v,ub as m,vb as a,wb as l,xb as g,yb as y,zb as L}from"./chunk-67YRCRMI.js";function it(n,e){if(n&1&&F(0),n&2){s();let t=O(0);z(" ",t.Message," ")}}function nt(n,e){if(n&1&&(a(0,"div"),R(1,1),g(2,"a",15),D(),l()),n&2){s();let t=O(0);r(2),m("href",t.DownloadLink,M)}}function ot(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doRepair(c.BackupID))}),_(1,2),l()}}function at(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doDownloadBugreport(c))}),_(1,3),l()}}function rt(n,e){if(n&1&&g(0,"spk-progress-bar",17),n&2){let t,o=s(2);m("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function lt(n,e){if(n&1){let t=f();a(0,"div",13),y(1),_(2,4),L(),a(3,"a",16),F(4),l(),d(5,rt,1,1,"spk-progress-bar",17),a(6,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowUpdate())}),_(7,5),l()()}if(n&2){let t,o,i=s(),c=O(0);r(3),m("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,M),r(),P(c.Message),r(),p(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function ct(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doShowLog(c.BackupID))}),_(1,6),l()}}function _t(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function st(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var dt={Error:"error",Warning:"warn",Information:"primary"},E=class n{#t=N(H);#o=N(U);#a=N(W);#e=N(j);#i=N(x);#n=N(J);serverState=this.#i.serverState;index=S.required();notification=S.required();deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(e){return e&&dt[e]||"primary"}doShowLog(e){this.#n.getApiV1BackupByIdIsactive({id:e}).subscribe({next:t=>{this.#t.navigate(["/backup/"+e+"/log"])},error:t=>{if(t.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(e)+""!=e&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#a.open(Q,{maxWidth:"550px",width:"100%",data:o})}else this.#e.error($localize`Failed to find backup: `+t.message)}})}doRepair(e){this.#n.postApiV1BackupByIdRepair({id:e}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#t.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#o})},error:t=>{this.#e.error($localize`Failed to repair backup: `+t.message)}})}doShowUpdate(){this.#t.navigate(["/about/changelog"])}doShowLink(e){window.open(e,"_blank")}doDownloadBugreport(e){let t=e.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:`bugreport/${t}`}).subscribe({next:o=>{if(!o.Token){this.#e.error("Failed to get bug report URL: No token generated");return}e.DownloadLink=o.Token},error:o=>{this.#e.error(`Failed to get bug report URL: ${o.message}`)}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let e;e=$localize`Dismiss`;let t;t=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let c;c=$localize`New update found:`;let $;$=$localize`Show Update`;let h;h=$localize`Show Log`;let k;k=$localize` Show Help `;let w;return w=$localize` Show Help `,[e,t,o,i,c,$,h,k,w,["sparkle-alert-title",""],["sparkle-alert-content","",1,"content"],[1,"actions"],["spk-button","",1,"small","outlined"],[1,"message"],["spk-button","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(t,o){if(t&1){let i=f();G(0),a(1,"spk-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,it,1,1),d(6,nt,3,1,"div"),a(7,"div",11),d(8,ot,2,0,"button",12),d(9,at,2,0,"button",12),d(10,lt,8,3,"div",13),d(11,ct,2,0,"button",12),d(12,_t,2,0,"button",12),d(13,st,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),_(15,0),l()()()()}if(t&2){let i=X(o.notification());r(),V(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),p(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),p(i!=null&&i.DownloadLink?6:-1),r(2),p(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),p(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!i.DownloadLink?9:-1),r(),p(i.Action==="update:new"?10:-1),r(),p(i.Action==="backup:show-log"?11:-1),r(),p(i.Action==="config:issue:unencrypted-database"?12:-1),r(),p(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[Y,q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=(n,e)=>e.ID;function Nt(n,e){if(n&1&&g(0,"app-notification",1),n&2){let t=e.$implicit,o=e.$index;m("index",o)("notification",t)}}function Tt(n,e){n&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var Z=class n{#t=N(x);notificationFilterPredicate=S();notifications=B(()=>{let e=this.notificationFilterPredicate()?.predicate,t=this.#t.notifications();return typeof e!="function"?t:t.filter(e)});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let e;return e=$localize`No more notifications`,[e,[3,"index","notification"],[1,"notification-list"]]},template:function(t,o){t&1&&b(0,Nt,1,2,"app-notification",1,pt,!1,Tt,3,0,"div",2),t&2&&v(o.notifications())},dependencies:[E],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{E as a,Z as b};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-IVP5ZHDB.js";import{c as F,d as G,e as T,f as A,j as R,o as D,q,r as V,t as $}from"./chunk-ZCT7SRIM.js";import{d as x}from"./chunk-OQHMS5HM.js";import{d as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as I,b as k,g as O,l as P}from"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as y,F as c,Gc as E,Mc as M,Nb as L,Oa as m,Wb as S,X as l,Xb as v,_a as h,_b as b,ba as g,bc as r,ca as f,la as p,pb as C,qb as _,ub as w,vb as o,wb as i,xb as a}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var z=["passwordInput"];function B(s,e){s&1&&(o(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new V,d=class s{#e=l(N);#t=l(x);failedLogin=p(!1);isLoading=p(!1);loginForm=u.group({user:u.control(""),pass:u.control("",G.required)});passwordInput=M("passwordInput");passwordEffect=E(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=h({type:s,selectors:[["app-login"]],viewQuery:function(t,n){t&1&&S(n.passwordInput,z,5),t&2&&v()},decls:18,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,n){if(t&1){let j=y();o(0,"form",1),L("submit",function(){return g(j),f(n.submit())}),C(1,B,2,0,"spk-alert",2),o(2,"div",3),a(3,"app-logo"),i(),o(4,"div",4),a(5,"input",5),o(6,"spk-form-field")(7,"label",6),r(8," Password "),o(9,"a",7)(10,"spk-icon"),r(11,"question"),i()()(),a(12,"input",8,0),i(),o(14,"button",9),r(15," Login "),o(16,"spk-icon"),r(17,"arrow-right"),i()()()()}t&2&&(w("formGroup",n.loginForm),m(),_(n.failedLogin()?1:-1),m(13),b("loader",n.isLoading()))},dependencies:[$,R,F,T,A,D,q,Q,P,I,O,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
1
+ import{a as Q}from"./chunk-IVP5ZHDB.js";import{c as F,d as G,e as T,f as A,j as R,o as D,q,r as V,t as $}from"./chunk-ZCT7SRIM.js";import{d as x}from"./chunk-OQHMS5HM.js";import{d as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as I,b as k,g as O,l as P}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as y,F as c,Gc as E,Mc as M,Nb as L,Oa as m,Wb as S,X as l,Xb as v,_a as h,_b as b,ba as g,bc as r,ca as f,la as p,pb as C,qb as _,ub as w,vb as o,wb as i,xb as a}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var z=["passwordInput"];function B(s,e){s&1&&(o(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new V,d=class s{#e=l(N);#t=l(x);failedLogin=p(!1);isLoading=p(!1);loginForm=u.group({user:u.control(""),pass:u.control("",G.required)});passwordInput=M("passwordInput");passwordEffect=E(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=h({type:s,selectors:[["app-login"]],viewQuery:function(t,n){t&1&&S(n.passwordInput,z,5),t&2&&v()},decls:18,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,n){if(t&1){let j=y();o(0,"form",1),L("submit",function(){return g(j),f(n.submit())}),C(1,B,2,0,"spk-alert",2),o(2,"div",3),a(3,"app-logo"),i(),o(4,"div",4),a(5,"input",5),o(6,"spk-form-field")(7,"label",6),r(8," Password "),o(9,"a",7)(10,"spk-icon"),r(11,"question"),i()()(),a(12,"input",8,0),i(),o(14,"button",9),r(15," Login "),o(16,"spk-icon"),r(17,"arrow-right"),i()()()()}t&2&&(w("formGroup",n.loginForm),m(),_(n.failedLogin()?1:-1),m(13),b("loader",n.isLoading()))},dependencies:[$,R,F,T,A,D,q,Q,P,I,O,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{ea as dt}from"./chunk-GP2W7XZF.js";import{$b as at,Ab as ge,Bb as ee,Dc as Be,Fc as L,Gc as N,Kc as ce,Lc as O,Mc as ie,Na as tt,Nb as B,Nc as ct,Oa as b,Ob as w,Oc as U,Pb as H,Qa as Ce,Qb as D,Qc as pt,S as be,Sa as Ie,Ua as it,V as Je,Vb as ot,Wb as te,Wc as We,X as j,Xb as se,Yb as rt,Zb as G,_ as Ze,_a as P,_b as z,a as Ke,aa as et,ab as _e,ac as oe,ba as A,bc as V,ca as F,cc as Ae,db as me,dc as ae,ec as Se,fa as Ee,gc as Fe,ha as Te,hc as Le,ic as He,jc as lt,ka as Me,kc as le,la as I,lb as nt,lc as K,ob as st,pb as W,qb as q,qc as je,ra as Q,rb as Ve,rc as ye,sb as Re,tb as Pe,ub as re,vb as _,wb as S,xb as Z}from"./chunk-67YRCRMI.js";import{a as ne,b as pe,c as Ge,d as u,e as E,f as M,g as x}from"./chunk-EUDKD2JW.js";var Y=["*"],wt=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Ot=["[icon]","[title]","*","[content]"];function bt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"info"),S())}function Et(t,e){t&1&&(_(0,"spk-icon",3),V(1,"info"),S())}function Tt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"warning"),S())}function Mt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"warning-octagon"),S())}function It(t,e){t&1&&(_(0,"spk-icon",3),V(1,"check-circle"),S())}function Vt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"question"),S())}function Rt(t,e){if(t&1){let o=ee();_(0,"spk-icon",7),B("click",function(){A(o);let n=w();return F(n.removeAlert())}),V(1,"plus"),S()}}var Pt=["dialogRef"];function At(t,e){if(t&1){let o=ee();_(0,"div",4),B("click",function(){A(o);let n=w();return F(n.isOpen.set(!1))}),S()}}var Ft=["spk-button",""];var Lt=["triggerRef"],Ht=["popoverRef"],jt=[[["","trigger",""]],"*"],Bt=["[trigger]","*"];var Wt=()=>({closeOnButton:!1,closeOnEsc:!0});var qt=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],zt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],ut=["input"],Nt=[[["label"]]],Ut=["label"];function $t(t,e){if(t&1&&(_(0,"div",3),V(1),S()),t&2){let o=w();b(),Ae(o.files()[0].name)}}function Qt(t,e){if(t&1&&(_(0,"div",3),V(1),S()),t&2){let o=w();b(),ae("",o.files().length," files selected")}}function Yt(t,e){if(t&1&&(_(0,"div",4),V(1),S()),t&2){let o=w();b(),Ae(o.filesOver()?o.overlayText():o.placeholder())}}var Xt=["optionsRef"],Gt=["*",[["","menu",""]]],Kt=["*","[menu]"];function Jt(t,e){t&1&&(_(0,"spk-icon",5),V(1,"caret-down"),S())}var Zt=[[["label"]],[["input","type","range"]]],ei=["label","input[type=range]"],ti=["optionsWrap"],ii=[[["label"]],[["input"]],[["textarea"]]],ni=["label","input","textarea"],si=()=>({closeOnButton:!1,closeOnEsc:!1}),Qe=t=>({$implicit:t});function oi(t,e){if(t&1&&V(0),t&2){let o=w();ae(" ",o.inputValue()," ")}}function ri(t,e){t&1&&ge(0)}function ai(t,e){if(t&1&&me(0,ri,1,0,"ng-container",13),t&2){let o=w(3).$implicit;w(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function li(t,e){if(t&1&&V(0),t&2){let o=w(3).$implicit,i=w(2);ae(" ",i.getLabel(o)," ")}}function ci(t,e){if(t&1){let o=ee();_(0,"spk-chip",11),W(1,ai,1,4,"ng-container")(2,li,1,1),_(3,"spk-icon",12),B("click",function(n){A(o);let s=w(2).$index,h=w(2);return F(h.removeSelectedOptionByIndex(n,s))}),V(4,"x-bold"),S()()}if(t&2){let o=w(4),i=K(2);oe(o.selectClasses()),b(),q(i?1:2)}}function pi(t,e){t&1&&ge(0)}function di(t,e){if(t&1&&me(0,pi,1,0,"ng-container",13),t&2){let o=w(4).$implicit;w(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function ui(t,e){if(t&1&&V(0),t&2){let o=w(4).$implicit,i=w(2);ae(" ",i.getLabel(o)," ")}}function hi(t,e){if(t&1&&W(0,di,1,4,"ng-container")(1,ui,1,1),t&2){w(5);let o=K(2);q(o?0:1)}}function fi(t,e){if(t&1&&W(0,hi,2,1),t&2){w(4);let o=K(5);q(o?-1:0)}}function mi(t,e){if(t&1&&W(0,ci,5,3,"spk-chip",10)(1,fi,1,1),t&2){w(3);let o=K(4);q(o?0:1)}}function gi(t,e){if(t&1&&W(0,mi,2,1),t&2){let o=e.$implicit;q(o?0:-1)}}function vi(t,e){if(t&1&&Re(0,gi,1,1,null,null,Ve),t&2){w();let o=K(1);Pe(o)}}function Ci(t,e){t&1&&ge(0)}function _i(t,e){if(t&1&&me(0,Ci,1,0,"ng-container",14),t&2){w(2);let o=K(0);re("ngTemplateOutlet",o)}}function Si(t,e){if(t&1&&V(0),t&2){let o=w(2);ae(" ",o.placeholderText()??""," ")}}function yi(t,e){if(t&1&&W(0,_i,1,1,"ng-container")(1,Si,1,1),t&2){w();let o=K(0);q(o?0:1)}}function ki(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-down"),S())}function xi(t,e){t&1&&Z(0,"spk-spinner",7)}function Di(t,e){t&1&&(_(0,"spk-icon",6),V(1,"list-magnifying-glass"),S())}function wi(t,e){t&1&&(_(0,"spk-icon",6),V(1,"magnifying-glass"),S())}function Oi(t,e){if(t&1){let o=ee();_(0,"spk-icon",15),B("click",function(n){A(o);let s=w();return F(s.clear(n))}),V(1,"x-bold"),S()}}function bi(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-down"),S())}function Ei(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-up"),S())}function Ti(t,e){if(t&1&&Z(0,"spk-checkbox"),t&2){let o=w().$index,i=w();oe(i.selectClasses()),z("active",i.isSelected(o))}}function Mi(t,e){t&1&&ge(0)}function Ii(t,e){if(t&1&&me(0,Mi,1,0,"ng-container",13),t&2){let o=w().$implicit;w();let i=K(3);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function Vi(t,e){if(t&1&&V(0),t&2){let o=w().$implicit,i=w();ae(" ",i.getLabel(o)," ")}}function Ri(t,e){if(t&1){let o=ee();_(0,"li",16),B("click",function(){let n=A(o).$index,s=w();return F(s.toggleOptionByIndex(n))}),W(1,Ti,1,4,"spk-checkbox",17),W(2,Ii,1,4,"ng-container")(3,Vi,1,1),S()}if(t&2){let o=e.$index,i=w(),n=K(3);z("selected",i.isSelected(o))("focused",o===i.focusedOptionIndex()),b(),q(i.selectMultiple()?1:-1),b(),q(n?2:3)}}var Pi=["dragImageElement"],Ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Fi=["[sidenav]","[sidenav-closed-topbar]","*"];function Li(t,e){t&1&&Z(0,"div",1,0)}function Hi(t,e){if(t&1){let o=ee();_(0,"div",7),B("drop",function(n){A(o);let s=w();return F(s.drop(n))})("dragover",function(n){A(o);let s=w();return F(s.dragOver(n))})("dragenter",function(){A(o);let n=w();return F(n.dragEnter())})("dragleave",function(){A(o);let n=w();return F(n.dragLeave())}),S()}}function ji(t,e){if(t&1){let o=ee();_(0,"div",8),B("dragstart",function(n){A(o);let s=w();return F(s.dragStart(n))})("dragend",function(n){A(o);let s=w();return F(s.dragEnd(n))})("drag",function(n){A(o);let s=w();return F(s.drag(n))})("touchstart",function(n){A(o);let s=w();return F(s.touchStart(n))})("touchmove",function(n){A(o);let s=w();return F(s.touchMove(n))})("touchend",function(n){A(o);let s=w();return F(s.touchEnd(n))})("touchcancel",function(n){A(o);let s=w();return F(s.touchCancel(n))}),S()}}var Bi=["thead"],Wi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],qi=["[table-header]","*","[table-no-rows]"];function zi(t,e){t&1&&Z(0,"spk-progress-bar",1)}function Ni(t,e){t&1&&(_(0,"div",2),D(1,2),S())}var Ui=[[["","title",""]],"*"],$i=["[title]","*"];function Qi(t,e){t&1&&V(0,"Title")}function Yi(t,e){t&1&&(_(0,"spk-icon",1),V(1,"caret-down"),S())}var qe=["bold","thin","light","fill"],ue=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}get currentClass(){let n=u(this,e).nativeElement.innerText;for(let s=0;s<qe.length;s++)if(n.endsWith(qe[s]))return qe[s];return""}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(s,h){s&2&&oe(h.currentClass)},ngContentSelectors:Y,decls:1,vars:0,template:function(s,h){s&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),bn=(()=>{let e=class e{constructor(){this._el=j(Q),this.alertService=O(null),this.id=O(null),this.alertClasses=L(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Ot,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(n,s){if(n&1&&(H(wt),_(0,"div",1)(1,"div",2,0),D(3),S(),_(4,"div",2),W(5,bt,2,0,"spk-icon",3)(6,Et,2,0,"spk-icon",3)(7,Tt,2,0,"spk-icon",3)(8,Mt,2,0,"spk-icon",3)(9,It,2,0,"spk-icon",3)(10,Vt,2,0,"spk-icon",3),S(),_(11,"div",4),D(12,1),D(13,2),S(),W(14,Rt,2,0,"spk-icon",5),_(15,"div",6),D(16,3),S()()),n&2){let h=rt(2);b(),G("display",h.children.length?"block":"none");let m=s.alertClasses();b(4),q(m.includes("primary")?5:m.includes("accent")?6:m.includes("warn")?7:m.includes("error")?8:m.includes("success")?9:10),b(9),q(s.id()?14:-1)}},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})();function Ye(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var En=(()=>{let e=class e{constructor(){this.alertHistory=I([]),this.alertHistoryIsOpen=I(!1),this.alertHistoryIsHidden=I(!0)}error(i){this.addAlert({type:"error",title:i??"An error occured"})}success(i){this.addAlert({type:"success",title:i})}question(i){this.addAlert({type:"question",title:i})}warning(i){this.addAlert({type:"warn",title:i})}info(i){this.addAlert({type:"primary",title:i})}addAlert(i){let n=Ye();this.alertHistory.update(s=>[pe(ne({},i),{isOpen:!0,animateIn:!0,animateOut:!1,id:n}),...s]),setTimeout(()=>{this.alertHistory.update(s=>s.map(h=>pe(ne({},h),{animateIn:h.id===n?!1:h.animateIn})))},40),setTimeout(()=>{this.hideAlert(n)},2500)}removeAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{animateOut:s.id===i?!1:s.animateOut}))),setTimeout(()=>{this.alertHistory.update(n=>n.filter(s=>s.id!==i))},300)}hideAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{isOpen:s.id===i?!1:s.isOpen})))}setHidden(i){this.alertHistoryIsHidden.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Oe=new Je("Sparkle UI Config"),Xi={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Gi=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(Oe,{optional:!0})),this.dialogRef=ie("dialogRef"),this.isOpen=U(!1),this.options=O(),this.closed=ce(),this.defaultOptionMerge=L(()=>ne(pe(ne({},Xi),{class:u(this,e)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=N(()=>{let n=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(n?.showModal(),n?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",s=>{s.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&s.preventDefault(),s.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),n?.close())})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-dialog"]],viewQuery:function(s,h){s&1&&te(h.dialogRef,Pt,5),s&2&&se()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Y,decls:5,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(s,h){if(s&1&&(H(),_(0,"dialog",1,0)(2,"div",2),D(3),S(),W(4,At,1,0,"div",3),S()),s&2){let m=h.defaultOptionMerge();oe(m.class),G("width",m.width??"")("max-width",m.maxWidth??"")("max-height",m.maxHeight??"")("height",m.height??""),b(4),q(h.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0});let t=o;return t})(),Tn=(()=>{var e,o,i,ht,ve;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,document.querySelector("body")),M(this,o,j(nt)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(p,r){let d=u(this,o).injector,g=x(this,i,ht).call(this),k=r||{},{data:v,closed:a}=k,l=Ge(k,["data","closed"]);this.compRef&&x(this,i,ve).call(this),this.insertedCompRef=We(p,{environmentInjector:d}),this.compRef=We(Gi,{hostElement:g,environmentInjector:d,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let c=this.insertedCompRef.instance?.data,f=this.insertedCompRef.instance?.closed;if(v){if(Me(c))this.insertedCompRef.setInput("data",v);else if(!Me(c))throw new Error("data is not an input signal on the passed component")}f instanceof Be&&(this.closedFieldSub=f.subscribe((...T)=>{a?.(...T),x(this,i,ve).call(this)})),u(this,o).attachView(this.insertedCompRef.hostView),u(this,o).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",l),this.compRef.instance.closed.subscribe(()=>C());let y=this;function C(){var T;f&&f instanceof Be?f.emit(!1):a?.(void 0),x(T=y,i,ve).call(T)}return{component:this.insertedCompRef.instance,close:C}}ngOnDestroy(){x(this,i,ve).call(this)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,ht=function(){let p=document.createElement("spk-dialog-ref");return p.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||u(this,e).append(p),document.getElementById("spk-dialog-ref")},ve=function(){this.insertedCompRef&&(u(this,o).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(u(this,o).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},h.\u0275fac=function(r){return new(r||h)},h.\u0275prov=be({token:h,factory:h.\u0275fac,providedIn:"root"});let t=h;return t})(),Mn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-button-group"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Ki=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["","spk-button",""]],attrs:Ft,ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),In=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(Oe,{optional:!0})),this.class=I(u(this,e)?.cardType??"default")}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-card"]],hostVars:2,hostBindings:function(s,h){s&2&&oe(h.class())},ngContentSelectors:Y,decls:1,vars:0,template:function(s,h){s&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),Ji=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-checkbox"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:Y,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(s,h){s&1&&(H(),_(0,"div",0)(1,"spk-icon",1),V(2,"check"),S(),_(3,"spk-icon",2),V(4,"minus"),S()(),D(5))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=o;return t})(),Zi=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-chip"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var en=["scroll","auto"],tn={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},ft=(()=>{var e,o,i,mt,ke;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,j(pt)),M(this,o,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=O(!1),this.right=O(!1),this.asMultiLayer=O(!1),this.markForCheck=O(null),this._above=I(this.above()),this._right=I(this.right()),this.disableOpenByClick=O(!1),this.isOpen=U(!1),this.options=O(),this.closed=ce(),this.defaultOptionMerge=L(()=>ne(ne({},tn),this.options())),this.triggerRef=ie.required("triggerRef"),this.popoverRef=ie.required("popoverRef"),this.id=I("--"+Ye()),this.menuStyle=I(null),this.openAbort=null,this.openEffect=N(()=>{let p=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let d={signal:this.openAbort?.signal};p?.showPopover(),document.addEventListener("keydown",g=>{g.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&g.preventDefault(),g.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},d),setTimeout(()=>{x(this,i,mt).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>x(this,i,ke).call(this),d),window.addEventListener("resize",()=>x(this,i,ke).call(this),d),x(this,i,ke).call(this)})}else p.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=N(()=>{this.markForCheck()&&u(this,e).markForCheck()})}toggleIsOpen(p){p.preventDefault(),p.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(p){p.stopPropagation(),p.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,mt=function(p){let r=p.parentElement;for(;r;){if(en.indexOf(window.getComputedStyle(r).overflowY)>-1&&r.scrollHeight>r.clientHeight)return r;r=r.parentElement}return document.documentElement},ke=function(){let p=this.triggerRef()?.nativeElement.getBoundingClientRect(),r=this.popoverRef()?.nativeElement.getBoundingClientRect(),d=p.left,g=p.bottom,v=d,a=g+u(this,o),l=v+r.width>window.innerWidth,c=a+r.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(c),this._right.set(l);else{if(v=d,a=g+u(this,o),c){let y=p.top-r.height-u(this,o);y<0||(a=y)}l&&(v=p.right-r.width,v<0&&(v=0));let f={left:v+"px",top:a+"px"};this.menuStyle.set(f)}},h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=P({type:h,selectors:[["spk-popover"]],viewQuery:function(r,d){r&1&&(te(d.triggerRef,Lt,5),te(d.popoverRef,Ht,5)),r&2&&se(2)},hostVars:6,hostBindings:function(r,d){r&2&&z("above",d.above())("right",d.right())("multi-layer",d.asMultiLayer())},inputs:{above:[1,"above"],right:[1,"right"],asMultiLayer:[1,"asMultiLayer"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Bt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(r,d){if(r&1){let g=ee();H(jt),_(0,"div",2,0),B("click",function(a){return A(g),F(d.toggleIsOpen(a))}),_(2,"div",3),D(3),S(),_(4,"button",4),V(5,"Open popover"),S()(),_(6,"div",5,1)(8,"div",6),B("click",function(a){return A(g),F(d.isOpen()&&d.eventClose(a))}),S(),D(9,1),S()}r&2&&(G("anchor-name",d.id()),b(6),at(d.menuStyle()),G("position-anchor",d.id()))},dependencies:[Ki],encapsulation:2,changeDetection:0});let t=h;return t})();var Vn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-divider"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Xe=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus(),u(this,e).nativeElement.querySelector("textarea")&&u(this,e).nativeElement.querySelector("textarea").focus()}ngOnInit(){let n=typeof CSS<"u"&&CSS.supports("field-sizing","content"),s=u(this,e).nativeElement.querySelector("textarea");if(!n&&s!==null){let p=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},r=function(){window.setTimeout(p,0)};var h=p,m=r;s.addEventListener("change",p),s.addEventListener("cut",r),s.addEventListener("paste",r),s.addEventListener("drop",r),s.addEventListener("keydown",r),s.focus(),s.select(),p()}}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-form-field"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:zt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(s,h){s&1&&(H(qt),D(0),_(1,"div",0)(2,"div",1),D(3,1),D(4,2),S(),D(5,3),D(6,4),_(7,"div",2),D(8,5),D(9,6),S()(),_(10,"div",3)(11,"div",4),D(12,7),S(),_(13,"div",5),D(14,8),S()())},encapsulation:2,changeDetection:0});let t=o;return t})(),Rn=(()=>{let e=class e{constructor(){this._el=j(Q),this.inputRef=ie.required("input"),this.filesOver=I(!1),this.multiple=O(),this.accept=O(null),this.placeholder=U("Click or drag files here"),this.overlayText=O("Drop files here"),this.files=U([]),this.fileUploadClasses=L(()=>this._el.nativeElement.classList.toString()),this.inputEffect=N(()=>{let i=this.inputRef().nativeElement;i&&(i.placeholder&&this.placeholder.set(i.placeholder),i.addEventListener("dragover",n=>{n.preventDefault(),this.filesOver.set(!0)}),i.addEventListener("dragleave",n=>{n.preventDefault(),this.filesOver.set(!1)}),i.addEventListener("drop",n=>{n.preventDefault(),this.filesOver.set(!1);let s=n.dataTransfer?.files;s&&s.length>0&&(this.handleFileUpload(Array.from(s)),i.files=s)}),i.addEventListener("change",n=>{n.preventDefault(),this.handleFileUpload(Array.from(n.target.files))}))})}handleFileUpload(i){this.multiple()?this.files.update(n=>[...n,...i]):this.files.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-file-upload"]],viewQuery:function(n,s){n&1&&te(s.inputRef,ut,5),n&2&&se()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:Ut,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(n,s){n&1&&(H(Nt),_(0,"spk-form-field"),D(1,0,["ngProjectAs","label",5,["label"]]),_(2,"div",2,0),W(4,$t,2,1,"div",3)(5,Qt,2,1,"div",3)(6,Yt,2,1,"div",4),Z(7,"input",5,1)(9,"div",6),S(),_(10,"spk-icon",7),V(11,"upload-simple"),S()()),n&2&&(oe(s.fileUploadClasses()),b(4),q(s.files().length===1?4:s.files().length>1?5:6),b(3),st("multiple",s.multiple())("accept",s.accept()),b(2),z("files-over",s.filesOver()))},dependencies:[Xe,ue],encapsulation:2,changeDetection:0});let t=e;return t})(),Pn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-list"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();function gt(t,e){let o=e?.injector||(et(gt),j(Ee)),{debounce:i=0,initialValue:n=void 0,transform:s=C=>C,compare:h=(C,k)=>C===k,forceType:m=void 0,returnPreviousValue:p=!0}=e||{},r=I(n),d=o.get(Te),g=L(()=>{let C=t()?.nativeElement;if(C instanceof HTMLInputElement||C instanceof HTMLTextAreaElement)return f(C)}),v=!1,a,l=null;return N(()=>{let C=g();if(!C)return r.set(p&&a?s(a):void 0);n!==void 0&&C.value===""?r.set(n):C.value!==""&&c();let k=T=>{l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,c()},i)};C.addEventListener("input",k),C.addEventListener("inputValueChanged",k),d.onDestroy(()=>{C.removeEventListener("input",k),C.removeEventListener("inputValueChanged",k),l!==null&&clearTimeout(l)})},{injector:o}),N(()=>{let C=g();if(!C)return;let k=r()??"",T=k==null?"":String(k);C.value!==T&&(a=T,C.value=T,C.dispatchEvent(new Event("input")))},{injector:o}),r;function c(){if(!v){v=!0;try{let C=g();if(!C)return;let k=C.value,T=m?y(k,m):s(k);a=k,h(r(),T)||r.set(T)}finally{v=!1}}}function f(C){return Object.defineProperty(C,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").get.call(this)},set(k){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").set.call(this,k);let R=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:k}});return this.dispatchEvent(R),k}}),C}function y(C,k){switch(k){case"string":return C.toString();case"number":let T=Number(C);return isNaN(T)?void 0:T;case"boolean":return C.toLowerCase()==="true"?!0:C.toLowerCase()==="false"?!1:void 0;default:return C}}}function vt(t,e){let o=j(Ee),i=o.get(Te),n=I([]),s=null,h=null,m=(r,d)=>{h&&h.disconnect();let g=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(g),h=new MutationObserver(v=>{requestAnimationFrame(()=>{let a=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(a)})}),h.observe(r.nativeElement,{childList:!0,subtree:!0}),i.onDestroy(()=>p())};s=N(()=>{let r=typeof t=="function"&&t[Ke]?t():t,d=typeof e=="function"?e():e;r&&d?.length>0?m(r,d):(n.set([]),h&&(h.disconnect(),h=null))},{injector:o});function p(){s&&s.destroy(),h&&h.disconnect()}return{signal:n.asReadonly(),destroy:p}}var An=(()=>{var e,o,Ct,ze;let s=class s{constructor(){E(this,o);E(this,e);M(this,e,j(Ie)),this.above=O(!1),this.right=O(!1),this.asMultiLayer=O(!1),this.openIndicator=O(!1),this.disabled=O(!1),this.customOptionElementSelectors=O(["button"]),this.keepClickedOptionActive=O(!1),this.closeOnClick=O(!0),this.isOpen=U(!1),this.closed=ce(),this.searchable=O(!1),this.activeOptionIndex=I(-1),this.inputRef=ie("input"),this.optionsRef=ie("optionsRef"),this.options=vt(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=L(()=>this.options.signal().filter(m=>!m.disabled)),this.inputValue=gt(this.inputRef),this.abortController=null,this.optionsEffect=N(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let m=this.inputRef()?.nativeElement;m&&(queueMicrotask(()=>m.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,g=this.activeElements();if(!g.length){let a=this.optionsEl();this.activeElements.set(a),g=a}let v=g.findIndex(a=>a===d);v>-1&&(this.activeOptionIndex.set(v),m.focus())}),m.addEventListener("keydown",p=>{let r=this.activeOptionIndex();p.key==="ArrowDown"?(p.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):p.key==="ArrowUp"?(p.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):p.key==="Enter"?(p.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):p.key==="Tab"&&(p.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=I([]),this.lastInputValue="",this.inputValueEffect=N(()=>{if(!this.searchable())return;let p=(this.inputValue()??"").toLowerCase();if(x(this,o,ze).call(this),!p||p==="")return;let r=this._lastElementList.length&&p.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=p;for(let d=0;d<r.length;d++){let g=r[d],v=g.textContent?.toLowerCase()||"",a=x(this,o,Ct).call(this,v,p);g.value=a}r=r.filter(d=>d.value>0).sort((d,g)=>g.value-d.value);for(let d=0;d<r.length;d++)u(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=N(()=>{let m=this.activeElements(),p=this.activeOptionIndex();for(let r=0;r<m.length;r++)m[r].classList.remove("active");p>-1&&(m[p].scrollIntoView({block:"center"}),m[p].classList.add("active"))})}nextActiveIndex(m){let p=this.activeElements();if(!p.length){let d=this.optionsEl();this.activeElements.set(d),p=d}if(m===-1||m===p.length-1)return 0;let r=m+1;return p[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(m){let p=this.activeElements();if(!p.length){let d=this.optionsEl();this.activeElements.set(d),p=d}if(m===0||m===-1)return p.length-1;let r=m-1;return p[r].disabled?this.prevActiveIndex(r):r}close(m="closed",p){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||m==="closed")&&x(this,o,ze).call(this),this.isOpen.set(!1),this.closed.emit(m==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,o=new WeakSet,Ct=function(m,p){if(!p)return 0;let r=0,d=-1,g=0,v=!0;for(let a=0;a<p.length;a++){let l=p[a];if(m.length>d+1&&m[d+1]===l)r+=a===0?100:150,d++,g++;else{let c=m.indexOf(l,d+1);if(a>0&&(v=!1),c===-1)return 0;r+=100,d=c,g++}}return v&&p.length===g&&(r+=1e3),r+=g*20,r},ze=function(){this.activeOptionIndex.set(-1);let m=this.optionsEl();for(let p=0;p<m.length;p++)m[p].classList.remove("active")},s.\u0275fac=function(p){return new(p||s)},s.\u0275cmp=P({type:s,selectors:[["spk-menu"]],viewQuery:function(p,r){p&1&&(te(r.inputRef,ut,5),te(r.optionsRef,Xt,5)),p&2&&se(2)},hostVars:6,hostBindings:function(p,r){p&2&&z("disabled",r.disabled())("has-search",r.searchable())("multi-layer",r.asMultiLayer())},inputs:{above:[1,"above"],right:[1,"right"],asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Kt,decls:12,vars:14,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(p,r){if(p&1){let d=ee();H(Gt),_(0,"spk-popover",3,0),He("isOpenChange",function(v){return A(d),Le(r.isOpen,v)||(r.isOpen=v),F(v)}),B("closed",function(){return A(d),F(r.close("fromPopover"))}),_(2,"div",4),B("click",function(){return A(d),F(!r.disabled()&&r.isOpen.set(!0))}),D(3),W(4,Jt,2,0,"spk-icon",5),S(),_(5,"div",6)(6,"spk-form-field",7),Z(7,"input",8,1),S()(),_(9,"div",9,2),B("click",function(){return A(d),F(r.close("active"))}),D(11,1),S()()}p&2&&(Fe("isOpen",r.isOpen),re("disableOpenByClick",!0)("above",r.above())("right",r.right())("asMultiLayer",r.asMultiLayer())("options",je(13,Wt)),b(2),z("is-open",r.isOpen()),b(2),q(r.openIndicator()?4:-1),b(2),z("hidden",r.searchable()===!1),b(3),z("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[ft,Xe,ue],encapsulation:2,changeDetection:0});let t=s;return t})(),nn=(()=>{let e=class e{constructor(){this.value=O(void 0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(n,s){n&1&&Z(0,"div",0),n&2&&G("width",s.value(),"%")},encapsulation:2,changeDetection:0});let t=e;return t})(),Fn=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-radio"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"radio"]],template:function(s,h){s&1&&(H(),Z(0,"div",0),D(1))},encapsulation:2,changeDetection:0});let t=o;return t})(),Ln=(()=>{var e,o,i,n,s,Ne,_t,St,yt;let d=class d{constructor(){E(this,s);E(this,e);E(this,o);E(this,i);E(this,n);M(this,e,j(Q)),M(this,o,null),M(this,i,null),M(this,n,0),this.alwaysShowThumb=O(!1),this.unit=O(""),this.value=U(u(this,n)),this.inputState=I({min:0,max:100,step:1}),this.valuePercentage=L(()=>{let{min:v,max:a}=this.inputState(),l=this.value()??v;if(isNaN(l))return 0;let c=a-v;if(c===0)return 0;let f=(l-v)/c*100;return Math.max(0,Math.min(100,f))}),this.trackFilledPercentage=L(()=>this.valuePercentage()),this.thumbPositionPercentage=L(()=>this.valuePercentage()),this.syncModelToInputEffect=N(()=>{let v=this.value();if(u(this,i)){let a=parseFloat(u(this,i).value);(isNaN(a)||String(a)!==String(v))&&(u(this,i).value=String(v))}})}get hasInputElement(){return!!u(this,i)}ngAfterViewInit(){M(this,i,u(this,e).nativeElement.querySelector('input[type="range"]')),u(this,i)?(x(this,s,yt).call(this,u(this,i)),u(this,i).oninput=()=>{this.setNewInputValue(u(this,i).value)},u(this,i).addEventListener("inputValueChanged",v=>{this.setNewInputValue(v.detail.value)}),queueMicrotask(()=>x(this,s,Ne).call(this,!0)),x(this,s,_t).call(this)):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(v){let a=parseFloat(v??"0");if(!isNaN(a)){let{min:l,max:c}=this.inputState();this.value.set(Math.max(l,Math.min(c,a)))}}trackEvent(v){if(!u(this,i)||u(this,i).readOnly||u(this,i).disabled){v.preventDefault(),v.stopPropagation();return}if(v.target===u(this,i)||v.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let l=v.currentTarget.getBoundingClientRect(),c=v.clientX-l.left,f=l.width,{min:y,max:C,step:k}=this.inputState(),T=C-y;if(f>0&&T!==0&&k>0){let $=(c/f*T+y-y)/k,J=y+Math.round($)*k,he=x(this,s,St).call(this,k);J=parseFloat(J.toFixed(he));let fe=Math.max(y,Math.min(C,J));this.value.set(fe)}}ngOnDestroy(){u(this,o)&&u(this,o).disconnect(),u(this,i)&&(u(this,i).oninput=null)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,Ne=function(v=!1){if(!u(this,i))return;let a=parseFloat(u(this,i).min??"0")??0,l=parseFloat(u(this,i).max??"100")??100,c=u(this,i).step,f=1;if(c&&c.toLowerCase()!=="any"){let C=parseFloat(c);!isNaN(C)&&C>0&&(f=C)}this.inputState.set({min:a,max:l,step:f});let y=parseFloat(u(this,i).value??String(a))??a;if(v&&this.value()!==u(this,n)){let C=this.value(),k=Math.max(a,Math.min(l,C));y!==k&&(u(this,i).value=String(k)),C!==k&&this.value.set(k)}else{let C=Math.max(a,Math.min(l,y));this.value()!==C&&this.value.set(C)}},_t=function(){if(!u(this,i)||typeof MutationObserver>"u")return;let v=["min","max","step","value","readonly","disabled"];M(this,o,new MutationObserver(a=>{let l=!1;for(let c of a)if(c.type==="attributes"&&v.includes(c.attributeName??"")){l=!0;break}l&&x(this,s,Ne).call(this,!1)})),u(this,o).observe(u(this,i),{attributes:!0})},St=function(v){if(isNaN(v)||Math.floor(v)===v)return 0;let l=v.toString().split(".")[1];return l?l.length:0},yt=function(v){Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(a){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,a);let c=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:a}});return this.dispatchEvent(c),a}})},d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=P({type:d,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(a,l){a&2&&z("has-input",l.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:ei,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(a,l){a&1&&(H(Zt),_(0,"div",0),D(1),S(),_(2,"div",1)(3,"div",2),V(4),S(),_(5,"div",3),B("click",function(f){return l.trackEvent(f)}),D(6,1),_(7,"div",4),Z(8,"div",5),S(),_(9,"div",6)(10,"div",7)(11,"div",8),V(12),S()()()(),_(13,"div",9),V(14),S()()),a&2&&(b(4),Se("",l.inputState().min,"",l.unit()),b(4),G("width",l.trackFilledPercentage(),"%"),b(),G("left",l.thumbPositionPercentage(),"%"),b(),z("always-show",l.alwaysShowThumb()),b(2),Se("",l.value(),"",l.unit()),b(2),Se("",l.inputState().max,"",l.unit()))},encapsulation:2,changeDetection:0});let t=d;return t})(),sn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(n,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),Hn=(()=>{var e,o,i,Ue,s,$e,X,kt,xt,Dt;let g=class g{constructor(){E(this,i);E(this,e);E(this,o);E(this,s);M(this,e,j(Q)),this.value=O(),this.label=O(),this.asFreeText=O(!1),this.placeholder=O(),this.readonly=U(!1),this.disabled=U(!1),this.lazySearch=O(!1),this.inlineSearch=O(!1),this.asText=O(!1),this.isClearable=O(!0),this.selectMultiple=O(!1),this.optionTemplate=O(null),this.selectedOptionTemplate=O(null),this.placeholderTemplate=O(null),this.isOpen=U(!1),this.isLoading=U(!1),this.options=U([]),this.selectedOptions=U([]),this.cleared=ce(),this.inlineTemplate=ct(Ce),this.optionsWrapRef=ie.required("optionsWrap"),this.inputRefInput=I(null),M(this,o,typeof MutationObserver<"u"&&new MutationObserver(a=>{for(var l of a)l&&(l.target.nodeName==="INPUT"||l.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Q(l.target)),u(this,o).disconnect())})),this.inputValue=I(""),this.prevInputValue=I(null),this.focusedOptionIndex=I(-1),this._isClearable=L(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=L(()=>u(this,e).nativeElement.classList.toString()),this.stretch=L(()=>this.selectClasses().includes("stretch")),this.placeholderText=L(()=>{let a=this.placeholder(),l=this.inputRefEl();return a||l?.placeholder||null}),this.selectedOptionValues=L(()=>{let a=this.selectedOptions(),l=this.value();return l?a.map(c=>x(this,i,X).call(this,c,l)):a}),this.filteredOptions=L(()=>{let a=this.options()||[],l=this.label(),c=this.value(),f=this.inlineSearch(),y=this.inputValue().toLowerCase(),C=x(this,i,xt).call(this,y);if(a.length<=0)return[];if(!f||y==="")return a;let T=a.filter(R=>{let $=l?(x(this,i,X).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),J=((c?x(this,i,X).call(this,R,c):R)??"").toString().toLowerCase(),he=C.test($),fe=C.test(J);return he||fe}).map(R=>{let $=l?(x(this,i,X).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),J=((c?x(this,i,X).call(this,R,c):R)??"").toString().toLowerCase(),he=x(this,i,Ue).call(this,$,y),fe=x(this,i,Ue).call(this,J,y);return{item:R,score:Math.max(he,fe)}});return T.sort((R,$)=>$.score-R.score),T.map(R=>R.item)}),this.inputRefEl=L(()=>{let a=this.inputRefInput();if(a===null)return;let l=a?a.nativeElement:null;return l?(l.autocomplete="off",x(this,i,kt).call(this,l),l.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&l.addEventListener("input",c=>{let f=c.target.value,y=this.inputValue();f!==y&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(f),this.updateInputElValue())}),l.addEventListener("inputValueChanged",c=>{let f=c.detail.value,y=this.inputValue();if(f!==y){if(f===""){this.clear();return}this.setSelectedOptionsFromValue(f),this.setInputValueFromSelectedOptions(),x(this,i,$e).call(this)}}),l):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=N(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let l=this.inputRefEl();if(!l)return;l.addEventListener("keydown",c=>{if((c.key==="Escape"||c.key==="Tab")&&(c.preventDefault(),this.close()),(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),c.key==="ArrowDown"){c.preventDefault();let f=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(f>this.filteredOptions().length-1?0:f)}if(c.key==="ArrowUp"){c.preventDefault();let f=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(f<0?this.filteredOptions().length-1:f)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=N(()=>{let a=this.inputValue();this._inputValue=a}),this.inputRefElEffect=N(()=>{let a=this.inputRefEl();a&&a.value!==this._inputValue&&(this.disabled.set(a.disabled),this.setSelectedOptionsFromValue(a.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=L(()=>{let a=this.selectedOptions();return this.label()?a.map(c=>this.getLabel(c)).join(", "):a.join(", ")}),this.inputState=L(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=L(()=>this.inlineSearch()||this.lazySearch()),M(this,s,N(()=>{if(this.selectMultiple()&&this.hasSearch())return;let a=this.selectedOptions(),l=this.value(),c=a.map(f=>l?x(this,i,X).call(this,f,l):f).join(",");this.inputValue.set(c)}))}ngOnInit(){this.setInitInput()}setInitInput(){let a=u(this,e).nativeElement.querySelector("input");if(a){this.inputRefInput.set(new Q(a));return}let l=u(this,e).nativeElement.querySelector("textarea");if(l){this.inputRefInput.set(new Q(l));return}typeof MutationObserver<"u"&&u(this,o).observe(u(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(a){let l=this.options()||[],c=this.value(),f=this.selectMultiple(),y=a.toString().split(",");if(y.length===0){this.selectedOptions.set([]);return}let C=f?y:[y[0]],k=l.filter(T=>{let R=c?x(this,i,X).call(this,T,c)?.toString():T?.toString();return R&&C.includes(R)});this.selectedOptions.set(f?k:[k[0]])}setInputValueFromSelectedOptions(){let a=this.selectedOptions(),l=this.value();if(a.length===0){this.inputValue.set(""),this.updateInputElValue();return}let c=a.map(f=>l?x(this,i,X).call(this,f,l):f).join(",");this.inputValue.set(c),this.updateInputElValue()}getLabel(a){let l=this.label();return l?x(this,i,X).call(this,a,l):a}toggleOptionByIndex(a,l){let c=this.filteredOptions()[a];if(this.asFreeText()&&a===-1||!c){this.close();return}l&&l.stopPropagation();let f=this.selectMultiple(),y=this._isClearable(),C=this.value(),k=this.selectedOptionValues(),T=C?x(this,i,X).call(this,c,C):c;this.prevInputValue.set(null),this.selectedOptions.update(R=>{let $=k.indexOf(T);if($>-1){let J=[...R.slice(0,$),...R.slice($+1)];return y||J.length>0?J:R}else return this.focusedOptionIndex.set(a),f?[...R,c]:[c]}),f?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),f&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(a,l){a.stopPropagation(),this.selectedOptions.update(c=>[...c.slice(0,l),...c.slice(l+1)]),this.setInputValueFromSelectedOptions()}isSelected(a){let l=this.value(),c=this.filteredOptions()[a],f=l?x(this,i,X).call(this,c,l):c;return this.selectedOptionValues().indexOf(f)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||x(this,i,$e).call(this))}close(){this.isOpen.set(!1);let a=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&a&&(this.inputValue.set(a),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(a){a?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let a=this.inputRefEl(),l=this.inputValue();a&&(a.value=l,a.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&u(this,o).disconnect()}};e=new WeakMap,o=new WeakMap,i=new WeakSet,Ue=function(a,l){if(!l)return 0;let c=0,f=-1,y=0,C=!0;for(let k=0;k<l.length;k++){let T=l[k];if(a.length>f+1&&a[f+1]===T)c+=k===0?100:150,f++,y++;else{let R=a.indexOf(T,f+1);if(k>0&&(C=!1),R===-1)return 0;c+=100,f=R,y++}}return C&&l.length===y&&(c+=1e3),c+=y*20,c},s=new WeakMap,$e=function(){let a=this.selectedOptionValues()[0],l=this.value();if(a){let c=this.filteredOptions().findIndex(f=>l?x(this,i,X).call(this,f,l)===a:f===a);this.focusedOptionIndex.set(c)}else this.focusedOptionIndex.set(-1)},X=function(a,l){return l.split(".").reduce((c,f)=>c?.[f],a)},kt=function(a){Object.defineProperty(a,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").get.call(this)},set(l){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").set.call(this,l);let f=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:l}});return this.dispatchEvent(f),l}})},xt=function(a){let l=(a??"").toLowerCase(),c="^";for(let f of l)c+=".*"+x(this,i,Dt).call(this,f);return c+=".*$",new RegExp(c,"i")},Dt=function(a){return a.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},g.\u0275fac=function(l){return new(l||g)},g.\u0275cmp=P({type:g,selectors:[["spk-select"]],contentQueries:function(l,c,f){l&1&&ot(f,c.inlineTemplate,Ce,5),l&2&&se()},viewQuery:function(l,c){l&1&&te(c.optionsWrapRef,ti,5),l&2&&se()},hostVars:2,hostBindings:function(l,c){l&2&&z("multiple",c.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:ni,decls:28,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(l,c){if(l&1){let f=ee();H(ii),lt(0)(1)(2)(3)(4)(5),_(6,"spk-popover",2,0),He("isOpenChange",function(C){return A(f),Le(c.isOpen,C)||(c.isOpen=C),F(C)}),B("closed",function(){return A(f),F(c.close())}),_(8,"spk-form-field",3),B("click",function(){return A(f),F(c.open())}),D(9,0,["ngProjectAs","label",5,["label"]]),_(10,"div",4)(11,"div",5),W(12,oi,1,1)(13,vi,2,0)(14,yi,2,1),D(15,1),D(16,2),S()(),W(17,ki,2,0,"spk-icon",6)(18,xi,1,0,"spk-spinner",7)(19,Di,2,0,"spk-icon",6)(20,wi,2,0,"spk-icon",6)(21,Oi,2,0,"spk-icon",6)(22,bi,2,0,"spk-icon",6)(23,Ei,2,0,"spk-icon",6),S(),_(24,"div",8,1),Re(26,Ri,4,6,"li",9,Ve),S()()}if(l&2){le(c.placeholderTemplate());let f=c.optionTemplate(),y=c.selectedOptionTemplate(),C=c.inlineTemplate();b();let k=le(c.selectedOptions()),T=c.inputState();b(),le(y||f||C),b(),le(f||C),b();let R=le(!c.asText()&&c.selectMultiple());b();let $=le(c.isOpen()&&c.hasSearch()&&(R||c.inputValue().length>0));b(),Fe("isOpen",c.isOpen),re("disableOpenByClick",!0)("options",je(21,si)),b(2),z("stretch",c.stretch())("autosize",c.selectMultiple())("readonly",c.readonly()||c.disabled()),b(2),z("show-search-text",$),b(),z("is-selected",T==="selected"),b(),q(c.asFreeText()&&c.inputValue().length>0&&!c.isOpen()?12:k.length>0?13:$?-1:14),b(5),q(T==="closed"?17:T==="loading"?18:T==="open-searching"?19:T==="searching"?20:T==="selected"&&c._isClearable()?21:T==="selected"&&!c._isClearable()?22:23),b(9),Pe(c.filteredOptions())}},dependencies:[dt,ft,Xe,ue,Ji,sn,Zi],encapsulation:2,changeDetection:0});let t=g;return t})(),jn=(()=>{var e,o,i,xe,De;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,j(Oe,{optional:!0})),M(this,o,I(u(this,e)?.sidenavType)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=O(!1),this.isOpen=U(!1),this.type=O(void 0),this._type=L(()=>this.type()?this.type():u(this,e)?.sidenavType),this.dragImageElement=ie.required("dragImageElement"),this.dragIsEnding=I(!1),this.dragIsOnScreen=I(!0),this.isDragging=I(!1),this.dragPositionX=I(0),this.dragActualPositionX=L(()=>{let p=this.dragPositionX(),r=.32;return p>this.openWidthTreshold?this.openWidthTreshold+(p-this.openWidthTreshold)*r:p}),this.draggingStyle=L(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=N(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(p){p.stopPropagation(),x(this,i,xe).call(this,p.clientX)}dragEnd(p){(p.clientX<0||!this.dragIsOnScreen())&&x(this,i,xe).call(this,0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(p){p.preventDefault(),x(this,i,De).call(this,p)}dragStart(p){p.stopPropagation(),this.isDragging.set(!0),x(this,i,De).call(this,p)}drag(p){p.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(p.clientX)}),x(this,i,De).call(this,p)}touchStart(p){p.stopPropagation(),this.isDragging.set(!0)}touchMove(p){p.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(p.touches[0].clientX)})}touchEnd(p){p.stopPropagation(),x(this,i,xe).call(this,p.changedTouches[0].clientX)}touchCancel(p){p.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,xe=function(p){this.isDragging.set(!1),p<=0?this.isOpen.set(!1):p>this.openWidthTreshold?this.isOpen.set(!0):p<this.openWidthTreshold&&(!this.isOpen()&&p<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))},De=function(p){p.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)},h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=P({type:h,selectors:[["spk-sidenav"]],viewQuery:function(r,d){r&1&&te(d.dragImageElement,Pi,5),r&2&&se()},hostVars:8,hostBindings:function(r,d){r&2&&(oe(d._type()),z("open",d.isOpen())("closed",!d.isOpen())("is-dragging",d.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Fi,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(r,d){r&1&&(H(Ai),W(0,Li,2,0,"div",1),W(1,Hi,1,0,"div",2),_(2,"div",3),D(3),S(),_(4,"div",4),W(5,ji,1,0,"div",5),_(6,"div",6),D(7,1),S(),_(8,"main"),D(9,2),S()()),r&2&&(q(d.type()==="overlay"?0:-1),b(),q(d.type()==="overlay"&&d.isDragging()?1:-1),b(3),G("transform",d.draggingStyle()),b(),q(d.type()==="overlay"&&!d.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let t=h;return t})();var Bn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-stepper"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var Wn=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(on)),this.spkSort=O(),this.sortAsc=L(()=>{let n=u(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===s}),this.sortDesc=L(()=>{let n=u(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===`-${s}`})}toggleSort(){let n=this.spkSort();n&&u(this,e).toggleSort(n)}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275dir=_e({type:o,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(s,h){s&1&&B("mousedown",function(){return h.toggleSort()}),s&2&&z("sort-asc",h.sortAsc())("sort-desc",h.sortDesc())},inputs:{spkSort:[1,"spkSort"]}});let t=o;return t})();var de=1.5,on=(()=>{var e,o,i,n,s,we;let m=class m{constructor(){E(this,s);E(this,e);E(this,o);E(this,i);E(this,n);M(this,e,j(Q)),M(this,o,j(Oe,{optional:!0})),this.loading=O(!1),this.data=O([]),this.dataChange=ce(),this.sortByColumn=U(null),this.thead=ie("thead"),this.columns=vt(this.thead,["TH"]),this.class=I(u(this,o)?.tableType??"default"),this.resizing=I(!1),this.sizeTrigger=I(!0),M(this,i,null),M(this,n,I(!1)),this.scrollXState=I(-1),this.scrollYState=I(-1),this.canScrollX=I(!1),this.canScrollY=I(!1),this.columnSizes=L(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,g,v)=>{let a=g,l=v===r.length-1;return a.dataset.size?`${d} ${a.dataset.size}`:a.classList.contains("sticky")||a.classList.contains("sticky-end")?`${d} min-content`:l?`${d} 1fr`:`${d} 1fr`},"")}),this.e=N(()=>{let r=this.sortByColumn();if(r===null)return u(this,n).call(this)||(M(this,i,this.data()),u(this,n).set(!0)),this.dataChange.emit(structuredClone(u(this,i)));let d=r.startsWith("-")?r.slice(1):r,g=r.startsWith("-"),v=this.data().sort((a,l)=>{let c=a[d],f=l[d],y=0;return typeof c=="number"&&typeof f=="number"&&(y=c-f),c instanceof Date&&f instanceof Date&&(y=c.getTime()-f.getTime()),typeof c=="string"&&typeof f=="string"&&(y=c.localeCompare(f,void 0,{sensitivity:"base"})),g?-y:y});this.dataChange.emit(v)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){x(this,s,we).call(this)}onResize(r){x(this,s,we).call(this)}ngAfterViewInit(){queueMicrotask(()=>x(this,s,we).call(this))}toggleSort(r){let d=this.sortByColumn(),g=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(g)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,we=function(){let r=u(this,e).nativeElement,d=-1,g=-1,v=r.scrollWidth>r.clientWidth+de;if(v){let l=r.scrollLeft<=de;r.scrollWidth-(r.scrollLeft+r.clientWidth)<de?d=1:l||(d=0)}this.scrollXState.set(d),this.canScrollX.set(v);let a=r.scrollHeight>r.clientHeight+de;if(a){let l=r.scrollTop<=de;r.scrollHeight-(r.scrollTop+r.clientHeight)<de?g=1:l||(g=0)}this.scrollYState.set(g),this.canScrollY.set(a)},m.\u0275fac=function(d){return new(d||m)},m.\u0275cmp=P({type:m,selectors:[["spk-table"]],viewQuery:function(d,g){d&1&&te(g.thead,Bi,5),d&2&&se()},hostVars:18,hostBindings:function(d,g){d&1&&B("scroll",function(){return g.onScroll()})("resize",function(a){return g.onResize(a)},tt),d&2&&(oe(g.class()),G("grid-template-columns",g.columnSizes()),z("resizing",g.resizing())("can-scroll-x",g.canScrollX())("can-scroll-y",g.canScrollY())("scrolled-x",g.scrollXState()>=0)("scrolled-x-end",g.scrollXState()===1)("scrolled-y",g.scrollYState()>=0)("scrolled-y-end",g.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:qi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,g){d&1&&(H(Wi),_(0,"thead",null,0),D(2),W(3,zi,1,0,"spk-progress-bar",1),S(),_(4,"tbody"),D(5,1),S(),W(6,Ni,2,0,"div",2)),d&2&&(b(3),q(g.loading()?3:-1),b(3),q(g.loading()?-1:6))},dependencies:[nn],encapsulation:2,changeDetection:0});let t=m;return t})(),qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-tabs"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(H(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),zn=(()=>{let e=class e{constructor(){this.isActive=U(!1),this.disallowToggle=O(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(n,s){n&2&&z("active",s.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:$i,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(n,s){n&1&&(H(Ui),_(0,"h3",0),B("click",function(){return s.disallowToggle()||s.toggle()}),D(1,0,null,Qi,1,0),W(3,Yi,2,0,"spk-icon",1),S(),_(4,"div",2)(5,"div",3),D(6,1),S()()),n&2&&(b(3),q(s.disallowToggle()?-1:3))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})(),Nn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-toggle"]],ngContentSelectors:Y,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(n,s){n&1&&(H(),_(0,"div",0),Z(1,"div",1),S(),D(2))},encapsulation:2,changeDetection:0});let t=e;return t})();var Un=(()=>{let e=class e{constructor(){this.filesOver=I(!1),this.filesDropped=ce()}onDragOver(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!0)}onDragLeave(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1)}ondrop(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1);let n=i.dataTransfer?.files;n&&n.length>0&&this.filesDropped.emit(n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=_e({type:e,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(n,s){n&1&&B("dragover",function(m){return s.onDragOver(m)})("dragleave",function(m){return s.onDragLeave(m)})("drop",function(m){return s.ondrop(m)}),n&2&&z("filesover",s.filesOver())},outputs:{filesDropped:"filesDropped"}});let t=e;return t})();var rn=(()=>{let e=class e{constructor(){this.positionAnchorName=O.required()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["sparkle-tooltip-wrapper"]],hostVars:2,hostBindings:function(n,s){n&2&&G("position-anchor",s.positionAnchorName())},inputs:{positionAnchorName:[1,"positionAnchorName"]},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(n,s){n&1&&(H(),_(0,"div",0),D(1),S())},encapsulation:2});let t=e;return t})(),$n=(()=>{var e,o,i,n,s,h;let m=class m{constructor(){E(this,e);E(this,o);E(this,i);E(this,n);E(this,s);E(this,h);this.spkTooltip=O.required(),M(this,e,j(Q)),M(this,o,j(it)),M(this,i,j(Ze)),M(this,n,j(Ie)),M(this,s,null),M(this,h,null),this.anchorName=I(`--${Ye()}`),this.manageWrapperEffect=N(()=>{let r=this.spkTooltip();if(this.cleanupTooltip(),r){let d;typeof r=="string"?d=[u(this,n).createText(r)]:r instanceof Ce?(M(this,h,r.createEmbeddedView(null)),u(this,h).detectChanges(),d=u(this,h).rootNodes):d=[],d.length>0&&(M(this,s,u(this,o).createComponent(rn,{environmentInjector:u(this,i),projectableNodes:[d]})),u(this,s).setInput("positionAnchorName",this.anchorName()),u(this,s).changeDetectorRef.detectChanges())}})}onClick(r){let d=u(this,e).nativeElement;(d.hasAttribute("disabled")||d.hasAttribute("readonly"))&&(r.preventDefault(),r.stopPropagation())}cleanupTooltip(){u(this,s)&&(u(this,s).destroy(),M(this,s,null)),u(this,h)&&(u(this,h).destroy(),M(this,h,null))}ngOnDestroy(){this.cleanupTooltip()}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,h=new WeakMap,m.\u0275fac=function(d){return new(d||m)},m.\u0275dir=_e({type:m,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:2,hostBindings:function(d,g){d&1&&B("click",function(a){return g.onClick(a)}),d&2&&G("anchor-name",g.anchorName())},inputs:{spkTooltip:[1,"spkTooltip"]}});let t=m;return t})();export{ue as a,bn as b,En as c,Gi as d,Tn as e,Mn as f,Ki as g,In as h,Ji as i,Zi as j,Vn as k,Xe as l,Rn as m,Pn as n,An as o,nn as p,Fn as q,Ln as r,sn as s,Hn as t,jn as u,Bn as v,Wn as w,on as x,qn as y,zn as z,Nn as A,Un as B,$n as C};
@@ -1 +1 @@
1
- import{a as xe}from"./chunk-2YHX57UE.js";import{s as Me}from"./chunk-ZCT7SRIM.js";import{A as ve,a as me,f as Ce,l as Pe,n as Ee,p as Te}from"./chunk-5ER6KMMG.js";import{h as be}from"./chunk-XD6MBGQY.js";import{ea as ge}from"./chunk-GP2W7XZF.js";import{Ab as U,B as ie,Bb as B,F as q,Fc as W,Gc as A,Jb as $,Kb as ae,Kc as Y,Lb as ce,Lc as T,Mc as Z,Nb as R,Oa as g,Ob as p,Pb as de,Qb as D,Wb as z,X,Xb as pe,Yb as J,Zb as ue,_a as se,_b as b,ba as N,bc as S,ca as k,db as Q,dc as he,la as M,n as te,pb as O,qb as F,r as L,rc as V,sb as re,sc as _e,tb as oe,ub as K,vb as u,wb as _,x as ne,xb as le,yc as fe}from"./chunk-67YRCRMI.js";import{a as j,b as G}from"./chunk-EUDKD2JW.js";var we=["treeContainer"],Ne=["formRef"],ke=[[["label"]],[["label"]],[["input"]]],Re=["label","label","input"],Ie=r=>({children:r,level:0}),Oe=r=>({$implicit:r}),We=(r,t)=>({children:r,level:t}),Ae=(r,t)=>t.id;function Le(r,t){if(r&1){let e=B();u(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),_(),u(3,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),_()()}if(r&2){let e=p();g(),b("active",e.pathDiscoveryMethod()==="browse"),g(2),b("active",e.pathDiscoveryMethod()==="path")}}function Be(r,t){r&1&&le(0,"spk-progress-bar",9)}function $e(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-down"),_(),u(2,"spk-icon",16),S(3,"folder-open"),_())}function De(r,t){r&1&&(u(0,"spk-icon"),S(1,"file"),_())}function Ve(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-right"),_(),u(2,"spk-icon",16),S(3,"folder"),_())}function He(r,t){if(r&1&&O(0,$e,4,0)(1,De,2,0,"spk-icon")(2,Ve,4,0),r&2){let e=p(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function je(r,t){r&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),_())}function Ge(r,t){r&1&&U(0)}function qe(r,t){if(r&1&&Q(0,Ge,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let i=J(7);K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Oe,_e(2,We,e.children,n.level+1)))}}function Xe(r,t){if(r&1){let e=B();u(0,"div",14,3),R("click",function(){N(e);let i=p().$implicit,o=p(2);return k(o.toggleNode(i.id,i))}),u(2,"div",15),O(3,He,3,1)(4,je,2,0,"spk-icon",16),_(),u(5,"div",17),R("click",function(i){N(e);let o=p().$implicit,c=p(2);return k(c.toggleSelectedNode(i,o))}),S(6),_()(),O(7,qe,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p().$implicit,i=p();b("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),b("file",e.cls==="file"),g(),F(e.id!=="/"?3:4),g(3),he(" ",e.text," "),g(),F(e.children.length>0?7:-1)}}function Qe(r,t){if(r&1&&O(0,Xe,8,17),r&2){let e=t.$implicit,n=p(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Ke(r,t){if(r&1&&(u(0,"spk-list"),re(1,Qe,1,1,null,null,Ae),_()),r&2){let e=t.$implicit;ue("padding-left",e.level*.25,"rem"),g(),oe(e.children)}}function Ue(r,t){r&1&&U(0)}function ze(r,t){if(r&1){let e=B();u(0,"spk-toggle",19),R("click",function(){N(e);let i=p();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),_()}if(r&2){let e=p();b("active",e._showHiddenNodes()),g(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Fe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Fe||{}),ee=class r{#e=X(be);#t=X(xe);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Y();excludes=Y();_showHiddenNodes=M(!1);treeContainerRef=Z("treeContainer");formRef=Z("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#n=M(null);treeSearchQuery=M("");treeNodes=M([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Fe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!=="/"),n=structuredClone(e);for(let s=0;s<n.length;s++){let a=n[s].slice(1);if(a.startsWith("{")&&a.endsWith("}")){let C=a.slice(1,-1),d=this.filterGroups?.FilterGroups[C];if(d&&d.length){let v=d.map(P=>`-${P}`);n.splice(s,1,...v)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),c=this.accepts(),m=this.isWindows(),l=[];return o.length>0?l=o.map(s=>({id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(s=>{let f=new Map,a=s?.id;c&&(s.accepted=!0),f.set(s.id,s);let C=o.length>0?i.filter(d=>d.parentPath===s.id):i;for(let d of C){let v=o.length>0?d.id.replace(a??"",""):d.id,P=m?"\\":"/",h=v.split(P).filter(Boolean),E="",x=s;for(let H of h){if(E+=H+P,!f.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,m),y={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};c&&(y.accepted=this.matchAccepts(c,y)),f.set(E,y),x.children.push(y)}x=f.get(E)}}return s}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let c=0,m=t.filter(s=>!s.startsWith("-")&&!s.startsWith("+")),l=t.filter(s=>s.startsWith("-")||s.startsWith("+"));if(m.length===0)return c;for(let s=0;s<m.length;s++){let f=m[s];if(e?.startsWith(f)){c=1;break}}if(l.length===0)return c;for(let s=0;s<l.length;s++){let f=l[s],a=f.slice(1),C=f.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?a.slice(2):a).startsWith(d)&&a.endsWith(d)){if(n!=="folder")continue;if(e===a){c=C==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${d}`)){if(n!=="folder")continue;let h=a.slice(1,-2);if(h==="")break;if(e?.includes(h+d)){c=C==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let h=a.slice(3,-7);if(new RegExp(h).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let h=a.slice(1,-1),E=this.translateCSharpRegex(h);if(new RegExp(`${E}`).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}if(a==="")continue;if(a===e){c=C==="include"?1:-1;break}if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}return c}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,c)=>`(${c})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):i.some(c=>c.startsWith(o))?this.currentPath.set(i.filter(c=>c!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>{let s=l.split(e?"\\":"/");return s.at(-1)!==""&&s.pop(),s}),c=["/"];o.forEach(l=>{l.forEach((s,f)=>{let a=l.slice(0,f+1).join(e?"\\":"/");a!==""&&(c.includes(a)||c.push(a))})}),this.isLoading.set(!0);let m=c.map(l=>this.#r(l).pipe(L(s=>({status:"success",value:s,url:l})),ie(s=>te({status:"error",value:s,url:l}))));ne(m).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let s=l.filter(a=>a.status==="success"),f=l.filter(a=>a.status==="error");this.treeNodes.update(a=>{let C=s.flatMap(v=>v.value.map(P=>{let h=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(h&&h.split("/").filter(Boolean).join("/")),y=i.findIndex(w=>this.multiSelect()?I.startsWith(w):I===w)>-1,Se=i.findIndex(w=>w===h)>-1,ye=n.findIndex(w=>w===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:y&&!ye||Se})})),d=[...new Map([...a,...C].map(v=>[v.id,v])).values()];return this.#l(),this.hideShortcuts()?d.filter(v=>!v.id.startsWith("%")):d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let m=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(m).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(m)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let c=i.map(l=>{let f=l.id.includes("\\")?"\\":"/",a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(f)?"folder":"file";return G(j({},l),{cls:a,parentPath:e})}),m=[...new Map([...o,...c].map(l=>[l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=se({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(z(n.treeContainerRef,we,5),z(n.formRef,Ne,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&b("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Re,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(ke),O(0,Le,5,4,"spk-button-group"),u(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),O(5,Be,1,0,"spk-progress-bar",9),Q(6,Ke,3,2,"ng-template",null,1,fe)(8,Ue,1,0,"ng-container",10),_(),O(9,ze,2,3,"spk-toggle",11),_(),u(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),_()()),e&2){let i=J(7);F(n.multiSelect()?-1:0),g(),b("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),b("visualize-accepted",n.accepts()),g(2),F(n.isLoading()?5:-1),g(3),K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Oe,V(11,Ie,n.treeStructure()))),g(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),g(),b("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,ve,me,Pe,Ee,Te,ge,Me],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{ee as a};
1
+ import{a as xe}from"./chunk-2YHX57UE.js";import{s as Me}from"./chunk-ZCT7SRIM.js";import{A as ve,a as me,f as Ce,l as Pe,n as Ee,p as Te}from"./chunk-DNBOZ26J.js";import{h as be}from"./chunk-XD6MBGQY.js";import{ea as ge}from"./chunk-GP2W7XZF.js";import{Ab as U,B as ie,Bb as B,F as q,Fc as W,Gc as A,Jb as $,Kb as ae,Kc as Y,Lb as ce,Lc as T,Mc as Z,Nb as R,Oa as g,Ob as p,Pb as de,Qb as D,Wb as z,X,Xb as pe,Yb as J,Zb as ue,_a as se,_b as b,ba as N,bc as S,ca as k,db as Q,dc as he,la as M,n as te,pb as O,qb as F,r as L,rc as V,sb as re,sc as _e,tb as oe,ub as K,vb as u,wb as _,x as ne,xb as le,yc as fe}from"./chunk-67YRCRMI.js";import{a as j,b as G}from"./chunk-EUDKD2JW.js";var we=["treeContainer"],Ne=["formRef"],ke=[[["label"]],[["label"]],[["input"]]],Re=["label","label","input"],Ie=r=>({children:r,level:0}),Oe=r=>({$implicit:r}),We=(r,t)=>({children:r,level:t}),Ae=(r,t)=>t.id;function Le(r,t){if(r&1){let e=B();u(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),_(),u(3,"button",13),R("click",function(){N(e);let i=p();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),_()()}if(r&2){let e=p();g(),b("active",e.pathDiscoveryMethod()==="browse"),g(2),b("active",e.pathDiscoveryMethod()==="path")}}function Be(r,t){r&1&&le(0,"spk-progress-bar",9)}function $e(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-down"),_(),u(2,"spk-icon",16),S(3,"folder-open"),_())}function De(r,t){r&1&&(u(0,"spk-icon"),S(1,"file"),_())}function Ve(r,t){r&1&&(u(0,"spk-icon",18),S(1,"caret-right"),_(),u(2,"spk-icon",16),S(3,"folder"),_())}function He(r,t){if(r&1&&O(0,$e,4,0)(1,De,2,0,"spk-icon")(2,Ve,4,0),r&2){let e=p(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function je(r,t){r&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),_())}function Ge(r,t){r&1&&U(0)}function qe(r,t){if(r&1&&Q(0,Ge,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let i=J(7);K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Oe,_e(2,We,e.children,n.level+1)))}}function Xe(r,t){if(r&1){let e=B();u(0,"div",14,3),R("click",function(){N(e);let i=p().$implicit,o=p(2);return k(o.toggleNode(i.id,i))}),u(2,"div",15),O(3,He,3,1)(4,je,2,0,"spk-icon",16),_(),u(5,"div",17),R("click",function(i){N(e);let o=p().$implicit,c=p(2);return k(c.toggleSelectedNode(i,o))}),S(6),_()(),O(7,qe,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p().$implicit,i=p();b("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),b("file",e.cls==="file"),g(),F(e.id!=="/"?3:4),g(3),he(" ",e.text," "),g(),F(e.children.length>0?7:-1)}}function Qe(r,t){if(r&1&&O(0,Xe,8,17),r&2){let e=t.$implicit,n=p(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Ke(r,t){if(r&1&&(u(0,"spk-list"),re(1,Qe,1,1,null,null,Ae),_()),r&2){let e=t.$implicit;ue("padding-left",e.level*.25,"rem"),g(),oe(e.children)}}function Ue(r,t){r&1&&U(0)}function ze(r,t){if(r&1){let e=B();u(0,"spk-toggle",19),R("click",function(){N(e);let i=p();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),_()}if(r&2){let e=p();b("active",e._showHiddenNodes()),g(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Fe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Fe||{}),ee=class r{#e=X(be);#t=X(xe);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Y();excludes=Y();_showHiddenNodes=M(!1);treeContainerRef=Z("treeContainer");formRef=Z("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#n=M(null);treeSearchQuery=M("");treeNodes=M([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Fe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!=="/"),n=structuredClone(e);for(let s=0;s<n.length;s++){let a=n[s].slice(1);if(a.startsWith("{")&&a.endsWith("}")){let C=a.slice(1,-1),d=this.filterGroups?.FilterGroups[C];if(d&&d.length){let v=d.map(P=>`-${P}`);n.splice(s,1,...v)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),c=this.accepts(),m=this.isWindows(),l=[];return o.length>0?l=o.map(s=>({id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(s=>{let f=new Map,a=s?.id;c&&(s.accepted=!0),f.set(s.id,s);let C=o.length>0?i.filter(d=>d.parentPath===s.id):i;for(let d of C){let v=o.length>0?d.id.replace(a??"",""):d.id,P=m?"\\":"/",h=v.split(P).filter(Boolean),E="",x=s;for(let H of h){if(E+=H+P,!f.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,m),y={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};c&&(y.accepted=this.matchAccepts(c,y)),f.set(E,y),x.children.push(y)}x=f.get(E)}}return s}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let c=0,m=t.filter(s=>!s.startsWith("-")&&!s.startsWith("+")),l=t.filter(s=>s.startsWith("-")||s.startsWith("+"));if(m.length===0)return c;for(let s=0;s<m.length;s++){let f=m[s];if(e?.startsWith(f)){c=1;break}}if(l.length===0)return c;for(let s=0;s<l.length;s++){let f=l[s],a=f.slice(1),C=f.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?a.slice(2):a).startsWith(d)&&a.endsWith(d)){if(n!=="folder")continue;if(e===a){c=C==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${d}`)){if(n!=="folder")continue;let h=a.slice(1,-2);if(h==="")break;if(e?.includes(h+d)){c=C==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let h=a.slice(3,-7);if(new RegExp(h).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let h=a.slice(1,-1),E=this.translateCSharpRegex(h);if(new RegExp(`${E}`).test(e)){c=C==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}if(a==="")continue;if(a===e){c=C==="include"?1:-1;break}if(this.#s(e,a,!0)){c=C==="include"?1:-1;break}}return c}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,c)=>`(${c})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):i.some(c=>c.startsWith(o))?this.currentPath.set(i.filter(c=>c!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(c=>c!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>{let s=l.split(e?"\\":"/");return s.at(-1)!==""&&s.pop(),s}),c=["/"];o.forEach(l=>{l.forEach((s,f)=>{let a=l.slice(0,f+1).join(e?"\\":"/");a!==""&&(c.includes(a)||c.push(a))})}),this.isLoading.set(!0);let m=c.map(l=>this.#r(l).pipe(L(s=>({status:"success",value:s,url:l})),ie(s=>te({status:"error",value:s,url:l}))));ne(m).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let s=l.filter(a=>a.status==="success"),f=l.filter(a=>a.status==="error");this.treeNodes.update(a=>{let C=s.flatMap(v=>v.value.map(P=>{let h=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(h&&h.split("/").filter(Boolean).join("/")),y=i.findIndex(w=>this.multiSelect()?I.startsWith(w):I===w)>-1,Se=i.findIndex(w=>w===h)>-1,ye=n.findIndex(w=>w===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:y&&!ye||Se})})),d=[...new Map([...a,...C].map(v=>[v.id,v])).values()];return this.#l(),this.hideShortcuts()?d.filter(v=>!v.id.startsWith("%")):d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let m=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(m).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(m)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let c=i.map(l=>{let f=l.id.includes("\\")?"\\":"/",a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(f)?"folder":"file";return G(j({},l),{cls:a,parentPath:e})}),m=[...new Map([...o,...c].map(l=>[l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=se({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(z(n.treeContainerRef,we,5),z(n.formRef,Ne,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&b("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Re,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(ke),O(0,Le,5,4,"spk-button-group"),u(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),O(5,Be,1,0,"spk-progress-bar",9),Q(6,Ke,3,2,"ng-template",null,1,fe)(8,Ue,1,0,"ng-container",10),_(),O(9,ze,2,3,"spk-toggle",11),_(),u(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),_()()),e&2){let i=J(7);F(n.multiSelect()?-1:0),g(),b("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),b("visualize-accepted",n.accepts()),g(2),F(n.isLoading()?5:-1),g(3),K("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Oe,V(11,Ie,n.treeStructure()))),g(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),g(),b("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[Ce,ve,me,Pe,Ee,Te,ge,Me],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{ee as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-BD5AB4OK.js";import"./chunk-5MMV45NA.js";import"./chunk-EBYGIC45.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.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 OptionsListComponent};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-FJ2TDPI3.js";import"./chunk-FBULENUD.js";import"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.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 T,g as M,h as f}from"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Hb as s,Ib as l,Jb as i,Oa as r,_a as D,qc as d,ub as c,vb as e,wb as n,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let P;return P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,m,P,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(r(11),c("routerLink",d(2,E)),r(9),c("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}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{e as S}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as T,g as M,h as f}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{Hb as s,Ib as l,Jb as i,Oa as r,_a as D,qc as d,ub as c,vb as e,wb as n,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let P;return P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,m,P,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(r(11),c("routerLink",d(2,E)),r(9),c("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-5CYNJ3KI.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-2YHX57UE.js";import{a as d}from"./chunk-OQHMS5HM.js";import{h as k}from"./chunk-XD6MBGQY.js";import{E as s,F as n,Fc as p,Gc as o,P as u,S as c,X as i,la as a}from"./chunk-67YRCRMI.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
1
+ import{a as B}from"./chunk-XBP565VF.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-2YHX57UE.js";import{a as d}from"./chunk-OQHMS5HM.js";import{h as k}from"./chunk-XD6MBGQY.js";import{E as s,F as n,Fc as p,Gc as o,P as u,S as c,X as i,la as a}from"./chunk-67YRCRMI.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-BKHSNMGE.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-WBYTRHI7.js")},{path:"live",loadComponent:()=>import("./chunk-GORQL5YP.js")}]}],t=o;export{t as default};