@duplicati/ngclient 0.0.36 → 0.0.38

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 (44) hide show
  1. package/{chunk-A27JK2VW.js → chunk-2HBUGBA5.js} +1 -1
  2. package/{chunk-M76F7EZP.js → chunk-7PTK4MN5.js} +1 -1
  3. package/chunk-7TWD5GBS.js +1 -0
  4. package/chunk-B5NBFB7O.js +6 -0
  5. package/chunk-C5FAUVH7.js +1 -0
  6. package/{chunk-4VPUEZIU.js → chunk-C7X2VVRU.js} +1 -1
  7. package/{chunk-OZQD3PLH.js → chunk-E44GSPZB.js} +1 -1
  8. package/chunk-ED3PEZLO.js +1 -0
  9. package/chunk-EIH26WZD.js +1 -0
  10. package/chunk-I3CYX5BU.js +1 -0
  11. package/{chunk-TW4633HQ.js → chunk-KKAMLP6E.js} +1 -1
  12. package/chunk-KZM6U32C.js +1 -0
  13. package/chunk-LB7YC2O6.js +1 -0
  14. package/chunk-LPIWEPTN.js +1 -0
  15. package/{chunk-SAKG3775.js → chunk-MMASRFI2.js} +1 -1
  16. package/chunk-MRR352S2.js +1 -0
  17. package/{chunk-DAXEWTI7.js → chunk-O2AA7G55.js} +1 -1
  18. package/chunk-OSRGF74C.js +1 -0
  19. package/{chunk-DFKPVTYK.js → chunk-QN6FTJWE.js} +1 -1
  20. package/chunk-RQVSGVED.js +1 -0
  21. package/{chunk-DFT2UYO6.js → chunk-SHTDZDEX.js} +1 -1
  22. package/{chunk-RDUEFPJ3.js → chunk-U6BEBH6T.js} +1 -1
  23. package/{chunk-7KKPI5E4.js → chunk-UNTMRP6X.js} +1 -1
  24. package/{chunk-EV37MCYP.js → chunk-URDSNDPP.js} +1 -1
  25. package/{chunk-LSBOVSYF.js → chunk-UWT5CUW4.js} +1 -1
  26. package/{chunk-3WCWZJYH.js → chunk-VU5DK3QN.js} +1 -1
  27. package/{chunk-6SKCAZOP.js → chunk-XVCL75CF.js} +1 -1
  28. package/{chunk-XYNM2UME.js → chunk-ZOIP6MPW.js} +1 -1
  29. package/{chunk-73OFEMRU.js → chunk-ZVU4LS6E.js} +1 -1
  30. package/index.html +1 -1
  31. package/{main-QY7RIEAP.js → main-HGGEYF7T.js} +1 -1
  32. package/package.json +1 -1
  33. package/chunk-4XJFGB4E.js +0 -6
  34. package/chunk-7SJHYZC5.js +0 -1
  35. package/chunk-AUUCT7OA.js +0 -1
  36. package/chunk-BIE2BC6X.js +0 -1
  37. package/chunk-GL2OCAVZ.js +0 -1
  38. package/chunk-HGQLQ733.js +0 -1
  39. package/chunk-IO5IBATB.js +0 -1
  40. package/chunk-JAY2DGID.js +0 -1
  41. package/chunk-M4CEGBQO.js +0 -1
  42. package/chunk-WKYWPXQ6.js +0 -1
  43. package/chunk-YXIGPDXN.js +0 -1
  44. package/chunk-Z4XFPOPE.js +0 -1
@@ -1 +1 @@
1
- import{b as P}from"./chunk-KFGIVU27.js";import{n as A}from"./chunk-AUUCT7OA.js";import{a as S}from"./chunk-PIDBEXSZ.js";import{c as M}from"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,E as p,Eb as i,Fb as r,Gb as _,Ra as m,Sb as C,X as o,Za as c,fb as g,ic as u,jc as E,lb as d,p as l}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=c(!0);generalInfo=P(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),m(5),E(s.generalInfo()))},dependencies:[A],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
1
+ import{b as P}from"./chunk-KFGIVU27.js";import{n as A}from"./chunk-ED3PEZLO.js";import{a as S}from"./chunk-PIDBEXSZ.js";import{c as M}from"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,E as p,Eb as i,Fb as r,Gb as _,Ra as m,Sb as C,X as o,Za as c,fb as g,ic as u,jc as E,lb as d,p as l}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=c(!0);generalInfo=P(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),m(5),E(s.generalInfo()))},dependencies:[A],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-TW4633HQ.js";import{a as v}from"./chunk-QZCTOSPE.js";import{a as h,g as y,h as b,n as L}from"./chunk-AUUCT7OA.js";import{a as B}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as C,Bb as f,Cb as k,Db as O,Eb as a,Fb as r,Gb as p,Hb as M,Ib as P,Qb as N,Ra as l,Rb as F,Sb as _,Tb as $,Ub as D,X as c,Xb as d,fb as E,ic as A,lb as u,lc as I,sb as g,sc as x,tb as R,vb as T}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var X=()=>[b,y,h,import("./chunk-HEBDWN5N.js").then(e=>e.RouterLink)],w=e=>["/restore-flow",e];function z(e,o){if(e&1&&(a(0,"spk-card",5),p(1,"img",6),a(2,"div",7)(3,"h3"),_(4,1),r(),a(5,"p"),A(6),r()(),a(7,"button",8),N(8,2),p(9,"spk-icon"),F(),r()()),e&2){let t,i,n=o.$implicit;l(4),$((t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:"Backup name missing"),D(4),l(2),I(" ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString)!==null&&i!==void 0?i:"-"," / ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount)!==null&&i!==void 0?i:"-"," "),l(),T("routerLink",x(4,w,n.Backup==null?null:n.Backup.ID))}}function W(e,o){if(e&1&&k(0,z,10,6,"spk-card",5,f),e&2){let t=d(2);O(t.backups())}}function K(e,o){e&1&&(M(0),_(1,3),P())}function j(e,o){if(e&1&&u(0,W,2,0)(1,K,2,0,"ng-container"),e&2){let t=d();C(t.backups().length?0:1)}}function q(e,o){e&1&&(a(0,"div",9),p(1,"spk-progress-bar",10),a(2,"div",7)(3,"h3"),_(4,4),r()()())}var m=class e{#e=c(v);#t=c(B);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=E({type:e,selectors:[["app-restore"]],decls:8,vars:1,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let t;t=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;n=$localize`No backups founds`;let S;return S=$localize`Loading backups...`,[o,t,i,n,S,[1,"type-a"],["src","assets/images/folder.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(p(0,"app-status-bar"),a(1,"section")(2,"h2"),_(3,0),r(),u(4,j,2,1)(5,q,5,0),g(6,4,X,null,5),r()),t&2&&(l(6),R(!i.backupsLoading()))},dependencies:[G,L],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{m as default};
1
+ import{a as G}from"./chunk-KKAMLP6E.js";import{a as v}from"./chunk-QZCTOSPE.js";import{a as h,g as y,h as b,n as L}from"./chunk-ED3PEZLO.js";import{a as B}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as C,Bb as f,Cb as k,Db as O,Eb as a,Fb as r,Gb as p,Hb as M,Ib as P,Qb as N,Ra as l,Rb as F,Sb as _,Tb as $,Ub as D,X as c,Xb as d,fb as E,ic as A,lb as u,lc as I,sb as g,sc as x,tb as R,vb as T}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var X=()=>[b,y,h,import("./chunk-HEBDWN5N.js").then(e=>e.RouterLink)],w=e=>["/restore-flow",e];function z(e,o){if(e&1&&(a(0,"spk-card",5),p(1,"img",6),a(2,"div",7)(3,"h3"),_(4,1),r(),a(5,"p"),A(6),r()(),a(7,"button",8),N(8,2),p(9,"spk-icon"),F(),r()()),e&2){let t,i,n=o.$implicit;l(4),$((t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:"Backup name missing"),D(4),l(2),I(" ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString)!==null&&i!==void 0?i:"-"," / ",(i=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount)!==null&&i!==void 0?i:"-"," "),l(),T("routerLink",x(4,w,n.Backup==null?null:n.Backup.ID))}}function W(e,o){if(e&1&&k(0,z,10,6,"spk-card",5,f),e&2){let t=d(2);O(t.backups())}}function K(e,o){e&1&&(M(0),_(1,3),P())}function j(e,o){if(e&1&&u(0,W,2,0)(1,K,2,0,"ng-container"),e&2){let t=d();C(t.backups().length?0:1)}}function q(e,o){e&1&&(a(0,"div",9),p(1,"spk-progress-bar",10),a(2,"div",7)(3,"h3"),_(4,4),r()()())}var m=class e{#e=c(v);#t=c(B);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=E({type:e,selectors:[["app-restore"]],decls:8,vars:1,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let t;t=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;n=$localize`No backups founds`;let S;return S=$localize`Loading backups...`,[o,t,i,n,S,[1,"type-a"],["src","assets/images/folder.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(p(0,"app-status-bar"),a(1,"section")(2,"h2"),_(3,0),r(),u(4,j,2,1)(5,q,5,0),g(6,4,X,null,5),r()),t&2&&(l(6),R(!i.backupsLoading()))},dependencies:[G,L],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{m as default};
@@ -0,0 +1 @@
1
+ import{a as se}from"./chunk-5ZK3D2RS.js";import{Ec as Ae,Ic as Me,Kc as O,Lc as m,O as j,Q as f,R as ie,S as B,Sa as o,U as y,Wa as H,Wb as D,X as Ve,Za as N,da as I,g as _e,gb as L,ha as S,hb as l,ja as De,jb as u,k as ve,ma as C,nb as be,p as ye,qc as p,sa as U,v as Ce,xb as re}from"./chunk-MR4RE3IB.js";import{a as d,b as h}from"./chunk-C6Q5SG76.js";var Pe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U))};static \u0275dir=l({type:n})}return n})(),ee=(()=>{class n extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),V=new y(""),rt={provide:V,useExisting:f(()=>st),multi:!0},st=(()=>{class n extends ee{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([rt]),u]})}return n})(),ot={provide:V,useExisting:f(()=>ke),multi:!0};function at(){let n=se()?se().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var lt=new y(""),ke=(()=>{class n extends Pe{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!at())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(lt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[p([ot]),u]})}return n})();function _(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Ge(n){return n!=null&&typeof n.length=="number"}var E=new y(""),F=new y(""),ut=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ee=class{static min(t){return dt(t)}static max(t){return ct(t)}static required(t){return ht(t)}static requiredTrue(t){return ft(t)}static email(t){return pt(t)}static minLength(t){return gt(t)}static maxLength(t){return mt(t)}static pattern(t){return _t(t)}static nullValidator(t){return Re(t)}static compose(t){return Le(t)}static composeAsync(t){return We(t)}};function dt(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function ct(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ht(n){return _(n.value)?{required:!0}:null}function ft(n){return n.value===!0?null:{required:!0}}function pt(n){return _(n.value)||ut.test(n.value)?null:{email:!0}}function gt(n){return t=>_(t.value)||!Ge(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function mt(n){return t=>Ge(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function _t(n){if(!n)return Re;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(_(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Re(n){return null}function Te(n){return n!=null}function je(n){return be(n)?ve(n):n}function Be(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function Ue(n,t){return t.map(e=>e(n))}function vt(n){return!n.validate}function He(n){return n.map(t=>vt(t)?t:e=>t.validate(e))}function Le(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){return Be(Ue(e,t))}}function $e(n){return n!=null?Le(He(n)):null}function We(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){let i=Ue(e,t).map(je);return Ce(i).pipe(ye(Be))}}function qe(n){return n!=null?We(He(n)):null}function Fe(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ze(n){return n._rawValidators}function Ze(n){return n._rawAsyncValidators}function oe(n){return n?Array.isArray(n)?n:[n]:[]}function W(n,t){return Array.isArray(n)?n.includes(t):n===t}function we(n,t){let e=oe(t);return oe(n).forEach(r=>{W(e,r)||e.push(r)}),e}function Ie(n,t){return oe(t).filter(e=>!W(n,e))}var q=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=$e(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=qe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},c=class extends q{name;get formDirective(){return null}get path(){return null}},g=class extends q{_parent=null;name=null;valueAccessor=null},z=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},yt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},hn=h(d({},yt),{"[class.ng-submitted]":"isSubmitted"}),fn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),pn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(c,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var x="VALID",$="INVALID",b="PENDING",P="DISABLED",v=class{},Z=class extends v{value;source;constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},A=class extends v{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{source;constructor(t){super(),this.source=t}},le=class extends v{source;constructor(t){super(),this.source=t}};function ce(n){return(te(n)?n.validators:n)||null}function Ct(n){return Array.isArray(n)?$e(n):n||null}function he(n,t){return(te(t)?t.asyncValidators:n)||null}function Vt(n){return Array.isArray(n)?qe(n):n||null}function te(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Xe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function Ye(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var M=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===x}get invalid(){return this.status===$}get pending(){return this.status==b}get disabled(){return this.status===P}get enabled(){return this.status!==P}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new _e;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(we(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(we(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ie(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ie(t,this._rawAsyncValidators))}hasValidator(t){return W(this._rawValidators,t)}hasAsyncValidator(t){return W(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new k(!0,i))}markAsPending(t={}){this.status=b;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new A(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,i)),this._events.next(new A(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(i=>{i.enable(h(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===b)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,e)),this._events.next(new A(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=b,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new A(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(b)?b:this._anyControlsHaveStatus($)?$:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){te(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ct(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Vt(this._rawAsyncValidators)}},X=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ye(this,!0,t),Object.keys(t).forEach(i=>{Xe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends X{};var w=new y("CallSetDisabledState",{providedIn:"root",factory:()=>T}),T="always";function ne(n,t){return[...t.path,n]}function Y(n,t,e=T){fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),bt(n,t),Mt(n,t),At(n,t),Dt(n,t)}function K(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Q(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function J(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Dt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function fe(n,t){let e=ze(n);t.validator!==null?n.setValidators(Fe(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ze(n);t.asyncValidator!==null?n.setAsyncValidators(Fe(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();J(t._rawValidators,r),J(t._rawAsyncValidators,r)}function Q(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return J(t._rawValidators,i),J(t._rawAsyncValidators,i),e}function bt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ke(n,t)})}function At(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ke(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Ke(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Et(n,t){n==null,fe(n,t)}function Ft(n,t){return Q(n,t)}function pe(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function wt(n){return Object.getPrototypeOf(n.constructor)===ee}function It(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ge(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===ke?e=s:wt(s)?i=s:r=s}),r||i||e||null}function St(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Se(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ne(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var R=class extends M{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(ce(e),he(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),te(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ne(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Se(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Se(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ne(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Nt=n=>n instanceof R,Ot=(()=>{class n extends c{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var xt={provide:g,useExisting:f(()=>Pt)},Oe=Promise.resolve(),Pt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new R;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,it){super(),this._changeDetectorRef=a,this.callSetDisabledState=it,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),pe(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Y(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Oe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Me(i);Oe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ne(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(c,9),o(E,10),o(F,10),o(V,10),o(Ae,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[p([xt]),u,I]})}return n})(),mn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),kt={provide:V,useExisting:f(()=>Gt),multi:!0},Gt=(()=>{class n extends ee{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([kt]),u]})}return n})(),Rt={provide:V,useExisting:f(()=>jt),multi:!0};var Tt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jt=(()=>{class n extends ee{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ve(w,{optional:!0})??T;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(Tt),o(De))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[p([Rt]),u]})}return n})();var me=new y(""),Bt={provide:g,useExisting:f(()=>Ut)},Ut=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ge(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&K(i,this,!1),Y(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}pe(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&K(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(V,10),o(me,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[p([Bt]),u,I]})}return n})(),Ht={provide:c,useExisting:f(()=>Je)},Je=(()=>{class n extends c{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=N(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Q(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){K(e.control||null,e,!1),St(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),It(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(K(i||null,e),Nt(r)&&(Y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Et(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Ft(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){fe(this.form,this),this._oldForm&&Q(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&D("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[p([Ht]),u,I]})}return n})(),Lt={provide:c,useExisting:f(()=>Qe)},Qe=(()=>{class n extends Ot{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[p([Lt]),u]})}return n})(),$t={provide:c,useExisting:f(()=>et)},et=(()=>{class n extends c{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ne(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[p([$t]),u]})}return n})();function tt(n){return!(n instanceof Qe)&&!(n instanceof Je)&&!(n instanceof et)}var Wt={provide:g,useExisting:f(()=>qt)},qt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){this._added||this._setUpControl(),pe(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10),o(V,10),o(me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[p([Wt]),u,I]})}return n})();var nt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({})}return n})(),de=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ye(this,!1,t),t.forEach((i,r)=>{Xe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function xe(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var _n=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return xe(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new X(r,s)}record(e,i=null){let r=this._reduceControls(e);return new ue(r,i)}control(e,i,r){let s={};return this.useNonNullable?(xe(i)?s=i:(s.validators=i,s.asyncValidators=r),new R(e,h(d({},s),{nonNullable:!0}))):new R(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new de(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof R)return e;if(e instanceof M)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var vn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})(),yn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})();export{st as a,ke as b,Ee as c,fn as d,pn as e,R as f,Pt as g,mn as h,Gt as i,jt as j,Ut as k,Je as l,Qe as m,et as n,qt as o,_n as p,vn as q,yn as r};
@@ -0,0 +1,6 @@
1
+ import{a as Ke,b as Re}from"./chunk-VU5DK3QN.js";import{a as Dt,b as Xt}from"./chunk-DNHLTHLR.js";import{a as lt}from"./chunk-V7APGUBT.js";import{b as W}from"./chunk-KFGIVU27.js";import{a as xe,b as ne,c as ye,d as ie,e as Ce,f as pt,g as Vt,h as fe,i as Ie,k as ct,l as Se,m as $e,n as Lt,o as Te,p as ee,q as _t,r as Ee}from"./chunk-7TWD5GBS.js";import{a as oe,b as mt,d as Ut,e as Bt,g as Me,i as ut,k as re,m as dt,n as Kt,p as ae,q as se,v as we,w as Be}from"./chunk-ED3PEZLO.js";import{a as Ue}from"./chunk-PIDBEXSZ.js";import{H as ge,X as te}from"./chunk-J3H4BCHI.js";import{c as bt}from"./chunk-5XX7BU4I.js";import{ia as st}from"./chunk-5ZK3D2RS.js";import{$b as z,Ab as g,Bb as $,Cb as M,Db as w,E as Qe,Eb as a,Fb as r,Gb as m,Hb as K,Ib as X,Jb as Ge,Kb as P,Kc as L,Mc as at,Qb as E,R as ke,Ra as s,Rb as D,Sb as A,Tb as Ze,Ub as Je,Vb as he,Wb as C,X as O,Xb as p,Za as x,_a as me,_b as V,ac as G,ea as S,fa as T,fb as J,fc as ue,gc as de,hc as Fe,ic as c,ja as It,jc as b,kc as v,lb as F,lc as $t,mc as Mt,nc as wt,oc as Rt,p as qe,qa as Ye,ra as ot,rc as vt,sc as be,tc as Gt,uc as et,vb as _,xb as Ae,yc as rt}from"./chunk-MR4RE3IB.js";import{a as Z,c as xt}from"./chunk-C6Q5SG76.js";function en(n,i){if(n&1&&(a(0,"p"),c(1),r()),n&2){let e=p();s(),b(e._data().message)}}var tn={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},Ve=class n{data=ot();_data=L(()=>Z(Z({},tn),this.data()));closed=Ye();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),c(2),r()(),a(3,"div",1),F(4,en,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),c(7),r(),a(8,"button",4),C("click",function(){return t.close("confirm")}),c(9),r()()),e&2&&(s(2),b(t._data().title),s(2),g(t._data().message?4:-1),s(3),b(t._data().cancelText),s(2),b(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var Ft=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})};var Le=class n{#e=O(Ue);s3Providers=W(this.getS3Config("Providers"));s3Regions=W(this.getS3Config("Regions"));s3RegionHosts=W(this.getS3Config("RegionHosts"));s3StorageClasses=W(this.getS3Config("StorageClasses"));storjSatellites=W(this.getStorjConfig("Satellites"));storjAuthenticationMethods=W(this.getStorjConfig("AuthenticationMethods"));openstackProviders=W(this.getOpenstackConfig("Providers"));openstackVersions=W(this.getOpenstackConfig("Versions"));gcsLocations=W(this.getGcsConfig("Locations"));gcsStorageClasses=W(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(qe(e=>this.#t(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(qe(e=>this.#t(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(qe(e=>this.#t(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(qe(e=>this.#t(e)))}#t(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})};var ve=new ee,tt={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>ve.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>ve.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>ve.control(n??"",[ye.required,ye.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>ve.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>ve.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>ve.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Le).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Le).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>ve.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Le).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Le).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>ve.control(n??"")}},dynamicFields:["authid"]}};function ze(n,i){let e={},t={};return i.searchParams.forEach((o,l)=>{tt[n].dynamicFields?.includes(l)?t[l]=decodeURIComponent(o):e[l]=decodeURIComponent(o)}),{advanced:e,dynamic:t}}function nt(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var He={file:{to:n=>{let i=nt([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,o=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return Z({destinationType:n,custom:{path:`${t?"/":""}${o}${i.pathname}`}},ze(n,i))}},ssh:{to:n=>{let i=nt([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},ze(n,i))},s3:{to:n=>{let i=nt([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},ze(n,i))},gcs:{to:n=>{let i=nt([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=ze(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=nt([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=ze(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>Z({destinationType:n},ze(n,i))}};function gt(n){let i=n.destinationType;return!i||!He.hasOwnProperty(i)?He.fallbackMapper.to(n)??"":He[i].to(n)??""}function Nt(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],o=new URL(t);if(!He.hasOwnProperty(e))return He.fallbackMapper.from(e,o);if(!i)throw new Error("Invalid target path");return He[e].from(e,o,n)}var zt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Ct=class n{generate(i,e=zt){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=zt){let t=this;return Array.apply(null,{length:i}).map(()=>{let o;for(;;)if(o=String.fromCharCode(t.#e()),e.test(o))return o},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})};var nn=["formRef"];function on(n,i){if(n&1&&(a(0,"spk-option",27),c(1),r()),n&2){let e=i.$implicit;_("value",e.Key),s(),b(e.DisplayName)}}function rn(n,i){if(n&1&&m(0,"spk-progress-bar",38),n&2){let e=p(3);Ae("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function an(n,i){n&1&&(a(0,"span",33),A(1,9),r())}function sn(n,i){n&1&&(E(0,7,1),m(1,"spk-icon"),D())}function ln(n,i){n&1&&(E(0,7,2),m(1,"spk-icon"),D())}function pn(n,i){n&1&&(E(0,10,1),m(1,"spk-icon",40),D())}function cn(n,i){n&1&&(E(0,10,2),m(1,"spk-icon"),D())}function _n(n,i){if(n&1){let e=P();a(0,"button",39),C("click",function(){S(e);let o=p(3);return T(o.copyPassword())}),E(1,10),F(2,pn,2,0)(3,cn,2,0),D(),r()}if(n&2){let e=p(3);s(2),g(e.copiedPassword()?2:3)}}function mn(n,i){n&1&&(a(0,"spk-alert",37),A(1,11),r())}function un(n,i){if(n&1){let e=P();a(0,"div",28)(1,"spk-form-field")(2,"label",29),E(3,6),m(4,"sup"),D(),r(),m(5,"input",30),r(),F(6,rn,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),m(8,"input",32),F(9,an,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),C("click",function(){S(e);let o=p(2);return T(o.showPassword.set(!o.showPassword()))}),E(12,7),F(13,sn,2,0)(14,ln,2,0),D(),r(),a(15,"button",35),C("click",function(){S(e);let o=p(2);return T(o.generatePassword())}),E(16,8),m(17,"spk-icon"),D(),r(),F(18,_n,4,1,"button",36),r(),F(19,mn,2,0,"spk-alert",37),r()}if(n&2){let e=p(2);s(5),_("type",e.showPassword()?"text":"password"),s(),g(e.generalForm.value.password?6:-1),s(2),_("type",e.showPassword()?"text":"password"),s(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),s(4),g(e.showPassword()?13:14),s(5),g(e.showCopyPassword()?18:-1),s(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function dn(n,i){if(n&1&&(a(0,"spk-select",24)(1,"label",25),A(2,5),r(),m(3,"input",26),M(4,on,2,2,"spk-option",27,$),r(),F(6,un,20,7,"div",28)),n&2){let e=p();_("displayFn",e.displayFn()),s(4),w(e.encryptionOptions()),s(2),g(e.encryptionFieldSignal()!==""?6:-1)}}function Fn(n,i){if(n&1&&(a(0,"button",22),E(1,12),m(2,"spk-icon"),D(),r()),n&2){let e=p();_("disabled",e.generalForm.invalid)}}function gn(n,i){if(n&1&&(a(0,"spk-tooltip",23)(1,"button",22),E(2,13),m(3,"spk-icon"),D(),r()()),n&2){let e=p();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),s(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var We=new ee,Ht=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>We.group({name:We.control(n.name,[ye.required]),description:We.control(n.description),encryption:We.control(n.encryption,[Xt()]),password:We.control(n.password,[Dt(i=>i?.value.encryption!=="",[ye.required])]),repeatPassword:We.control(n.repeatPassword,[Dt(i=>i?.value.encryption!=="",[ye.required])])}),ht={Key:"",DisplayName:"None"},At=class n{#e=O(te);#t=O(ge);#i=O(Ct);#o=O(le);#n=O(lt);formRef=me.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=x(!1);copiedPassword=x(!1);showCopyPassword=x(!1);encryptionEffect=at(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=L(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#n.systemInfo()?.EncryptionModules??[];return e=>{let t=[ht,...i].find(o=>o.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&ue(t.formRef,nn,5),e&2&&de()},decls:20,vars:3,consts:()=>{let i;i=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let d;d=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`Encryption`;let I;I=$localize`Encryption`;let h;h=$localize`Password`;let Q;Q=$localize`Repeat password`;let Y;Y=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let U;U=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,U=he(U);let B;B=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let N;N=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=he(N);let u;u=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let f;f=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let H;return H=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,o,l,d,I,Y,U,B,j,N,u,f,H,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",i,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",Q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",14,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",15),A(3,1),r(),a(4,"spk-form-field")(5,"label",16),E(6,2),m(7,"sup"),D(),r(),m(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),A(11,3),r(),m(12,"textarea",19),r(),F(13,dn,7,2),a(14,"div",20)(15,"button",21),C("click",function(){return S(o),T(t.exit())}),E(16,4),m(17,"spk-icon"),D(),r(),F(18,Fn,3,1,"button",22)(19,gn,4,2,"spk-tooltip",23),r()()}e&2&&(_("formGroup",t.generalForm),s(13),g(t.isNew()?13:-1),s(5),g(t.encryptionFieldSignal()===""?18:19))},dependencies:[Ee,fe,ne,ie,Ce,Se,Te,re,se,Me,oe,ae,Kt,mt,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Cn=["formRef"],fn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Sn=n=>({$implicit:n});function Tn(n,i){if(n&1&&(a(0,"spk-option",17),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function En(n,i){if(n&1&&(a(0,"spk-option",17),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),s(),b(e.name)}}function Dn(n,i){if(n&1){let e=P();E(0,7,1),a(1,"button",29,2),C("click",function(){let o=S(e).$implicit,l=p();return T(l.addNewOption(o))}),r(),D()}if(n&2){let e=i.$implicit;s(),Ze(e.name),Je(0)}}function Nn(n,i){n&1&&Ge(0)}function An(n,i){if(n&1&&F(0,Nn,1,0,"ng-container",30),n&2){let e=i.$implicit,t=i.$index;p();let o=Fe(35);_("ngTemplateOutlet",o)("ngTemplateOutletContext",be(5,Sn,Gt(2,fn,t,e)))}}function hn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function yn(n,i){if(n&1&&(a(0,"app-file-tree",33)(1,"label",39),c(2),F(3,hn,3,1,"spk-tooltip",40),r(),m(4,"input",41),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name)}}function On(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Pn(n,i){if(n&1&&(a(0,"app-file-tree",34)(1,"label",39),c(2),F(3,On,3,1,"spk-tooltip",40),r(),m(4,"input",41),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function xn(n,i){n&1&&(a(0,"spk-icon",42),c(1,"link"),r())}function In(n,i){n&1&&(a(0,"spk-icon",42),c(1,"textbox"),r())}function $n(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",39),c(2),F(3,kn,3,1,"spk-tooltip",40),r(),m(4,"input",41),F(5,xn,2,0,"spk-icon",42)(6,In,2,0,"spk-icon",42),r()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name),s(),g(t.formView.type==="Path"?5:6)}}function Mn(n,i){if(n&1){let e=P();a(0,"span",46),C("click",function(){S(e);let o=p(2).$implicit,l=p();return T(l.oauthStartTokenCreation(o.formViewType))}),c(1,"AuthID"),r()}}function wn(n,i){n&1&&(a(0,"spk-icon",42),c(1,"password"),r())}function Rn(n,i){if(n&1){let e=P();a(0,"spk-icon",47),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function vn(n,i){if(n&1){let e=P();a(0,"spk-icon",47),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Gn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",39),c(2),r(),m(3,"input",43),F(4,Mn,2,0,"span",44)(5,wn,2,0,"spk-icon",42)(6,Rn,2,0,"spk-icon",45)(7,vn,2,0,"spk-icon",45),r()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),s(),g(t.oauthField===t.formView.name?4:5),s(2),g(t.formView.showPassword?6:7)}}function bn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Vn(n,i){if(n&1&&(a(0,"spk-option",17),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function Ln(n,i){if(n&1&&(a(0,"spk-select")(1,"label",39),c(2),F(3,bn,3,1,"spk-tooltip",40),r(),m(4,"input",48),M(5,Vn,2,2,"spk-option",17,$),r()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name),s(),w(t.formView.options)}}function Un(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Bn(n,i){if(n&1&&(a(0,"spk-option",17),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function Kn(n,i){if(n&1&&(a(0,"div",35)(1,"label",39),c(2),F(3,Un,3,1,"spk-tooltip",40),r(),a(4,"div",49)(5,"spk-form-field"),m(6,"input",50),a(7,"spk-icon",42),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",51),M(12,Bn,2,2,"spk-option",17,$),r()()()),n&2){let e,t=p().$implicit,o=p();_("formGroupName",t.formView.name),s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(3),z("id","destination-",t.formGroupName,"-",t.index,""),s(6),w(o.sizeOptions())}}function Xn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function zn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",39),c(2),F(3,Xn,3,1,"spk-tooltip",40),r(),m(4,"input",52),a(5,"spk-icon",42),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name)}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Wn(n,i){if(n&1&&(a(0,"spk-toggle",36)(1,"label",39),c(2),F(3,Hn,3,1,"spk-tooltip",40),r(),m(4,"input",53),r()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name)}}function jn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function qn(n,i){n&1&&(a(0,"spk-option",55),c(1,"None"),r()),n&2&&_("value","None")}function Qn(n,i){if(n&1&&(a(0,"spk-option",17),c(1),m(2,"spk-checkbox",56),r()),n&2){let e=p().$implicit;_("value",e),s(),v(" ",e," ")}}function Yn(n,i){if(n&1&&F(0,qn,2,1,"spk-option",55)(1,Qn,3,2,"spk-option",17),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function Zn(n,i){if(n&1&&(a(0,"spk-select",37)(1,"label",39),c(2),F(3,jn,3,1,"spk-tooltip",40),r(),m(4,"input",54),M(5,Yn,2,1,null,null,$),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),V("formControlName",t.formView.name),s(),w(t.formView.options)}}function Jn(n,i){if(n&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function ei(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",39),c(2),F(3,Jn,3,1,"spk-tooltip",40),r(),m(4,"input",41),r()),n&2){let e,t=p().$implicit;s(),z("for","destination-",t.formGroupName,"-",t.index,""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),z("id","destination-",t.formGroupName,"-",t.index,""),V("formControlName",t.formView.name)}}function ti(n,i){if(n&1){let e=P();a(0,"div",31),K(1,32),F(2,yn,5,14,"app-file-tree",33)(3,Pn,5,10,"app-file-tree",34)(4,$n,7,10,"spk-form-field")(5,Gn,8,11,"spk-form-field")(6,Ln,7,9,"spk-select")(7,Kn,14,9,"div",35)(8,zn,7,9,"spk-form-field")(9,Wn,5,9,"spk-toggle",36)(10,Zn,7,7,"spk-select",37)(11,ei,5,9,"spk-form-field"),X(),a(12,"button",38),C("click",function(){let o=S(e).$implicit,l=p();return T(l.removeFormView(o.formView,0))}),a(13,"spk-icon"),c(14,"x-circle"),r()()()}if(n&2){let e=i.$implicit;s(),_("formGroupName",e.formGroupName),s(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Oe=new ee,ni=["Bytes","KB","MB","GB","TB","PB"],ii=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],Wt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Oe.group({remoteVolumeSize:Oe.group({size:Oe.control(n.remoteVolumeSize),unit:Oe.control(n.size)}),backupRetention:Oe.control(n.backupRetention),advancedOptions:Oe.group({})}),Fr=(n,i)=>Oe.group({name:Oe.control(n),value:Oe.control(i)}),yt=class n{#e=O(le);#t=O(te);#i=O(ge);formRef=me.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=x(ni);rentationOptions=x(ii);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(o=>o.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(o=>o.name===e);return t?`${t.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&ue(t.formRef,Cn,5),e&2&&de()},decls:43,vars:5,consts:()=>{let i;i=$localize`Select an option...`;let e;e=$localize`Options`;let t;t=$localize`Remote volume size`;let o;o=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK:Read more${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let d;d=$localize` Advanced options ${"\uFFFD#26\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#27\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#27\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#29\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*31:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#27\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*31:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_MENU:`,d=he(d);let k;k=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;return I=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],["fieldTemplate",""],["option",""],e,t,o,l,d,k,I,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",i,"formControlName","unit"],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",10,0),C("submit",function(){return S(o),T(t.submit())}),a(2,"h3",11),A(3,3),r(),a(4,"div",12)(5,"div",13)(6,"spk-form-field")(7,"label",14),A(8,4),r(),m(9,"input",15),r(),a(10,"spk-select"),m(11,"input",16),M(12,Tn,2,2,"spk-option",17,$),r()(),a(14,"p"),E(15,5),m(16,"a",18),D(),r()(),a(17,"spk-select",19)(18,"label",14),A(19,6),r(),m(20,"input",20),M(21,En,2,2,"spk-option",17,$),r(),a(23,"app-toggle-card",21),K(24,22),E(25,7),a(26,"spk-menu")(27,"button",23),m(28,"spk-icon"),r(),K(29,24),M(30,Dn,3,1,"button",25,$),X(),r(),D(),X(),M(32,An,1,7,"ng-container",null,$),r(),F(34,ti,15,2,"ng-template",null,1,rt),a(36,"div",26)(37,"button",27),C("click",function(){return S(o),T(t.goBack())}),E(38,8),m(39,"spk-icon"),D(),r(),a(40,"button",28),E(41,9),m(42,"spk-icon"),D(),r()()()}e&2&&(_("formGroup",t.optionsForm),s(12),w(t.sizeOptions()),s(5),_("displayFn",t.retentionOptionDisplayFn()),s(4),w(t.rentationOptions()),s(2),_("disallowToggle",!0),s(7),w(t.nonSelectedOptions()),s(2),w(t.selectedOptions()),s(8),Ae("loader",t.isSubmitting()))},dependencies:[Ee,fe,ne,Ie,xe,ie,Ce,Se,Te,$e,st,dt,se,Me,oe,re,we,ut,ae,Be,Ke,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var oi=["formRef"];function ri(n,i){if(n&1&&(a(0,"spk-option",38),c(1),r()),n&2){let e=i.$implicit;_("value",e.key),s(),b(e.label)}}function ai(n,i){if(n&1){let e=P();a(0,"div",26)(1,"spk-form-field")(2,"label",27),A(3,8),r(),a(4,"input",28,1),C("focus",function(){S(e);let o=Fe(5);return T(o.showPicker())}),r(),a(6,"spk-icon",29),c(7,"clock"),r()(),a(8,"spk-form-field"),m(9,"label",30),a(10,"input",31,2),C("focus",function(){S(e);let o=Fe(11);return T(o.showPicker())}),r(),a(12,"spk-icon",29),c(13,"calendar"),r()()(),K(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),A(18,9),r(),m(19,"input",35),r(),a(20,"spk-select",36),m(21,"input",37),M(22,ri,2,2,"spk-option",38,$),r()(),a(24,"app-toggle-card",39),K(25,40),A(26,10),X(),a(27,"div",41)(28,"spk-toggle",21),E(29,11),m(30,"input",42),D(),r(),a(31,"spk-toggle",21),E(32,12),m(33,"input",43),D(),r(),a(34,"spk-toggle",21),E(35,13),m(36,"input",44),D(),r(),a(37,"spk-toggle",21),E(38,14),m(39,"input",45),D(),r(),a(40,"spk-toggle",21),E(41,15),m(42,"input",46),D(),r(),a(43,"spk-toggle",21),E(44,16),m(45,"input",47),D(),r(),a(46,"spk-toggle",21),E(47,17),m(48,"input",48),D(),r()()(),X()}if(n&2){let e=p();s(20),_("displayFn",e.displayFn),s(2),w(e.unitOptions),s(2),_("disallowToggle",!0)}}var q=new ee,jt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],qt=(n={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>q.group({autoRun:q.control(n.autoRun),nextTime:q.group({time:q.control(n.nextTime.time),date:q.control(n.nextTime.date)}),runAgain:q.group({repeatValue:q.control(n.runAgain.repeatValue),repeatUnit:q.control(n.runAgain.repeatUnit),allowedDays:q.group({mon:q.control(n.runAgain.allowedDays.mon),tue:q.control(n.runAgain.allowedDays.tue),wed:q.control(n.runAgain.allowedDays.wed),thu:q.control(n.runAgain.allowedDays.thu),fri:q.control(n.runAgain.allowedDays.fri),sat:q.control(n.runAgain.allowedDays.sat),sun:q.control(n.runAgain.allowedDays.sun)})})}),Ot=class n{#e=O(le);#t=O(te);#i=O(ge);formRef=me.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=jt;displayFn(i){let e=jt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&ue(t.formRef,oi,5),e&2&&de()},decls:18,vars:2,consts:()=>{let i;i=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let d;d=$localize`Next time`;let k;k=$localize`Run again every`;let I;I=$localize`Allowed days`;let h;h=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],i,e,t,o,l,d,k,I,h,Q,Y,U,B,j,N,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",19),A(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),E(6,4),m(7,"input",22),D(),r(),a(8,"p"),A(9,5),r()(),F(10,ai,49,2),a(11,"div",23)(12,"button",24),C("click",function(){return S(o),T(t.goBack())}),E(13,6),m(14,"spk-icon"),D(),r(),a(15,"button",25),E(16,7),m(17,"spk-icon"),D(),r()()()}if(e&2){let o;_("formGroup",t.scheduleForm),s(10),g((o=t.scheduleFormSignal())!=null&&o.autoRun?10:-1)}},dependencies:[Ee,fe,ne,Ie,xe,ie,Ce,Se,Te,$e,re,se,ae,we,oe,Me,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function si(n,i){if(n&1&&(a(0,"spk-option",2),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),s(),b(e.key)}}function li(n,i){if(n&1&&(a(0,"spk-option",2),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),s(),b(e.key)}}function pi(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",5),C("ngModelChange",function(o){S(e);let l=p(2);return T(l.updateStateExpression(o))}),r(),M(2,li,2,2,"spk-option",2,$),r()}if(n&2){let e,t=p(2);_("hideClearButton",!0)("displayFn",t.displayFn),s(),_("ngModel",(e=t.pathState())==null?null:e.expression),s(),w(t.fileGroupOptions())}}function ci(n,i){if(n&1){let e=P();a(0,"spk-form-field")(1,"input",5),C("ngModelChange",function(o){S(e);let l=p(2);return T(l.updateStateExpression(o))}),r()()}if(n&2){let e,t=p(2);s(),_("ngModel",(e=t.pathState())==null?null:e.expression)}}function _i(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(o){S(e);let l=p();return T(l.updateStateType(o))}),r(),M(2,si,2,2,"spk-option",2,$),r(),F(4,pi,4,3,"spk-select",0)(5,ci,2,1,"spk-form-field"),a(6,"div",3),C("click",function(){S(e);let o=p();return T(o.removeFilter())}),a(7,"spk-icon",4),c(8,"x-circle"),r()()}if(n&2){let e,t,o=p();_("hideClearButton",!0)("displayFn",o.displayFn),s(),_("ngModel",(e=o.pathState())==null?null:e.type),s(),w(o.expressionOptions()),s(2),g(((t=o.pathState())==null?null:t.type)==="-FileGroup"||((t=o.pathState())==null?null:t.type)==="+FileGroup"?4:5)}}var Qt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],mi=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ft=class n{path=ot.required();pathChange=Ye();remove=Ye();expressionOptions=x(Qt);fileGroupOptions=x(mi);pathState=x(null);typeState=L(()=>{let i=this.pathState();return i?i.type:null});pathEffect=at(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#t(e),e)),this.#e()}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#t(e),e)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let o=i.expression.endsWith("/"),l=i.expression.startsWith("/");return o&&l?`${e}${i.expression}`:o?`${e}${i.expression}/`:l?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=Qt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let i;return i=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",i,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,t){e&1&&F(0,_i,9,4),e&2&&g(t.pathState()?0:-1)},dependencies:[_t,ne,ie,Vt,se,ae,oe,re],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var ui=["formRef"];function di(n,i){if(n&1){let e=P();a(0,"app-filter",41),C("pathChange",function(o){let l=S(e).$index,d=p(2);return T(d.patchPathAt(o,l))})("remove",function(){let o=S(e).$index,l=p(2);return T(l.removePathAt(o))}),r()}if(n&2){let e=i.$implicit;_("path",e)}}function Fi(n,i){if(n&1&&M(0,di,1,1,"app-filter",40,$),n&2){let e=p();w(e.pathArray())}}function gi(n,i){if(n&1&&(a(0,"spk-option",44),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function Ci(n,i){if(n&1&&(a(0,"div",39)(1,"spk-form-field"),m(2,"input",42),r(),a(3,"spk-select"),m(4,"input",43),M(5,gi,2,2,"spk-option",44,$),r()()),n&2){let e=p();s(5),w(e.sizeOptions())}}var Pe=new ee,fi=["Bytes","KB","MB","GB","TB","PB"],Yt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Pe.group({path:Pe.control(n.path),excludes:Pe.group({hidden:Pe.control(n.excludes.hidden),system:Pe.control(n.excludes.system),temporary:Pe.control(n.excludes.temporary),filesLargerThan:Pe.group({size:Pe.control(null),unit:Pe.control(null)})})}),Pt=class n{#e=O(le);#t=O(te);#i=O(ge);formRef=me.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=L(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=x(fi);pathSignal=W(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),l=this.pathArray().map((d,k)=>k===e?`${i}`:`${d}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${l}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),o=this.pathArray().filter((l,d)=>d!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${o}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&ue(t.formRef,ui,5),e&2&&de()},decls:55,vars:12,consts:()=>{let i;i=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let o;o=$localize`System files`;let l;l=$localize`Temporary files`;let d;d=$localize`Source Data`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let h;h=$localize`Source Data`;let Q;Q=$localize`Add Path`;let Y;Y=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let B;B=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let N;N=$localize`Exclude`;let u;u=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let H;H=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let Ne;return Ne=$localize`Select an option...`,[["formRef",""],d,k,I,h,Q,Y,U,B,j,N,u,f,H,y,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",i,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",t,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",Ne],[3,"value"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",16,0),C("submit",function(){return S(o),T(t.next())}),a(2,"div",17)(3,"h3",18),A(4,1),r(),a(5,"app-file-tree",19)(6,"label",20),c(7,"Folder path"),r(),m(8,"input",21),r(),a(9,"div",22)(10,"button",23),C("click",function(){return S(o),T(t.goBack())}),E(11,2),m(12,"spk-icon"),D(),r(),a(13,"button",24),E(14,3),m(15,"spk-icon"),D(),r()()(),a(16,"div",25)(17,"h3",18),A(18,4),r(),a(19,"app-toggle-card",26),K(20,27),A(21,5),X(),a(22,"p",28),A(23,6),r(),a(24,"div",29)(25,"spk-form-field"),m(26,"input",30),r(),a(27,"button",31),C("click",function(){return S(o),T(t.addNewPath())}),a(28,"spk-icon"),c(29,"plus"),r()()()(),a(30,"app-toggle-card",26),K(31,27),A(32,7),X(),a(33,"p",28),A(34,8),r(),a(35,"button",32),C("click",function(){return S(o),T(t.addFilter())}),A(36,9),r(),F(37,Fi,2,0),r(),a(38,"app-toggle-card",33),K(39,27),A(40,10),X(),a(41,"p",28),A(42,11),r(),a(43,"spk-toggle",34),E(44,12),m(45,"input",35),D(),r(),a(46,"spk-toggle",34),E(47,13),m(48,"input",36),D(),r(),a(49,"spk-toggle",34),E(50,14),m(51,"input",37),D(),r(),a(52,"spk-toggle",38),C("click",function(){return S(o),T(t.toggleFilesLargerThan())}),A(53,15),r(),F(54,Ci,7,0,"div",39),r()()()}if(e&2){let o;_("formGroup",t.sourceDataForm),s(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),s(14),_("disallowToggle",!0),s(7),_("formControl",t.newPathCtrl),s(4),_("disallowToggle",!0),s(7),g((o=t.pathSignal())!=null&&o.length?37:-1),s(),_("disallowToggle",!0),s(14),Ae("active",t.filesLargerThan()),s(2),g(t.filesLargerThan()?54:-1)}},dependencies:[_t,fe,ne,Ie,xe,ie,Ce,Ee,ct,Se,Te,$e,re,ae,oe,Me,se,we,Ke,Re,ft],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var pe=new ee,le=class n{#e=O(te);#t=O(lt);#i=O(Ue);#o=O(Ft);generalForm=Ht();sourceDataForm=Yt();scheduleForm=qt();destinationForm=Zt();optionsForm=Wt();isDraft=x(!1);backupId=x(null);isSubmitting=x(!1);finishedLoading=x(!1);backupDefaults=x(null);isNew=L(()=>this.backupId()==="new");selectedOptions=x([]);selectedAdvancedFormPair=x([]);destinationFormPair=x({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=L(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});selectedHttpOptions=x([]);notSelectedHttpOptions=L(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});sourceDataFormSignal=W(this.sourceDataForm.valueChanges);destinationFormSignal=W(this.destinationForm.valueChanges);generalFormSignal=W(this.generalForm.valueChanges);encryptionFieldSignal=W(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=W(this.scheduleForm.valueChanges);destinationOptions=L(()=>this.#t.backendModules()??[]);httpOptions=L(()=>this.#t.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=L(()=>{let i=this.#t.systemInfo()?.EncryptionModules??[];return[ht,...i]});nonSelectedOptions=L(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let o=this.notSelectedAdvancedFormPair().find(l=>l.name===i);o&&this.addAdvancedFormPair(o,e,t)}addHttpOptionByName(i,e,t){let o=this.notSelectedHttpOptions().find(l=>l.name===i);o&&this.addHttpOption(o,e,t)}addAdvancedFormPair(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,l=t??i.defaultValue;this.createFormField(o,i,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,l=t??i.defaultValue;this.createFormField(o,i,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===i.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(l=>l.name!==i.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(l=>l.name!==i.name),o))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(o=>o.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Qe(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Qe(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#s(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],o=i.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",l=i.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,d=l?.Value.replace(/[0-9]/g,"")??null,k=l?.Value.replace(/[^0-9]/g,"")??null,I={path:[...e,...t].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:d&&k?{size:parseInt(k),unit:d.toUpperCase()}:null}};this.sourceDataForm.patchValue(I)}mapDestinationToForm(i){let e=i.TargetURL?Nt(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#s(i){let e=Nt(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(l=>l.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",o={name:i.Name??"",description:i.Description??""};t&&t!==""&&(o.encryption=t),this.generalForm.patchValue(o)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,o={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(o)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(o=>{if(o.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(o.Value??"");if(!(o.Name&&e.includes(o.Name))){if(o.Name==="dblock-size"){let l=o.Value?.replace(/[^0-9]/g,""),d=o.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:d?d.toUpperCase():null})}if(o.Name&&o.Value){let l=t.find(d=>d.name===o.Name);if(!l)return;this.addOptionToFormGroup(l,o.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,d=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],k=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(k=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let I=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([u,f])=>f).map(([u,f])=>u):[],h=o.path?.split("\0")??[],Q=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},Y=this.advancedOptions(),U=Object.entries(e.advancedOptions??{}).filter(([u,f])=>u&&f).map(([u,f])=>{let H=Y.find(y=>y.name===u);return H?.type==="Size"?{Name:u,Value:`${f.size}${f.unit.toLowerCase()}`}:H?.type==="Integer"?{Name:u,Value:f.toString()}:H?.type==="Boolean"?{Name:u,Value:f.toString()}:{Name:u,Value:f}}),B=[Q,...U],j=Object.entries(o.excludes??{}).filter(([u,f])=>f&&u!=="filesLargerThan").map(([u])=>u),N=o.excludes?.filesLargerThan;return j.length&&B.push({Name:"--exclude-files-attributes",Value:j.join(",")}),N&&N.size!==null&&N.unit!==null&&B.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:d[0]??null,Sources:h.filter(u=>!u.startsWith("-")),Settings:B,Filters:h.filter(u=>u.startsWith("-")).map((u,f)=>({Order:f,Include:!1,Expression:u.slice(1)}))},Schedule:t.autoRun?{Repeat:k,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:I}:null}}#a(i){return i.controls.map(e=>gt(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(o=>o.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(o=>(o.push(i),o))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,pe.control(t));return}if(e.type==="Size"){let o=t.replace(/[0-9]/g,""),l=t.replace(/[^0-9]/g,"");i.addControl(e.name,pe.group({size:pe.control(l?parseInt(l):50),unit:pe.control(o?o.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,pe.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,pe.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,pe.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,pe.control(t,[ye.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let o=this.destinationOptions().find(N=>N.Key===i),l=this.httpOptions();if(!o||!o.Options)return;let d=tt.hasOwnProperty(i)&&tt[i],k=d&&d.oauthField?d.oauthField:null,I=d&&d.customFields?d.customFields:{},h=d&&d.dynamicFields?d.dynamicFields:[],Q=d&&d.advancedFields?d.advancedFields:[],Y=d&&d.ignoredAdvancedFields?d.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=pe.group({}),B=pe.group({}),j=pe.group({});I&&Object.entries(I).forEach(([N,u],f)=>{let ce=u,{formElement:H}=ce,y=xt(ce,["formElement"]);U.addControl(N,H(e?.custom[N])),this.destinationFormPair.update(Ne=>(Ne.custom.push(Z({order:900+f},y)),Ne))});for(let N=0;N<o.Options.length;N++){let u=o.Options[N];if(u.Deprecated)continue;let f=h.find(H=>H===u.Name||H.name===u.Name);if(f){let H=f&&typeof f!="string",y={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+N},ce=H?Z(Z({},y),f):y,R=e?.dynamic[u.Name]??u.DefaultValue;this.createFormField(B,ce,R),this.destinationFormPair.update(je=>(je.dynamic.push(ce),je))}else{if(Y.find(_e=>_e===u.Name))continue;let y=Q.find(_e=>_e===u.Name||_e.name===u.Name),ce=y&&typeof y!="string",Ne=e?.advanced[u.Name],R=Ne??u.DefaultValue,je={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:R,order:900+N},Et=ce?Z(Z({},je),y):je;t&&Ne&&(this.createFormField(j,Et,R),this.selectedAdvancedFormPair.update(_e=>(_e.push(Et),_e))),this.destinationFormPair.update(_e=>(_e.advanced.push(Et),_e))}}for(let N=0;N<l.length;N++){let u=l[N],f=e?.advanced[u.name],H=f??u.defaultValue;t&&f&&(this.createFormField(j,u,H),this.selectedHttpOptions.update(y=>(y.push(u),y)))}this.destinationFormPair.update(N=>({oauthField:N.oauthField,custom:N.custom.sort((u,f)=>u.order-f.order),dynamic:N.dynamic.sort((u,f)=>u.order-f.order),advanced:N.advanced.sort((u,f)=>u.order-f.order)})),this.destinationForm.controls.destinations.push(Jt({key:o.Key,customGroup:U,dynamicGroup:B,advancedGroup:j}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ke({token:n,factory:n.\u0275fac,providedIn:"root"})};var Si=["formRef"],Ti=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),Tt=n=>({$implicit:n}),Ei=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Di=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),Ni=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),Ai=()=>({maxWidth:"700px",width:"100%"});function hi(n,i){n&1&&(E(0,2,2),m(1,"spk-icon"),D())}function yi(n,i){n&1&&A(0,2,3)}function Oi(n,i){if(n&1){let e=P();E(0,2,1),a(1,"button",24),C("click",function(){S(e);let o=p();return T(o.testDestination())}),F(2,hi,2,0)(3,yi,1,0),r(),D()}if(n&2){let e=p();s(),Ae("success",e.successfulTest()),s(),g(e.successfulTest()?2:3)}}function Pi(n,i){if(n&1){let e=P();a(0,"p",30),C("click",function(){S(e);let o=p();return T(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,5),m(2,"span",31),D(),r()}}function ki(n,i){if(n&1){let e=P();a(0,"div",32)(1,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("file"))}),a(2,"h3"),A(3,6),r(),a(4,"p"),A(5,7),r()(),a(6,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("gcs"))}),a(7,"h3"),c(8,"Google Cloud Storage"),r(),a(9,"p"),A(10,8),r()(),a(11,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("s3"))}),a(12,"h3"),c(13,"S3 compatible bucket"),r(),a(14,"p"),A(15,9),r()(),a(16,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("ssh"))}),a(17,"h3"),c(18,"SSH"),r(),a(19,"p"),A(20,10),r()(),a(21,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("googledrive"))}),a(22,"h3"),c(23,"Google Drive"),r(),a(24,"p"),A(25,11),r()()(),a(26,"p"),A(27,12),r()}}function xi(n,i){n&1&&Ge(0)}function Ii(n,i){if(n&1&&F(0,xi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let l=Fe(29),d=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",be(7,Tt,et(2,Ti,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function $i(n,i){n&1&&Ge(0)}function Mi(n,i){if(n&1&&F(0,$i,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let l=Fe(29),d=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",be(7,Tt,et(2,Ei,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function wi(n,i){if(n&1){let e=P();E(0,13,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,l=p(2);return T(l.addAdvancedFormPair(o,0))}),r(),D()}if(n&2){let e=i.$implicit;s(),Ze(e.name),Je(0)}}function Ri(n,i){n&1&&Ge(0)}function vi(n,i){if(n&1&&F(0,Ri,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let l=Fe(29),d=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",be(7,Tt,et(2,Di,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Gi(n,i){if(n&1){let e=P();E(0,14,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,l=p(2);return T(l.addHttpOption(o,0))}),r(),D()}if(n&2){let e=i.$implicit;s(),Ze(e.name),Je(0)}}function bi(n,i){n&1&&Ge(0)}function Vi(n,i){if(n&1&&F(0,bi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let l=Fe(29),d=p();_("ngTemplateOutlet",l)("ngTemplateOutletContext",be(7,Tt,et(2,Ni,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Li(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Ui(n,i){if(n&1&&(a(0,"app-file-tree",43)(1,"label",50),c(2),F(3,Li,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name)}}function Bi(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Ki(n,i){if(n&1&&(a(0,"app-file-tree",44)(1,"label",50),c(2),F(3,Bi,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name)}}function Xi(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function zi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"link"),r())}function Hi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"textbox"),r())}function Wi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,Xi,3,1,"spk-tooltip",51),r(),m(4,"input",52),F(5,zi,2,0,"spk-icon",53)(6,Hi,2,0,"spk-icon",53),r()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name),s(),g(t.formView.type==="Path"?5:6)}}function ji(n,i){if(n&1){let e=P();a(0,"span",57),C("click",function(){S(e);let o=p(2).$implicit,l=p(2);return T(l.oauthStartTokenCreation(o.destinationType))}),c(1,"AuthID"),r()}}function qi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"password"),r())}function Qi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function Yi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Zi(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),r(),m(3,"input",54),F(4,ji,2,0,"span",55)(5,qi,2,0,"spk-icon",53)(6,Qi,2,0,"spk-icon",56)(7,Yi,2,0,"spk-icon",56),r()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),s(),g(t.oauthField===t.formView.name?4:5),s(2),g(t.formView.showPassword?6:7)}}function Ji(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function eo(n,i){if(n&1&&(a(0,"spk-option",60),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function to(n,i){if(n&1&&(a(0,"spk-select")(1,"label",50),c(2),F(3,Ji,3,1,"spk-tooltip",51),r(),m(4,"input",59),M(5,eo,2,2,"spk-option",60,$),r()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name),s(),w(t.formView.options)}}function no(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function io(n,i){if(n&1&&(a(0,"spk-option",60),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),s(),$t(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function oo(n,i){if(n&1&&(a(0,"spk-select",45)(1,"label",50),c(2),F(3,no,3,1,"spk-tooltip",51),r(),m(4,"input",59),K(5,61),M(6,io,2,3,"spk-option",60,$),X(),r()),n&2){let e,t=p().$implicit,o=p(2);_("isFreeText",!0),s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name),s(2),w(t.formView.loadOptions(o.injector)())}}function ro(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function ao(n,i){if(n&1&&(a(0,"spk-option",60),c(1),r()),n&2){let e=i.$implicit;_("value",e),s(),b(e)}}function so(n,i){if(n&1&&(a(0,"div",46)(1,"label",50),c(2),F(3,ro,3,1,"spk-tooltip",51),r(),a(4,"div",62)(5,"spk-form-field"),m(6,"input",63),a(7,"spk-icon",53),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",64),M(12,ao,2,2,"spk-option",60,$),r()()()),n&2){let e,t=p().$implicit,o=p(2);_("formGroupName",t.formView.name),s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(3),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(6),w(o.sizeOptions())}}function lo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function po(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,lo,3,1,"spk-tooltip",51),r(),m(4,"input",65),a(5,"spk-icon",53),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name)}}function co(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function _o(n,i){if(n&1&&(a(0,"spk-toggle",47)(1,"label",50),c(2),F(3,co,3,1,"spk-tooltip",51),r(),m(4,"input",66),r()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name)}}function mo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function uo(n,i){n&1&&(a(0,"spk-option",68),c(1,"None"),r()),n&2&&_("value","None")}function Fo(n,i){if(n&1&&(a(0,"spk-option",60),c(1),m(2,"spk-checkbox",69),r()),n&2){let e=p().$implicit;_("value",e),s(),v(" ",e," ")}}function go(n,i){if(n&1&&F(0,uo,2,1,"spk-option",68)(1,Fo,3,2,"spk-option",60),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function Co(n,i){if(n&1&&(a(0,"spk-select",48)(1,"label",50),c(2),F(3,mo,3,1,"spk-tooltip",51),r(),m(4,"input",67),M(5,go,2,1,null,null,$),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),V("formControlName",t.formView.name),s(),w(t.formView.options)}}function fo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function So(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,fo,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit;s(),G("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),s(),v(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),s(),g(t.formView.longDescription?3:-1),s(),G("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),V("formControlName",t.formView.name)}}function To(n,i){if(n&1){let e=P();a(0,"button",70),C("click",function(){S(e);let o=p().$implicit,l=p(2);return T(l.removeFormView(o.formView,0))}),a(1,"spk-icon"),c(2,"x-circle"),r()()}}function Eo(n,i){if(n&1&&(a(0,"div",41),K(1,42),F(2,Ui,5,16,"app-file-tree",43)(3,Ki,5,12,"app-file-tree",44)(4,Wi,7,12,"spk-form-field")(5,Zi,8,13,"spk-form-field")(6,to,7,11,"spk-select")(7,oo,8,12,"spk-select",45)(8,so,14,11,"div",46)(9,po,7,11,"spk-form-field")(10,_o,5,11,"spk-toggle",47)(11,Co,7,8,"spk-select",48)(12,So,5,11,"spk-form-field"),X(),F(13,To,3,0,"button",49),r()),n&2){let e=i.$implicit;Ae("single-field",e.formGroupName!=="advanced"),s(),_("formGroupName",e.formGroupName),s(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),s(11),g(e.formGroupName==="advanced"?13:-1)}}function Do(n,i){if(n&1&&(K(0,25)(1,34),M(2,Ii,1,9,"ng-container",null,$),M(4,Mi,1,9,"ng-container",null,$),a(6,"app-toggle-card",35),K(7,36),E(8,13),a(9,"spk-menu")(10,"button",37),m(11,"spk-icon"),r(),K(12,23),M(13,wi,2,1,"button",38,$),X(),r(),D(),X(),M(15,vi,1,9,"ng-container",null,$),r(),a(17,"app-toggle-card",35),K(18,36),E(19,14),a(20,"spk-menu")(21,"button",37),m(22,"spk-icon"),r(),K(23,23),M(24,Gi,2,1,"button",38,$),X(),r(),D(),X(),M(26,Vi,1,9,"ng-container",null,$),r(),F(28,Eo,14,5,"ng-template",null,1,rt),X()()),n&2){let e=p();s(2),w(e.destinationFormPair().custom),s(2),w(e.destinationFormPair().dynamic),s(2),_("disallowToggle",!0),s(4),_("disabled",e.notSelectedAdvancedFormPair().length===0),s(3),w(e.notSelectedAdvancedFormPair()),s(2),w(e.selectedAdvancedFormPair()),s(2),_("disallowToggle",!0),s(4),_("disabled",e.notSelectedHttpOptions().length===0),s(3),w(e.notSelectedHttpOptions()),s(2),w(e.selectedHttpOptions())}}function No(n,i){if(n&1){let e=P();a(0,"spk-dialog",71),Rt("isOpenChange",function(o){S(e);let l=p();return wt(l.targetUrlDialogOpen,o)||(l.targetUrlDialogOpen=o),T(o)}),a(1,"header",72)(2,"h2"),A(3,15),r(),a(4,"spk-alert",73),A(5,16),r()(),a(6,"div",74)(7,"spk-form-field"),m(8,"textarea",75),r()(),a(9,"footer",76)(10,"button",27),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),a(12,"button",77),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!0))}),E(13,17),m(14,"spk-icon"),D(),r()()()}if(n&2){let e=p();Mt("isOpen",e.targetUrlDialogOpen),_("options",vt(3,Ai)),s(8),_("formControl",e.targetUrlCtrl)}}var Ao=["Bytes","KB","MB","GB","TB","PB"],St=new ee,Zt=(n={destinations:[]})=>St.group({destinations:St.array(n.destinations)}),Jt=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>St.group({destinationType:St.control(n),custom:i,dynamic:e,advanced:t}),kt=class n{#e=O(te);#t=O(ge);#i=O(bt);#o=O(Ue);#n=O(le);#r=O(Bt);injector=O(It);formRef=me.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=L(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=x(Ao);successfulTest=x(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#n.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#n.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#n.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#n.addHttpOption(i,e)}targetUrl=L(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let e=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#n.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:o=>{let l=o.error.error.Error;if(l==="missing-folder"&&this.#r.open(Ve,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:d=>{d&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),l.startsWith("incorrect-cert:")){let d=l.split("incorrect-cert:")[1];this.#r.open(Ve,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${d}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:k=>{k&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",d)}})}if(l.startsWith("incorrect-host-key:")){let d=l.split('incorrect-host-key:"')[1].split('",')[0],k=l.split('accepted-host-key:"')[1].split('",')[0];k?this.#r.open(Ve,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${k}
6
+ with the REPORTED host key: ${d}?`,confirmText:"Approve",cancelText:"Cancel"},closed:I=>{I&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",i,d)}}):this.#r.open(Ve,{maxWidth:"500px",data:{title:"Approve host key?",message:`No certificate was specified, please verify that the reported host key is correct: ${d}`,confirmText:"Approve",cancelText:"Cancel"},closed:I=>{I&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",i,d)}})}}})}mapToTargetUrl(i){return gt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let e=this.destinationOptions().find(t=>t.Key===i);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=x("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=x(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=x(!1);#p=x(null);keyCreation(){}oauthStartTokenCreation(i){this.#a.set(!0);let e=450,t=600,o=this.#s()+"?type="+i+"&token="+this.#l(),l=screen.width/2-e/2,d=screen.height/2-t/2,k=window.open(o,"_blank","height="+t+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+d);k?.addEventListener("blur",I=>{console.log("event blur",I)}),k?.addEventListener("beforeunload",I=>{console.log("event beforeunload",I),this.#i.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Qe(()=>this.#a.set(!1))).subscribe({next:h=>{console.log("res",h),h?.authid&&this.#p.set(h.authid)}})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&ue(t.formRef,Si,5),e&2&&de()},decls:24,vars:6,consts:()=>{let i;i=$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:`,i=he(i);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let t;t=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`File system`;let d;d=$localize`Store backups on your local file system.`;let k;k=$localize`Store backups in Google Cloud Storage.`;let I;I=$localize`Store backups in any S3 compatible bucket.`;let h;h=$localize`Store backups in SSH.`;let Q;Q=$localize`Store backups in Google Drive.`;let Y;Y=$localize`More destinations are coming soon.`;let U;U=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,U=he(U);let B;B=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,B=he(B);let j;j=$localize`Edit target URL`;let N;N=$localize` Be careful, this will overwrite everything you have in your destination. `;let u;return u=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],i,e,t,o,l,d,k,I,h,Q,Y,U,B,j,N,u,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[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,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["item","","type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["item","","type","button",3,"click"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[3,"value"],["options",""],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"header")(3,"h3",19),E(4,2),a(5,"div",20),F(6,Oi,4,3,"button",21),a(7,"spk-menu")(8,"button",22),m(9,"spk-icon"),r(),K(10,23),a(11,"button",24),C("click",function(){return S(o),T(t.openTargetUrlDialog())}),m(12,"spk-icon"),r(),X(),r()(),D(),r(),F(13,Pi,3,0,"p"),r(),F(14,ki,28,0)(15,Do,30,4,"ng-container",25),a(16,"div",26)(17,"button",27),C("click",function(){return S(o),T(t.goBack())}),E(18,3),m(19,"spk-icon"),D(),r(),a(20,"button",28),E(21,4),m(22,"spk-icon"),D(),r()()(),F(23,No,15,4,"spk-dialog",29)}if(e&2){let o;_("formGroup",t.destinationForm),s(6),g(t.destinationCount()>0?6:-1),s(7),g(t.destinationCount()>0?13:-1),s(),g(t.destinationCount()===0?14:-1),s(),g(!((o=t.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),s(8),g(t.targetUrlDialogOpen()?23:-1)}},dependencies:[Ee,fe,ne,Ie,xe,ie,Ce,ct,Se,Te,$e,Lt,st,re,se,dt,ut,ae,oe,we,Be,Ut,mt,Re,Ke],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}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.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-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);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{Zt as a,Jt as b,kt as c,Ht as d,ht as e,At as f,Wt as g,Fr as h,yt as i,qt as j,Ot as k,Yt as l,Pt as m,le as n};
@@ -0,0 +1 @@
1
+ import{l as a,m as b}from"./chunk-B5NBFB7O.js";import"./chunk-VU5DK3QN.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import"./chunk-ED3PEZLO.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
@@ -1,2 +1,2 @@
1
- import{a as D,t as U}from"./chunk-AUUCT7OA.js";import{a as B}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import{pa as R}from"./chunk-5ZK3D2RS.js";import{Ab as b,Bb as N,Cb as x,Db as I,E as S,Eb as o,Fb as a,Gb as u,Kb as v,Na as T,Ra as l,Sb as p,Wb as A,X as O,Xb as c,Za as d,ea as M,fa as L,fb as f,ic as _,jc as g,lb as E,mc as $,nc as k,oc as y,vb as m,vc as G,wb as P,xb as h,xc as w}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{console.log(n),this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
1
+ import{a as D,t as U}from"./chunk-ED3PEZLO.js";import{a as B}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import{pa as R}from"./chunk-5ZK3D2RS.js";import{Ab as b,Bb as N,Cb as x,Db as I,E as S,Eb as o,Fb as a,Gb as u,Kb as v,Na as T,Ra as l,Sb as p,Wb as A,X as O,Xb as c,Za as d,ea as M,fa as L,fb as f,ic as _,jc as g,lb as E,mc as $,nc as k,oc as y,vb as m,vc as G,wb as P,xb as h,xc as w}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function X(s,n){if(s&1&&(o(0,"tr")(1,"td",10)(2,"code"),u(3,"ol",11),a()()()),s&2){let e=c().$implicit,t=c();l(),P("grid-column","1 / -1")("height","auto"),l(2),m("innerHTML",t.breakIntoLines(e.Exception),T)}}function z(s,n){if(s&1){let e=v();o(0,"tr",7),A("click",function(){let i=M(e).$index,r=c();return L(r.toggleRow(i))}),o(1,"td"),_(2),G(3,"date"),a(),o(4,"td",8),_(5),a(),o(6,"td"),_(7),a(),o(8,"td")(9,"button",9)(10,"spk-icon"),_(11,"caret-down"),a()()()(),E(12,X,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,i=c();l(2),g(w(3,6,e.Timestamp,"MMM dd. hh:mm")),l(3),g(e.BackupID>=0?e.BackupID:"-"),l(2),g(e.Message),l(2),h("rotated-icon",t===i.openRowIndex()),l(3),b(t===i.openRowIndex()?12:-1)}}var F=["BackupID","Timestamp","Message","actions"],C=class s{#e=O(B);displayedColumns=d(F);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(S(()=>this.logsLoading.set(!1))).subscribe({next:n=>{console.log(n),this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
2
2
  `),t="";for(let i=0;i<e.length;i++)t+=`<li>${e[i]}</li>`;return t}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["app-logs"]],decls:15,vars:2,consts:()=>{let n;n=$localize`Timestamp`;let e;e=$localize`Backup ID`;let t;t=$localize`Message`;let i;return i=$localize`No data available`,[n,e,t,i,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol",3,"innerHTML"]]},template:function(e,t){e&1&&(o(0,"h3"),_(1,"Logs"),a(),o(2,"spk-table",4),y("dataChange",function(r){return k(t.logs,r)||(t.logs=r),r}),o(3,"tr",5)(4,"th"),p(5,0),a(),o(6,"th"),p(7,1),a(),o(8,"th"),p(9,2),a(),u(10,"th"),a(),x(11,z,13,9,null,null,N),o(13,"div",6),p(14,3),a()()),e&2&&(l(2),$("data",t.logs),m("loading",t.logsLoading()),l(9),I(t.logs()))},dependencies:[U,R,D],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{e as E}from"./chunk-WKYWPXQ6.js";import"./chunk-K7H3KYW7.js";import"./chunk-3WCWZJYH.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import{o as g,s as O}from"./chunk-AUUCT7OA.js";import"./chunk-PIDBEXSZ.js";import{H as u,L as R,Y as m,Z as T}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Eb as n,Fb as r,Gb as a,Qb as _,Ra as p,Rb as l,X as s,fb as S,sc as d,vb as F}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var k=t=>["/restore-flow",t,"select-files"],f=t=>["/restore-flow",t,"options"],c=class t{#t=s(u);#e=s(E);backupId=this.#e.backupId;ngOnInit(){this.#e.init(this.#t.snapshot.params.id)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=S({type:t,selectors:[["app-restore-flow"]],decls:9,vars:6,consts:()=>{let o;o=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let e;return e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[o,e,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(e,i){e&1&&(n(0,"spk-stepper")(1,"div",2),_(2,0),a(3,"spk-radio"),l(),r(),n(4,"div",2),_(5,1),a(6,"spk-radio"),l(),r()(),n(7,"section"),a(8,"router-outlet"),r()),e&2&&(p(),F("routerLink",d(2,k,i.backupId())),p(3),F("routerLink",d(4,f,i.backupId())))},dependencies:[O,g,R,m,T],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
1
+ import{e as E}from"./chunk-I3CYX5BU.js";import"./chunk-K7H3KYW7.js";import"./chunk-VU5DK3QN.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import{o as g,s as O}from"./chunk-ED3PEZLO.js";import"./chunk-PIDBEXSZ.js";import{H as u,L as R,Y as m,Z as T}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Eb as n,Fb as r,Gb as a,Qb as _,Ra as p,Rb as l,X as s,fb as S,sc as d,vb as F}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var k=t=>["/restore-flow",t,"select-files"],f=t=>["/restore-flow",t,"options"],c=class t{#t=s(u);#e=s(E);backupId=this.#e.backupId;ngOnInit(){this.#e.init(this.#t.snapshot.params.id)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=S({type:t,selectors:[["app-restore-flow"]],decls:9,vars:6,consts:()=>{let o;o=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let e;return e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[o,e,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(e,i){e&1&&(n(0,"spk-stepper")(1,"div",2),_(2,0),a(3,"spk-radio"),l(),r(),n(4,"div",2),_(5,1),a(6,"spk-radio"),l(),r()(),n(7,"section"),a(8,"router-outlet"),r()),e&2&&(p(),F("routerLink",d(2,k,i.backupId())),p(3),F("routerLink",d(4,f,i.backupId())))},dependencies:[O,g,R,m,T],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
@@ -0,0 +1 @@
1
+ import{$a as se,Ab as w,Bb as ae,Cb as ce,Db as pe,Eb as r,Fb as l,Gb as j,Kb as T,Kc as D,Mc as E,Nc as Z,R as Q,Ra as y,Wa as oe,Wb as _,X as F,Xb as C,Ya as N,Yb as v,Za as h,Zb as a,_a as M,ab as P,ea as d,ec as de,fa as u,fb as g,fc as V,gc as H,hb as re,hc as ue,ic as k,jc as he,kc as X,lb as x,mc as z,nc as G,oc as K,pa as U,qa as R,ra as p,rb as le,rc as J,sa as B,vb as $,wb as I,xb as L,yb as Y,zb as q}from"./chunk-MR4RE3IB.js";import{a as A,b as W,c as ne}from"./chunk-C6Q5SG76.js";var O=["*"],Se=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],_e=["[icon]","[title]","*","[content]"];function ye(n,S){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function ke(n,S){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function be(n,S){n&1&&(r(0,"spk-icon",3),k(1,"check-circle"),l())}function De(n,S){n&1&&(r(0,"spk-icon",3),k(1,"warning-octagon"),l())}function Oe(n,S){n&1&&(r(0,"spk-icon",3),k(1,"warning"),l())}function we(n,S){n&1&&(r(0,"spk-icon",3),k(1,"question"),l())}function Ee(n,S){if(n&1){let e=T();r(0,"spk-icon",7),_("click",function(){d(e);let i=C();return u(i.removeAlert())}),k(1,"plus"),l()}}var xe=["dialogRef"];function Te(n,S){if(n&1){let e=T();r(0,"div",4),_("click",function(){d(e);let i=C();return u(i.isOpen.set(!1))}),l()}}var Me=["spk-button",""],Ie=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],Ve=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],fe=["triggerRef"],Ae=["popoverRef"],Fe=[[["","trigger",""]],"*"],Re=["[trigger]","*"];var Pe=["inputWrap"];var je=()=>({closeOnButton:!1,closeOnEsc:!0});var He=["option"],Be=["*",[["","menu",""]]],Le=["*","[menu]"];var We=["optionsRef"],qe=["formFieldWrapper"],Qe=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Ue=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"],Ne=()=>({closeOnButton:!1,closeOnEsc:!1});function $e(n,S){if(n&1){let e=T();r(0,"spk-chip",12),_("click",function(i){let o=d(e).$implicit,s=C(3);return u(s.toggleOption(o,i))}),k(1),r(2,"spk-icon"),k(3,"x-circle"),l()()}if(n&2){let e,t=S.$implicit,i=C(3);q(i.chipClass()),y(),X(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function Ye(n,S){if(n&1&&ce(0,$e,4,3,"spk-chip",11,ae),n&2){let e=C(2);pe(e.inputValue().split(","))}}function Xe(n,S){if(n&1&&(r(0,"div",6),x(1,Ye,2,0),l()),n&2){let e=C();y(),w(e.inputValue().length>0?1:-1)}}function ze(n,S){if(n&1&&(r(0,"div",6),k(1),l()),n&2){let e=C();y(),he(e._displayValue())}}function Ge(n,S){if(n&1){let e=T();r(0,"div",13),_("click",function(i){d(e);let o=C();return u(o.deselect(i))}),a(1,3),r(2,"spk-icon",14),k(3,"x-circle"),l()()}}function Ke(n,S){n&1&&(r(0,"div",8),a(1,4),r(2,"spk-icon",14),k(3,"magnifying-glass"),l()())}function Je(n,S){if(n&1&&(r(0,"div",15),a(1,5),r(2,"spk-icon",14),k(3,"caret-down"),l()()),n&2){let e=C();L("open",e.isOpen())}}var Ze=["dragImageElement"],et=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],tt=["[sidenav]","[sidenav-closed-topbar]","*"];function it(n,S){n&1&&j(0,"div",1,0)}function nt(n,S){if(n&1){let e=T();r(0,"div",7),_("drop",function(i){d(e);let o=C();return u(o.drop(i))})("dragover",function(i){d(e);let o=C();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=C();return u(i.dragEnter())})("dragleave",function(){d(e);let i=C();return u(i.dragLeave())}),l()}}function ot(n,S){if(n&1){let e=T();r(0,"div",8),_("dragstart",function(i){d(e);let o=C();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=C();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=C();return u(o.drag(i))})("touchstart",function(i){d(e);let o=C();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=C();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=C();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=C();return u(o.touchCancel(i))}),l()}}var st=[[["","table-header",""]],"*",[["","table-no-rows",""]]],rt=["[table-header]","*","[table-no-rows]"];function lt(n,S){n&1&&j(0,"spk-progress-bar",0)}function at(n,S){n&1&&(r(0,"div",1),a(1,2),l())}var ct=["tooltipRef"],ee=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-icon"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Rt=(()=>{class n{constructor(){this._el=F(B),this.alertService=p(null),this.type=p("error"),this.id=p(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-alert"]],hostVars:2,hostBindings:function(t,i){t&2&&q(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},ngContentSelectors:_e,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(t,i){if(t&1&&(v(Se),r(0,"div",1)(1,"div",2,0),a(3),l(),r(4,"div",2),x(5,ye,2,0,"spk-icon",3)(6,ke,2,0,"spk-icon",3)(7,be,2,0,"spk-icon",3)(8,De,2,0,"spk-icon",3)(9,Oe,2,0,"spk-icon",3)(10,we,2,0,"spk-icon",3),l(),r(11,"div",4),a(12,1),a(13,2),l(),x(14,Ee,2,0,"spk-icon",5),r(15,"div",6),a(16,3),l()()),t&2){let o,s=ue(2);y(),I("display",s.children.length?"block":"none"),y(4),w((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),y(9),w(i.id()?14:-1)}},dependencies:[ee],encapsulation:2,changeDetection:0})}}return n})();function te(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Pt=(()=>{class n{constructor(){this.alertHistory=h([]),this.alertHistoryIsOpen=h(!1),this.alertHistoryIsHidden=h(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warning",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=te();this.alertHistory.update(i=>[W(A({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>W(A({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>W(A({},i),{animateOut:i.id===e?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(i=>i.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(i=>W(A({},i),{isOpen:i.id===e?!1:i.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),pt={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},dt=(()=>{class n{constructor(){this.dialogRef=M("dialogRef"),this.isOpen=P(!1),this.options=p(),this.closed=R(),this.defaultOptionMerge=D(()=>A(A({},pt),this.options())),this.abortController=null,this.isOpenEffect=E(()=>{let e=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e?.showModal(),e?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),e?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-dialog"]],viewQuery:function(t,i){t&1&&V(i.dialogRef,xe,5),t&2&&H()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:O,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(v(),r(0,"dialog",1,0)(2,"div",2),a(3),l(),x(4,Te,1,0,"div",3),l()),t&2){let o,s,c,f;I("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(c=i.defaultOptionMerge().maxHeight)!==null&&c!==void 0?c:"")("height",(f=i.defaultOptionMerge().height)!==null&&f!==void 0?f:""),y(4),w(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),jt=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#t=F(le),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#t;open(e,t){let i=this.#t.injector,o=this.#l(),ie=t||{},{data:s,closed:c}=ie,f=ne(ie,["data","closed"]);this.compRef&&this.#r(),this.insertedCompRef=Z(e,{environmentInjector:i}),this.compRef=Z(dt,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let b=this.insertedCompRef.instance?.data,m=this.insertedCompRef.instance?.closed;if(s){if(N(b))this.insertedCompRef.setInput("data",s);else if(!N(b))throw new Error("data is not an input signal on the passed component")}m instanceof U&&(this.closedFieldSub=m.subscribe((...Ce)=>{c?.(...Ce),this.#r()})),this.#t.attachView(this.insertedCompRef.hostView),this.#t.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",f),this.compRef.instance.closed.subscribe(()=>ve());let ge=this;function ve(){m&&m instanceof U?m.emit(!1):c?.(void 0),ge.#r()}return this.insertedCompRef.instance}#l(){let e=document.createElement("spk-dialog-ref");return e.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(e),document.getElementById("spk-dialog-ref")}#r(){this.insertedCompRef&&(this.#t.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#t.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#r()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Ht=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-button-group"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),ut=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["","spk-button",""]],attrs:Me,ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Bt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-card"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Lt=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-checkbox"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:O,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(v(),r(0,"div",0)(1,"spk-icon",1),k(2,"check"),l(),r(3,"spk-icon",2),k(4,"minus"),l()(),a(5))},dependencies:[ee],encapsulation:2,changeDetection:0})}}return n})(),ht=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-chip"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),ft=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let c=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},f=function(){window.setTimeout(c,0)};var i=c,o=f;let s=this.#e.nativeElement.querySelector("textarea");s.addEventListener("change",c),s.addEventListener("cut",f),s.addEventListener("paste",f),s.addEventListener("drop",f),s.addEventListener("keydown",f),s.focus(),s.select(),c()}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-form-field"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:Ve,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(t,i){t&1&&(v(Ie),a(0),r(1,"div",0)(2,"div",1),a(3,1),a(4,2),l(),j(5,"div",2),a(6,3),a(7,4),a(8,5),j(9,"div",3),a(10,6),l(),r(11,"div",4)(12,"div",5),a(13,7),l(),r(14,"div",6),a(15,8),l()())},encapsulation:2,changeDetection:0})}}return n})(),mt={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},me=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=P(!1),this.options=p(),this.closed=R(),this.defaultOptionMerge=D(()=>A(A({},mt),this.options())),this.triggerRef=M.required("triggerRef"),this.popoverRef=M.required("popoverRef"),this.id=h("--"+te()),this.menuStyle=h(null),this.openAbort=null,this.isCalculatingPosition=D(()=>{let e=this.popoverRef()?.nativeElement;return this.isOpen()?(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,e?.showPopover(),document.addEventListener("keydown",i=>{i.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&i.preventDefault(),i.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{capture:!0,signal:this.abortController?.signal}),!0):(e.hidePopover(),this.abortController?.abort(),this.openAbort?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}#t(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,b=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(b),this._right.set(f);else{if(this.above()){let m=e.top-t.height-this.#e;m>=0&&(c=m)}else b&&(c=e.top-t.height-this.#e);if(this.right()){let m=e.right-t.width;m>=0&&(s=m)}else f&&(c=b?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-popover"]],viewQuery:function(t,i){t&1&&(V(i.triggerRef,fe,5),V(i.popoverRef,Ae,5)),t&2&&H(2)},hostVars:4,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Re,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(t,i){if(t&1){let o=T();v(Fe),r(0,"div",2,0),_("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),a(3),l(),r(4,"button",4),k(5,"Open popover"),l()(),r(6,"div",5,1)(8,"div",6),_("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),l(),a(9,1),l()}t&2&&(I("anchor-name",i.id()),y(6),Y(i.menuStyle()),I("position-anchor",i.id()))},dependencies:[ut],encapsulation:2,changeDetection:0})}}return n})();var Wt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-list"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),qt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=P(!1),this.closed=R(),this.activeOptionIndex=h(-1),this.options=se("option"),this.optionsEl=D(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=E(()=>{if(!this.isOpen())return;let e=this.activeOptionIndex(),t=this.optionsEl();if(e>-1)for(let i=0;i<t.length;i++){if(i===e){t[i].scrollIntoView({block:"center"}),t[i].classList.add("active");continue}t[i].classList.remove("active")}})}onKeyDown(e){if(!this.isOpen())return;e.preventDefault();let t=this.optionsEl(),i=this.activeOptionIndex();e.key==="ArrowDown"?i===-1||i===t.length-1?this.activeOptionIndex.set(0):this.activeOptionIndex.set(i+1):e.key==="ArrowUp"?i===-1||i===0?this.activeOptionIndex.set(t.length-1):this.activeOptionIndex.set(i-1):e.key==="Enter"?i>-1&&(t[i].click(),setTimeout(()=>this.close("active"))):e.key==="Tab"?this.close("closed"):this.activeOptionIndex.set(-1)}close(e="closed",t){(!this.keepClickedOptionActive()||e==="closed")&&this.#e(),this.isOpen.set(!1),this.closed.emit(e==="active")}#e(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-menu"]],contentQueries:function(t,i,o){t&1&&de(o,i.options,He,4),t&2&&H()},hostBindings:function(t,i){t&1&&_("keydown",function(s){return i.onKeyDown(s)})},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Le,decls:6,vars:6,consts:[["formFieldWrapper",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"options",3,"click"]],template:function(t,i){if(t&1){let o=T();v(Be),r(0,"spk-popover",1,0),K("isOpenChange",function(c){return d(o),G(i.isOpen,c)||(i.isOpen=c),u(c)}),_("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),_("click",function(){return d(o),u(i.isOpen.set(!0))}),a(3),l(),r(4,"div",3),_("click",function(){return d(o),u(i.close("active"))}),a(5,1),l()()}t&2&&(z("isOpen",i.isOpen),$("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",J(5,je)))},dependencies:[me],encapsulation:2,changeDetection:0})}}return n})(),gt=(()=>{class n{constructor(){this.value=p(void 0)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&j(0,"div",0),t&2&&I("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-radio"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:O,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(v(),j(0,"div",0),a(1))},encapsulation:2,changeDetection:0})}}return n})();var Ut=(()=>{class n{constructor(){this.value=p(null)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),vt=["primary","accent","tertiary","warn","success"],Nt=(()=>{class n{constructor(){this.#e=F(oe),this.#t=F(B),this.#l=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(let t of e)if(t.type==="childList"&&t.target instanceof HTMLElement){let i=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let o=0;o<i.length;o++){let s=i[o];(s.nodeName==="OPTION"||s.nodeName==="SPK-OPTION")&&this.#s.set(!this.#s())}}}),this.optionsRef=M("optionsRef"),this.formFieldWrapperRef=M.required("formFieldWrapper"),this.inputWrapRef=M.required("inputWrap"),this.inputValue=P(""),this.readonly=p(!1),this.isFreeText=p(!1),this.selectMultiple=p(!1),this.hideClearButton=p(!1),this.displayValue=p(""),this.displayFn=p(e=>`${e}`),this.above=p(!1),this.right=p(!1),this.change=R(),this.#r=h(!1),this.#s=h(!1),this.#i=h(null),this.#a=h(null),this.#c=h(!1),this.#n=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.#h=E(()=>{this._isOpen.set(this.isOpen()&&this.#o().length>0)}),this.isSearchInput=D(()=>this.#i()?.type==="search"),this.optionsEl=D(()=>this.optionsRef()?.nativeElement),this.#o=D(()=>{this.#s();let e=this.optionsRef()?.nativeElement.querySelectorAll("option"),t=this.optionsRef()?.nativeElement.querySelectorAll("spk-option");return e?.length?Array.from(e):t?.length?Array.from(t):[]}),this.chipClass=D(()=>Array.from(this.#t.nativeElement.classList).filter(e=>vt.includes(e)).join(" ")),this._displayValue=D(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=D(()=>this.#a()?this.#o().find(e=>(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))===this.#a()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#f=E(()=>{this.#r();let e=this.#t.nativeElement.querySelector("input");e&&(this.#y(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#d()}),this.#i.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))}),this.#m=E(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#i();e&&e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#n()===null||this.#n()<0||this.#n()===this.#o().length-1?this.#n.set(this.#u()):this.#n.set(this.#n()+1):t.key==="ArrowUp"?this.#n()===null||this.#n()<0||this.#n()===0?this.#n.set(this.#o().length-1):this.#n.set(this.#n()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#n()>-1&&this.selected(this.getOptionElement(this.#n()))):t.key==="Tab"?this.close(!0):(this.#n.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal})}),this.#g=E(()=>{this.isOpen()&&this.#_()}),this.#v=E(()=>{let e=this.inputValue();this.#i()&&(this.#i().value=e??"",this.#i().dispatchEvent(new Event("input")))}),this.#p=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#r.set(!this.#r())})}#e;#t;#l;#r;#s;#i;#a;#c;#n;#h;#o;#f;#m;#g;#v;ngOnInit(){typeof MutationObserver<"u"&&this.#p.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.#o()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#i()&&(this.#i().value="",this.#i().dispatchEvent(new Event("input"))),this.#n.set(this.#u()),this.#c.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#i()?.blur())}selected(e){if(!e)return;let t=(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))??"",i=this.#o().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#n.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.#o().length;o++){let s=this.#o()[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-value"))===t?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}}else e&&this.selectMultiple()&&(this.inputValue().includes(t)?(this.#e.removeAttribute(e,"selected"),this.toggleOption(t)):(this.#e.setAttribute(e,"selected","selected"),this.inputValue.set(this.inputValue().length?`${this.inputValue()},${t}`:t)));this.#c.set(!1),this.#a.set(null),this.selectMultiple()?this.#i()?.focus():(this.isOpen.set(!1),this.#i()?.blur()),this.change.emit(this.inputValue())}calculateSelectedOptions(){setTimeout(()=>{let e=this.#o(),i=this.#i()?.value;for(let o=0;o<e.length;o++){let s=e[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-value"))===i?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}})}toggleOption(e,t){t&&(t.preventDefault(),t.stopPropagation()),this.inputValue.set(this.inputValue().startsWith(e+",")?this.inputValue().replace(e+",",""):this.inputValue().includes(","+e)?this.inputValue().replace(","+e,""):this.inputValue().replace(e,""))}close(e=!1){this.#s.set(!this.#s());let t=this.#a();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#c.set(!1),e||this.#i()?.blur(),typeof MutationObserver<"u"&&this.#l.disconnect(),this.#S()}open(e){e.preventDefault(),!this.isOpen()&&(typeof MutationObserver<"u"&&this.#l.observe(this.optionsEl(),{childList:!0,subtree:!0}),this.isSearchInput()&&!this.#c()&&!this.isFreeText()?(this.#a.set(this.inputValue()),this.inputValue.set(""),this.#i().focus(),this.#i().value="",this.#i().dispatchEvent(new Event("input")),this.#n.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#i().focus(),this.#s.set(!this.#s()),this.isOpen.set(!0),this.#c.set(!0),this.#C(),this.#d())}#C(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsEl()?.addEventListener("click",e=>{if(!e.target)return;this.#s.set(!this.#s());let t=e.target.closest("option"),i=e.target.closest("spk-option"),o=t||i;this.#o().indexOf(o)>-1&&this.selected(o)},{signal:this.clickController?.signal})}#S(){this.clickController&&this.clickController.abort()}#_(){for(let e=0;e<this.#o().length;e++){let t=this.#o()[e];this.#e.removeClass(t,"focused"),this.#n()===e&&(this.#e.addClass(t,"focused"),t.scrollIntoView({block:"center"}))}}#d(){let e=this.#i();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.#o();for(let o=0;o<i.length;o++){let s=i[o].getAttribute("ng-reflect-value");s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#u(){let e=this.#o();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#p;#y(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(o),t}}),e}ngOnDestroy(){this.clickController&&this.clickController.abort(),this.inputController&&this.inputController.abort(),this.optionsOpenController&&this.optionsOpenController.abort(),typeof MutationObserver<"u"&&(this.#p.disconnect(),this.#l.disconnect())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-select"]],viewQuery:function(t,i){t&1&&(V(i.optionsRef,We,5),V(i.formFieldWrapperRef,qe,5),V(i.inputWrapRef,Pe,5)),t&2&&H(3)},inputs:{inputValue:[1,"inputValue"],readonly:[1,"readonly"],isFreeText:[1,"isFreeText"],selectMultiple:[1,"selectMultiple"],hideClearButton:[1,"hideClearButton"],displayValue:[1,"displayValue"],displayFn:[1,"displayFn"],above:[1,"above"],right:[1,"right"]},outputs:{inputValue:"inputValueChange",change:"change"},ngContentSelectors:Ue,decls:15,vars:8,consts:[["formFieldWrapper",""],["inputWrap",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"display-value"],["suffix","",1,"deselect-indicator"],["suffix","",1,"search-indicator"],["suffix","",1,"select-open-indicator",3,"open"],[1,"sparkle-options"],[1,"small","simple",3,"class"],[1,"small","simple",3,"click"],["suffix","",1,"deselect-indicator",3,"click"],[1,"default-indicator"],["suffix","",1,"select-open-indicator"]],template:function(t,i){if(t&1){let o=T();v(Qe),r(0,"spk-popover",3,0),K("isOpenChange",function(c){return d(o),G(i.isOpen,c)||(i.isOpen=c),u(c)}),_("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),_("click",function(c){return d(o),u(i.open(c))}),a(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),x(6,Xe,2,1,"div",6)(7,ze,2,1,"div",6),a(8,1),l(),x(9,Ge,4,0,"div",7)(10,Ke,4,0,"div",8)(11,Je,4,2,"div",9),l(),r(12,"div",10,2),a(14,2),l()()}t&2&&(z("isOpen",i.isOpen),$("disableOpenByClick",!0)("options",J(7,Ne)),y(2),q(i.readonly()?"readonly":""),y(4),w(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),y(3),w((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[ft,ee,ht,me],encapsulation:2,changeDetection:0})}}return n})(),$t=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=P(!1),this.type=p(""),this.dragImageElement=M.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=D(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=D(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=E(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(e){e.stopPropagation(),this.#e(e.clientX)}#e(e){this.isDragging.set(!1),e<=0?this.isOpen.set(!1):e>this.openWidthTreshold?this.isOpen.set(!0):e<this.openWidthTreshold&&(!this.isOpen()&&e<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(e){(e.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(e){e.preventDefault(),this.#t(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#t(e)}#t(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#t(e)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0)}touchMove(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.touches[0].clientX)})}touchEnd(e){e.stopPropagation(),this.#e(e.changedTouches[0].clientX)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-sidenav"]],viewQuery:function(t,i){t&1&&V(i.dragImageElement,Ze,5),t&2&&H()},hostVars:10,hostBindings:function(t,i){t&2&&L("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:tt,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(t,i){t&1&&(v(et),x(0,it,2,0,"div",1)(1,nt,1,0,"div",2),r(2,"div",3),a(3),l(),r(4,"div",4),x(5,ot,1,0,"div",5),r(6,"div",6),a(7,1),l(),r(8,"main"),a(9,2),l()()),t&2&&(w(i.type()==="overlay"?0:-1),y(),w(i.type()==="overlay"&&i.isDragging()?1:-1),y(3),I("transform",i.draggingStyle()),y(),w(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var Yt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-stepper"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var Xt=(()=>{class n{constructor(){this.tableColumns=p([]),this.loading=p(!1),this.columnSizes=D(()=>this.tableColumns().reduce((e,t,i)=>i===this.tableColumns().length-1?`${e} max-content`:`${e} 1fr`,"")),this.data=p([]),this.dataChange=R(),this.#e=null,this.#t=h(!1),this.sortByColumn=P(null),this.e=E(()=>{let e=this.sortByColumn();if(e===null)return this.#t()||(this.#e=this.data(),this.#t.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let t=e.startsWith("-")?e.slice(1):e,i=e.startsWith("-"),o=this.data().sort((s,c)=>{let f=s[t],b=c[t],m=0;return typeof f=="number"&&typeof b=="number"&&(m=f-b),f instanceof Date&&b instanceof Date&&(m=f.getTime()-b.getTime()),typeof f=="string"&&typeof b=="string"&&(m=f.localeCompare(b,void 0,{sensitivity:"base"})),i?-m:m});this.dataChange.emit(o)})}#e;#t;toggleSort(e){let t=this.sortByColumn(),i=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-table"]],hostVars:2,hostBindings:function(t,i){t&2&&I("grid-template-columns",i.columnSizes())},inputs:{tableColumns:[1,"tableColumns"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:rt,decls:6,vars:2,consts:[[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,i){t&1&&(v(st),r(0,"thead"),a(1),x(2,lt,1,0,"spk-progress-bar",0),l(),r(3,"tbody"),a(4,1),l(),x(5,at,2,0,"div",1)),t&2&&(y(2),w(i.loading()?2:-1),y(3),w(i.loading()?-1:5))},dependencies:[gt],encapsulation:2,changeDetection:0})}}return n})(),zt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-tabs"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var Gt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-toggle"]],ngContentSelectors:O,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(v(),r(0,"div",0),j(1,"div",1),l(),a(2))},encapsulation:2,changeDetection:0})}}return n})(),Kt=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=p(!1),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.message=p.required(),this.isOpen=P(!1),this.closed=R(),this.triggerRef=M.required("triggerRef"),this.tooltipRef=M.required("tooltipRef"),this.id=h("--"+te()),this.menuStyle=h(null),this.isCalculatingPosition=D(()=>{let e=this.tooltipRef()?.nativeElement;return this.isOpen()?(e?.showPopover(),!0):(e.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#t(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;#t(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,b=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(b),this._right.set(f);else{if(this.above()){let m=e.top-t.height-this.#e;m>=0&&(c=m)}else b&&(c=e.top-t.height-this.#e);if(this.right()){let m=e.right-t.width;m>=0&&(s=m)}else f&&(c=b?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-tooltip"]],viewQuery:function(t,i){t&1&&(V(i.triggerRef,fe,5),V(i.tooltipRef,ct,5)),t&2&&H(2)},hostVars:6,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:O,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=T();v(),r(0,"div",2,0),_("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),a(2),l(),r(3,"div",3,1),k(5),l()}t&2&&(I("anchor-name",i.id()),y(3),Y(i.menuStyle()),I("position-anchor",i.id()),y(2),X(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})(),Jt=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=R()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=re({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&_("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&L("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ee as a,Rt as b,Pt as c,dt as d,jt as e,Ht as f,ut as g,Bt as h,Lt as i,ht as j,ft as k,Wt as l,qt as m,gt as n,Qt as o,Ut as p,Nt as q,$t as r,Yt as s,Xt as t,zt as u,Gt as v,Kt as w,Jt as x};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c}from"./chunk-B5NBFB7O.js";import"./chunk-VU5DK3QN.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import"./chunk-ED3PEZLO.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{b as createAdvancedOption,a as createOptionsForm,c as default};