@duplicati/ngclient 0.0.91 → 0.0.92

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 (88) hide show
  1. package/{chunk-26LLZBVS.js → chunk-25IC7WV6.js} +1 -1
  2. package/{chunk-OXZWBTVI.js → chunk-2HS3CYRN.js} +1 -1
  3. package/chunk-4IJQ7AAQ.js +1 -0
  4. package/{chunk-LPLSYMNB.js → chunk-56KHHHDE.js} +1 -1
  5. package/{chunk-6F4OBQBG.js → chunk-5K5OVVFG.js} +1 -1
  6. package/{chunk-IWMMFNSQ.js → chunk-72574KO2.js} +1 -1
  7. package/{chunk-EMAOG2GJ.js → chunk-AIOUSVMR.js} +1 -1
  8. package/chunk-ALVXVMTO.js +1 -0
  9. package/chunk-BRBZMNCZ.js +1 -0
  10. package/chunk-BTUWHZ4Y.js +1 -0
  11. package/{chunk-2MAHQYCM.js → chunk-CK5N2PPF.js} +1 -1
  12. package/{chunk-DXNCMAOT.js → chunk-CRREGVJC.js} +1 -1
  13. package/{chunk-HMXWO2I6.js → chunk-D5FLTSFX.js} +1 -1
  14. package/chunk-DTPZU6NP.js +7 -0
  15. package/chunk-FQCR6FN2.js +1 -0
  16. package/{chunk-JFCXB676.js → chunk-FQFWBJUG.js} +1 -1
  17. package/{chunk-PBOQC224.js → chunk-G7PFETH3.js} +1 -1
  18. package/chunk-GBNJJFEH.js +1 -0
  19. package/{chunk-3NUWESLC.js → chunk-GEEPH37P.js} +1 -1
  20. package/chunk-GFSY2TNF.js +1 -0
  21. package/chunk-H5K6VMSB.js +1 -0
  22. package/{chunk-NZKQ6LJU.js → chunk-H5MRRHWD.js} +1 -1
  23. package/{chunk-4P5T2IWL.js → chunk-HDHK74DC.js} +1 -1
  24. package/chunk-HSX4KVKU.js +1 -0
  25. package/{chunk-CN7UNEKW.js → chunk-HYROAHLG.js} +1 -1
  26. package/chunk-IYKSYF2U.js +1 -0
  27. package/{chunk-D72NDSPE.js → chunk-K5CDXUNJ.js} +1 -1
  28. package/{chunk-F7TB6D2I.js → chunk-KLIPTMVG.js} +1 -1
  29. package/chunk-KSYIZI2Y.js +6 -0
  30. package/{chunk-6U5GJZOT.js → chunk-L2RC357S.js} +1 -1
  31. package/{chunk-2M6FJFB6.js → chunk-LTLQ72IT.js} +1 -1
  32. package/{chunk-C4YENYVT.js → chunk-LZVTWC4S.js} +1 -1
  33. package/{chunk-YZZJK6RY.js → chunk-M65ENIIN.js} +1 -1
  34. package/chunk-N5K6ODRA.js +1 -0
  35. package/{chunk-Z4NXKIA6.js → chunk-NWWH6FOD.js} +1 -1
  36. package/{chunk-EOR3XP2C.js → chunk-OB2RR7QV.js} +1 -1
  37. package/{chunk-EEWVYRVF.js → chunk-OQEGPSC6.js} +1 -1
  38. package/{chunk-2NG6SV5P.js → chunk-PB47CMLR.js} +1 -1
  39. package/{chunk-3CWO2EV5.js → chunk-QSTOMEKL.js} +1 -1
  40. package/chunk-QUDKB5S3.js +1 -0
  41. package/chunk-RBRHRXAU.js +2 -0
  42. package/chunk-S2HUIFXX.js +1 -0
  43. package/chunk-S75BU6NQ.js +1 -0
  44. package/chunk-SRIKTKDW.js +1 -0
  45. package/{chunk-VC6R3EOF.js → chunk-SSKK33BY.js} +1 -1
  46. package/{chunk-HRMKDPOR.js → chunk-SXG7ELTX.js} +1 -1
  47. package/chunk-T4C5WIW2.js +1 -0
  48. package/{chunk-VLSYAFUD.js → chunk-T7OI3WCX.js} +1 -1
  49. package/{chunk-IVVTGUD5.js → chunk-TDMCIOHL.js} +1 -1
  50. package/{chunk-W5OXRGDR.js → chunk-TGSA7TZP.js} +1 -1
  51. package/{chunk-CKZXQWC5.js → chunk-THUAAYGA.js} +1 -1
  52. package/{chunk-D3OXH7DI.js → chunk-UDBZI5KJ.js} +1 -1
  53. package/{chunk-SGHSOU7H.js → chunk-UFLMIMYM.js} +1 -1
  54. package/chunk-UNTTIERD.js +1 -0
  55. package/{chunk-KB62MNQB.js → chunk-UQH5ZQG7.js} +1 -1
  56. package/{chunk-BE77QZG7.js → chunk-V5GVLIPJ.js} +2 -2
  57. package/{chunk-RBEE6F5X.js → chunk-VQ73M67Z.js} +1 -1
  58. package/{chunk-XBBAIEMP.js → chunk-W6H5Q4WY.js} +1 -1
  59. package/{chunk-Z3ALFDJZ.js → chunk-WTDHHP4P.js} +1 -1
  60. package/{chunk-B27FY76R.js → chunk-WZG34QS3.js} +1 -1
  61. package/{chunk-T7ELKIG2.js → chunk-YTANHV3N.js} +1 -1
  62. package/{chunk-22L4HUH2.js → chunk-YTTGU3HX.js} +1 -1
  63. package/{chunk-ZKQDPG6E.js → chunk-ZR2DCXJI.js} +1 -1
  64. package/index.html +2 -2
  65. package/{main-5NXOH73T.js → main-A6WCVNIG.js} +1 -1
  66. package/package.json +1 -1
  67. package/styles-PH7LRMW2.css +1 -0
  68. package/chunk-25A34CYL.js +0 -1
  69. package/chunk-4KZHTKCL.js +0 -1
  70. package/chunk-4PFQQN3O.js +0 -1
  71. package/chunk-5ONOZUNN.js +0 -7
  72. package/chunk-5Q53HYKJ.js +0 -1
  73. package/chunk-6OZGFFIP.js +0 -1
  74. package/chunk-75HPCEOB.js +0 -1
  75. package/chunk-C7Y6Y3WG.js +0 -6
  76. package/chunk-FN6RH4GQ.js +0 -1
  77. package/chunk-I56L7YBT.js +0 -1
  78. package/chunk-JD2VZ7AT.js +0 -1
  79. package/chunk-KYG6FTJ2.js +0 -1
  80. package/chunk-LMY6LL5X.js +0 -1
  81. package/chunk-LZVNJE27.js +0 -1
  82. package/chunk-MJGXEFQX.js +0 -1
  83. package/chunk-NKKQQ2IJ.js +0 -1
  84. package/chunk-NVYCQ7OZ.js +0 -1
  85. package/chunk-NXZI7EZX.js +0 -1
  86. package/chunk-OHOVQQRF.js +0 -1
  87. package/chunk-Q2S4M24F.js +0 -2
  88. package/styles-NSI7VPDK.css +0 -1
@@ -0,0 +1 @@
1
+ import{ia as Fe}from"./chunk-2HS3CYRN.js";import{Ab as a,Bb as l,Cb as j,Ec as Ve,Fb as ee,Gb as B,Lc as I,Mc as R,Oc as Ce,Qa as g,R as oe,Sa as ce,Sb as b,Tb as f,Ub as x,Vb as h,X as H,Xa as q,Ya as Te,Za as Ee,_a as A,a as Oe,aa as be,bc as he,ca as _,cc as $,da as C,db as D,dc as Q,ec as Re,fb as Me,fc as y,ha as se,hc as G,ia as re,ib as O,ic as ie,kc as fe,lc as me,mc as ge,na as ae,nb as Ie,nc as ve,oa as Y,oc as K,pa as m,pc as W,qa as P,ra as le,rb as X,rc as _e,sa as S,sb as U,sc as ne,tb as V,ub as J,vb as te,wb as M,xb as pe,yb as de,zb as ue}from"./chunk-DTPZU6NP.js";import{a as N,b as Z,c as we}from"./chunk-C6Q5SG76.js";var L=["*"],ze=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],qe=["[icon]","[title]","*","[content]"];function Ue(n,d){n&1&&(a(0,"spk-icon",3),y(1,"info"),l())}function $e(n,d){n&1&&(a(0,"spk-icon",3),y(1,"info"),l())}function Qe(n,d){n&1&&(a(0,"spk-icon",3),y(1,"warning"),l())}function Ne(n,d){n&1&&(a(0,"spk-icon",3),y(1,"warning-octagon"),l())}function Ye(n,d){n&1&&(a(0,"spk-icon",3),y(1,"check-circle"),l())}function Xe(n,d){n&1&&(a(0,"spk-icon",3),y(1,"question"),l())}function Ge(n,d){if(n&1){let t=B();a(0,"spk-icon",7),b("click",function(){_(t);let i=f();return C(i.removeAlert())}),y(1,"plus"),l()}}var Ke=["dialogRef"];function Je(n,d){if(n&1){let t=B();a(0,"div",4),b("click",function(){_(t);let i=f();return C(i.isOpen.set(!1))}),l()}}var Ze=["spk-button",""];var Pe=["triggerRef"],et=["popoverRef"],tt=[[["","trigger",""]],"*"],it=["[trigger]","*"];var nt=()=>({closeOnButton:!1,closeOnEsc:!0});var ot=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],st=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"];var rt=["option"],at=["input"],lt=["*",[["","menu",""]]],ct=["*","[menu]"],pt=[[["label"]],"*"],dt=["label","*"],ut=["optionsWrap"],ht=[[["label"]],[["input"]],[["textarea"]]],ft=["label","input","textarea"],mt=()=>({closeOnButton:!1,closeOnEsc:!1}),ke=n=>({$implicit:n});function gt(n,d){if(n&1&&y(0),n&2){let t=f();G(" ",t.inputValue()," ")}}function vt(n,d){n&1&&ee(0)}function _t(n,d){if(n&1&&O(0,vt,1,0,"ng-container",13),n&2){let t=f(3).$implicit;f(2);let e=W(6);X("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(2,ke,t))}}function Ct(n,d){if(n&1&&y(0),n&2){let t=f(3).$implicit,e=f(2);G(" ",e.getLabel(t)," ")}}function St(n,d){if(n&1){let t=B();a(0,"spk-chip",11),O(1,_t,1,4,"ng-container")(2,Ct,1,1),a(3,"spk-icon",12),b("click",function(i){_(t);let o=f(2).$index,s=f(2);return C(s.removeSelectedOptionByIndex(i,o))}),y(4,"x-bold"),l()()}if(n&2){let t=f(4),e=W(6);te(t.selectClasses()),g(),M(e?1:2)}}function kt(n,d){n&1&&ee(0)}function yt(n,d){if(n&1&&O(0,kt,1,0,"ng-container",13),n&2){let t=f(4).$implicit;f(2);let e=W(6);X("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(2,ke,t))}}function Dt(n,d){if(n&1&&y(0),n&2){let t=f(4).$implicit,e=f(2);G(" ",e.getLabel(t)," ")}}function xt(n,d){if(n&1&&O(0,yt,1,4,"ng-container")(1,Dt,1,1),n&2){f(5);let t=W(6);M(t?0:1)}}function wt(n,d){if(n&1&&O(0,xt,2,1),n&2){f(4);let t=W(9);M(t?-1:0)}}function Ot(n,d){if(n&1&&O(0,St,5,3,"spk-chip",10)(1,wt,1,1),n&2){f(3);let t=W(8);M(t?0:1)}}function bt(n,d){if(n&1&&O(0,Ot,2,1),n&2){let t=d.$implicit;M(t?0:-1)}}function Tt(n,d){if(n&1&&de(0,bt,1,1,null,null,pe),n&2){f();let t=W(4);ue(t)}}function Et(n,d){n&1&&ee(0)}function Mt(n,d){if(n&1&&O(0,Et,1,0,"ng-container",14),n&2){f(2);let t=W(0);X("ngTemplateOutlet",t)}}function It(n,d){if(n&1&&y(0),n&2){let t,e=f(2);G(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function Rt(n,d){if(n&1&&O(0,Mt,1,1,"ng-container")(1,It,1,1),n&2){f();let t=W(0);M(t?0:1)}}function Vt(n,d){n&1&&(a(0,"spk-icon",6),y(1,"caret-down"),l())}function Ft(n,d){n&1&&j(0,"spk-spinner",7)}function Pt(n,d){n&1&&(a(0,"spk-icon",6),y(1,"list-magnifying-glass"),l())}function At(n,d){n&1&&(a(0,"spk-icon",6),y(1,"magnifying-glass"),l())}function Lt(n,d){if(n&1){let t=B();a(0,"spk-icon",15),b("click",function(i){_(t);let o=f();return C(o.clear(i))}),y(1,"x-bold"),l()}}function Ht(n,d){n&1&&(a(0,"spk-icon",6),y(1,"caret-down"),l())}function jt(n,d){n&1&&(a(0,"spk-icon",6),y(1,"caret-up"),l())}function Bt(n,d){if(n&1&&j(0,"spk-checkbox"),n&2){let t=f().$index,e=f();te(e.selectClasses()),V("active",e.isSelected(t))}}function Wt(n,d){n&1&&ee(0)}function zt(n,d){if(n&1&&O(0,Wt,1,0,"ng-container",13),n&2){let t=f().$implicit;f();let e=W(7);X("ngTemplateOutlet",e)("ngTemplateOutletContext",ne(2,ke,t))}}function qt(n,d){if(n&1&&y(0),n&2){let t=f().$implicit,e=f();G(" ",e.getLabel(t)," ")}}function Ut(n,d){if(n&1){let t=B();a(0,"li",16),b("click",function(){let i=_(t).$index,o=f();return C(o.toggleOptionByIndex(i))}),O(1,Bt,1,4,"spk-checkbox",17)(2,zt,1,4,"ng-container")(3,qt,1,1),l()}if(n&2){let t=d.$index,e=f(),i=W(7);V("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),g(),M(e.selectMultiple()?1:-1),g(),M(i?2:3)}}var $t=["dragImageElement"],Qt=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Nt=["[sidenav]","[sidenav-closed-topbar]","*"];function Yt(n,d){n&1&&j(0,"div",1,0)}function Xt(n,d){if(n&1){let t=B();a(0,"div",7),b("drop",function(i){_(t);let o=f();return C(o.drop(i))})("dragover",function(i){_(t);let o=f();return C(o.dragOver(i))})("dragenter",function(){_(t);let i=f();return C(i.dragEnter())})("dragleave",function(){_(t);let i=f();return C(i.dragLeave())}),l()}}function Gt(n,d){if(n&1){let t=B();a(0,"div",8),b("dragstart",function(i){_(t);let o=f();return C(o.dragStart(i))})("dragend",function(i){_(t);let o=f();return C(o.dragEnd(i))})("drag",function(i){_(t);let o=f();return C(o.drag(i))})("touchstart",function(i){_(t);let o=f();return C(o.touchStart(i))})("touchmove",function(i){_(t);let o=f();return C(o.touchMove(i))})("touchend",function(i){_(t);let o=f();return C(o.touchEnd(i))})("touchcancel",function(i){_(t);let o=f();return C(o.touchCancel(i))}),l()}}var Kt=["thead"],Jt=[[["","table-header",""]],"*",[["","table-no-rows",""]]],Zt=["[table-header]","*","[table-no-rows]"];function ei(n,d){n&1&&j(0,"spk-progress-bar",1)}function ti(n,d){n&1&&(a(0,"div",2),h(1,2),l())}var ii=["tooltipRef"];var Se=["bold","thin","light","fill"],ye=(()=>{class n{#e=H(P);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<Se.length;e++)if(t.endsWith(Se[e]))return Se[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&te(i.currentClass)},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Pi=(()=>{class n{constructor(){this._el=H(P),this.alertService=m(null),this.id=m(null),this.alertClasses=I(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:qe,decls:18,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(e,i){if(e&1&&(x(ze),a(0,"div",1)(1,"div",2,0),h(3),l(),a(4,"div",2),ve(5),O(6,Ue,2,0,"spk-icon",3)(7,$e,2,0,"spk-icon",3)(8,Qe,2,0,"spk-icon",3)(9,Ne,2,0,"spk-icon",3)(10,Ye,2,0,"spk-icon",3)(11,Xe,2,0,"spk-icon",3),l(),a(12,"div",4),h(13,1),h(14,2),l(),O(15,Ge,2,0,"spk-icon",5),a(16,"div",6),h(17,3),l()()),e&2){let o=Re(2);g(),U("display",o.children.length?"block":"none");let s=i.alertClasses();g(5),M(s.includes("primary")?6:s.includes("accent")?7:s.includes("warn")?8:s.includes("error")?9:s.includes("success")?10:11),g(9),M(i.id()?15:-1)}},dependencies:[ye],encapsulation:2,changeDetection:0})}}return n})();function De(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Ai=(()=>{class n{constructor(){this.alertHistory=S([]),this.alertHistoryIsOpen=S(!1),this.alertHistoryIsHidden=S(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=De();this.alertHistory.update(i=>[Z(N({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>Z(N({},o),{animateIn:o.id===e?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>Z(N({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>Z(N({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ni={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},oi=(()=>{class n{constructor(){this.dialogRef=q("dialogRef"),this.isOpen=A(!1),this.options=m(),this.closed=Y(),this.defaultOptionMerge=I(()=>N(N({},ni),this.options())),this.abortController=null,this.isOpenEffect=R(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&$(i.dialogRef,Ke,5),e&2&&Q()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:L,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(x(),a(0,"dialog",1,0)(2,"div",2),h(3),l(),O(4,Je,1,0,"div",3),l()),e&2){let o,s,r,u;U("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(r=i.defaultOptionMerge().maxHeight)!==null&&r!==void 0?r:"")("height",(u=i.defaultOptionMerge().height)!==null&&u!==void 0?u:""),g(4),M(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Li=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#t=H(Ie),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#t;open(t,e){let i=this.#t.injector,o=this.#o(),E=e||{},{data:s,closed:r}=E,u=we(E,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=Ce(t,{environmentInjector:i}),this.compRef=Ce(oi,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let c=this.insertedCompRef.instance?.data,p=this.insertedCompRef.instance?.closed;if(s){if(le(c))this.insertedCompRef.setInput("data",s);else if(!le(c))throw new Error("data is not an input signal on the passed component")}p instanceof ae&&(this.closedFieldSub=p.subscribe((...F)=>{r?.(...F),this.#n()})),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",u),this.compRef.instance.closed.subscribe(()=>T());let k=this;function T(){p&&p instanceof ae?p.emit(!1):r?.(void 0),k.#n()}return this.insertedCompRef.instance}#o(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){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.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Hi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-button-group"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),si=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["","spk-button",""]],attrs:Ze,ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),ji=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-card"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),ri=(()=>{class n{#e=H(P);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:L,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(x(),a(0,"div",0)(1,"spk-icon",1),y(2,"check"),l(),a(3,"spk-icon",2),y(4,"minus"),l()(),h(5))},dependencies:[ye],encapsulation:2,changeDetection:0})}}return n})(),ai=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-chip"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var li=["scroll","auto"],ci={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ae=(()=>{class n{constructor(){this.#e=H(Ve),this.#t=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=m(!1),this.right=m(!1),this.markForCheck=m(null),this._above=S(this.above()),this._right=S(this.right()),this.disableOpenByClick=m(!1),this.isOpen=A(!1),this.options=m(),this.closed=Y(),this.defaultOptionMerge=I(()=>N(N({},ci),this.options())),this.triggerRef=q.required("triggerRef"),this.popoverRef=q.required("popoverRef"),this.id=S("--"+De()),this.menuStyle=S(null),this.openAbort=null,this.openEffect=R(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#o(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=R(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#t;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#o(t){let e=t.parentElement;for(;e;){if(li.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#t,u=s+e.width>window.innerWidth,c=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(c),this._right.set(u);else{if(s=i,r=o+this.#t,c){let k=t.top-e.height-this.#t;k<0||(r=k)}u&&(s=t.right-e.width,s<0&&(s=0));let p={left:s+"px",top:r+"px"};this.menuStyle.set(p)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&($(i.triggerRef,Pe,5),$(i.popoverRef,et,5)),e&2&&Q(2)},hostVars:4,hostBindings:function(e,i){e&2&&V("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:it,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(e,i){if(e&1){let o=B();x(tt),a(0,"div",2,0),b("click",function(r){return _(o),C(i.toggleIsOpen(r))}),a(2,"div",3),h(3),l(),a(4,"button",4),y(5,"Open popover"),l()(),a(6,"div",5,1)(8,"div",6),b("click",function(r){return _(o),C(i.isOpen()&&i.eventClose(r))}),l(),h(9,1),l()}e&2&&(U("anchor-name",i.id()),g(6),J(i.menuStyle()),U("position-anchor",i.id()))},dependencies:[si],encapsulation:2,changeDetection:0})}}return n})();var Bi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-divider"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Le=(()=>{class n{#e=H(P);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 t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let s=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(s,0)};var i=s,o=r;e.addEventListener("change",s),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),s()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:st,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(x(ot),h(0),a(1,"div",0)(2,"div",1),h(3,1),h(4,2),l(),j(5,"div",2),h(6,3),h(7,4),h(8,5),j(9,"div",3),h(10,6),l(),a(11,"div",4)(12,"div",5),h(13,7),l(),a(14,"div",6),h(15,8),l()())},encapsulation:2,changeDetection:0})}}return n})();var Wi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-list"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function He(n,d){let t=d?.injector||(be(He),H(se)),{debounce:e=0,initialValue:i=void 0,transform:o=v=>v,compare:s=(v,w)=>v===w,forceType:r=void 0,returnPreviousValue:u=!0}=d||{},c=S(i),p=t.get(re),k=I(()=>{let v=n()?.nativeElement;if(v instanceof HTMLInputElement||v instanceof HTMLTextAreaElement)return je(v)}),T=!1,E,F=null;return R(()=>{let v=k();if(!v)return c.set(u&&E?o(E):void 0);i!==void 0&&v.value===""?c.set(i):v.value!==""&&xe();let w=z=>{F!==null&&clearTimeout(F),F=setTimeout(()=>{F=null,xe()},e)};v.addEventListener("input",w),v.addEventListener("inputValueChanged",w),p.onDestroy(()=>{v.removeEventListener("input",w),v.removeEventListener("inputValueChanged",w),F!==null&&clearTimeout(F)})},{injector:t}),R(()=>{let v=k();if(!v)return;let w=c()??"",z=w==null?"":String(w);v.value!==z&&(E=z,v.value=z,v.dispatchEvent(new Event("input")))},{injector:t}),c;function xe(){if(!T){T=!0;try{let v=k();if(!v)return;let w=v.value,z=r?Be(w,r):o(w);E=w,s(c(),z)||c.set(z)}finally{T=!1}}}function je(v){return Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(w){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,w);let We=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:w}});return this.dispatchEvent(We),w}}),v}function Be(v,w){switch(w){case"string":return v.toString();case"number":let z=Number(v);return isNaN(z)?void 0:z;case"boolean":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:void 0;default:return v}}}var zi=(()=>{class n{constructor(){this.above=m(!1),this.right=m(!1),this.keepClickedOptionActive=m(!1),this.closeOnClick=m(!0),this.isOpen=A(!1),this.closed=Y(),this.searchable=m(!1),this.activeOptionIndex=S(-1),this.inputRef=q("input"),this.options=Ee("option",{descendants:!0}),this.optionsEl=I(()=>Array.from(this.options()).map(t=>t.nativeElement).filter(t=>!t.disabled)),this.inputValue=He(this.inputRef),this.abortController=null,this.optionsEffect=R(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),t.addEventListener("keydown",e=>{let i=this.optionsEl(),o=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(o))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(o))):e.key==="Enter"?(e.preventDefault(),o>-1&&(i[o].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this.inputValueEffect=R(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase(),i=this.optionsEl();if(!e||e===""){i.forEach(r=>{r.classList.remove("hide-option"),r.style.order=""});return}let o=i.map(r=>{let u=r.textContent?.toLowerCase()||"",c=this.#e(u,e);return{el:r,score:c,textContent:u}});o.sort((r,u)=>u.score-r.score);let s=!1;o.forEach(({el:r,score:u},c)=>{u===0||r.disabled?(r.classList.add("hide-option"),r.style.order=""):(r.classList.remove("hide-option"),r.style.order=c.toString(),s||(queueMicrotask(()=>this.activeOptionIndex.set(i.indexOf(r))),s=!0))})}),this.activeOptionIndexEffect=R(()=>{let t=this.optionsEl(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e(t,e){if(!e)return 0;let i=0,o=-1,s=0;t.includes(e)&&(i+=1e3);for(let r=0;r<e.length;r++){let u=e[r],c=t.indexOf(u,o+1);if(c===-1)return 0;i+=100,o+1===c&&o!==-1&&(i+=50),o=c,s++}return i+=s*20,i}nextActiveIndex(t){let e=this.optionsEl();if(t===-1||t===e.length-1)return 0;let i=t+1;if(this.searchable()){if(e[i].disabled)return this.nextActiveIndex(i);if(e[i].classList.contains("hide-option"))return this.nextActiveIndex(i)}return i}prevActiveIndex(t){let e=this.optionsEl();if(t===0||t===-1)return e.length-1;let i=t-1;if(this.searchable()){if(e[i].disabled)return this.prevActiveIndex(i);if(e[i].classList.contains("hide-option"))return this.prevActiveIndex(i)}return i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}createWildcardRegex(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.escapeRegexChar(o);return i+=".*$",new RegExp(i,"i")}escapeRegexChar(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-menu"]],contentQueries:function(e,i,o){e&1&&he(o,i.options,rt,5),e&2&&Q()},viewQuery:function(e,i){e&1&&$(i.inputRef,at,5),e&2&&Q()},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ct,decls:9,vars:10,consts:[["formFieldWrapper",""],["input",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"small"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let o=B();x(lt),a(0,"spk-popover",2,0),ge("isOpenChange",function(r){return _(o),me(i.isOpen,r)||(i.isOpen=r),C(r)}),b("closed",function(){return _(o),C(i.close("fromPopover"))}),a(2,"div",3),b("click",function(){return _(o),C(i.isOpen.set(!0))}),h(3),l(),a(4,"spk-form-field",4),j(5,"input",5,1),l(),a(7,"div",6),b("click",function(){return _(o),C(i.close("active"))}),h(8,1),l()()}e&2&&(fe("isOpen",i.isOpen),X("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",_e(9,nt)),g(4),V("hidden",i.searchable()===!1),g(3),V("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[Ae,Le],encapsulation:2,changeDetection:0})}}return n})(),pi=(()=>{class n{constructor(){this.value=m(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&j(0,"div",0),e&2&&U("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),qi=(()=>{class n{#e=H(P);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(x(),j(0,"div",0),h(1))},encapsulation:2,changeDetection:0})}}return n})(),Ui=(()=>{class n{constructor(){this.#e=H(P),this.#t=null,this.unit=m(""),this.value=A(0),this.inputState=S({min:0,max:100}),this.inputEffect=R(()=>{let t=this.value();this.inputField&&t!==parseInt(this.inputField.value)&&(this.inputField.value=t+"")})}#e;#t;get inputField(){return this.#e.nativeElement.querySelector('input[type="range"]')??null}trackEvent(t){this.inputField?.readOnly&&(t.preventDefault(),t.stopPropagation())}ngOnInit(){if(this.inputField){this.inputState.set({max:parseInt(this.inputField.max??"")??100,min:parseInt(this.inputField.min??"")??0}),this.value.set(parseInt(this.inputField.value??"")??0),this.inputField.oninput=e=>{this.value.set(parseInt(this.inputField.value??"")??0)};let t=["min","max","value"];typeof MutationObserver<"u"&&(this.#t=new MutationObserver((e,i)=>{for(let o of e)o.type==="attributes"&&t.includes(o.attributeName??"")&&(this.inputState.set({max:parseInt(this.inputField.max??"")??100,min:parseInt(this.inputField.min??"")??0}),this.value.set(parseInt(this.inputField.value??"")??0))}),this.#t.observe(this.inputField,{attributes:!0,childList:!1,subtree:!1}))}else console.error("No input field found")}thumbWrapStyle(){return{left:`${this.value()/this.inputState().max*100}%`}}thumbStyle(){return{transform:`translateX(-${this.value()/this.inputState().max*100}%)`}}trackFilledStyle(){return{width:`${this.value()/this.inputState().max*100}%`}}ngOnDestroy(){this.#t&&this.#t.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&V("has-input",i.inputField)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:dt,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(e,i){e&1&&(x(pt),a(0,"div",0),h(1),l(),a(2,"div",1)(3,"div",2),y(4),l(),a(5,"div",3),b("click",function(s){return i.trackEvent(s)}),h(6,1),a(7,"div",4),j(8,"div",5),l(),a(9,"div",6)(10,"div",7)(11,"div",8),y(12),l()()()(),a(13,"div",9),y(14),l()()),e&2&&(g(4),ie("",i.inputState().min,"",i.unit(),""),g(4),J(i.trackFilledStyle()),g(),J(i.thumbWrapStyle()),g(),J(i.thumbStyle()),g(2),ie("",i.value(),"",i.unit(),""),g(2),ie("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),di=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),$i=(()=>{class n{constructor(){this.#e=H(P),this.value=m(),this.label=m(),this.asFreeText=m(!1),this.placeholder=m(),this.readonly=A(!1),this.disabled=A(!1),this.lazySearch=m(!1),this.inlineSearch=m(!1),this.asText=m(!1),this.isClearable=m(!0),this.selectMultiple=m(!1),this.optionTemplate=m(null),this.selectedOptionTemplate=m(null),this.placeholderTemplate=m(null),this.isOpen=A(!1),this.isLoading=A(!1),this.options=A([]),this.selectedOptions=A([]),this.cleared=Y(),this.inlineTemplate=Te(ce),this.optionsWrapRef=q.required("optionsWrap"),this.inputRefInput=S(null),this.#t=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new P(e.target)),this.#t.disconnect())}),this.inputValue=S(""),this.prevInputValue=S(null),this.focusedOptionIndex=S(-1),this._isClearable=I(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=I(()=>this.#e.nativeElement.classList.toString()),this.placeholderText=I(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=I(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#i(i,e)):t}),this.filteredOptions=I(()=>{let t=this.options()||[],e=this.label(),i=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),r=this.#a(s);if(t.length<=0)return[];if(!o||s==="")return t;let c=t.filter(p=>{let k=e?(this.#i(p,e)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),T=((i?this.#i(p,i):p)??"").toString().toLowerCase(),E=r.test(k),F=r.test(T);return E||F}).map(p=>{let k=e?(this.#i(p,e)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),T=((i?this.#i(p,i):p)??"").toString().toLowerCase(),E=this.#o(k,s),F=this.#o(T,s);return{item:p,score:Math.max(E,F)}});return c.sort((p,k)=>k.score-p.score),c.map(p=>p.item)}),this.inputRefEl=I(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let o=i.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let o=i.detail.value,s=this.inputValue();if(o!==s){if(o===""){this.clear();return}this.setSelectedOptionsFromValue(o),this.setInputValueFromSelectedOptions(),this.#s()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=R(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let o=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(o>this.filteredOptions().length-1?0:o)}if(i.key==="ArrowUp"){i.preventDefault();let o=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(o<0?this.filteredOptions().length-1:o)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=R(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=R(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=I(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=I(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=I(()=>this.inlineSearch()||this.lazySearch()),this.#n=R(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(o=>e?this.#i(o,e):o).join(",");this.inputValue.set(i)})}#e;#t;#o(t,e){if(!e)return 0;let i=0,o=-1,s=0;t.includes(e)&&(i+=1e3);for(let r=0;r<e.length;r++){let u=e[r],c=t.indexOf(u,o+1);if(c===-1)return 0;i+=100,o+1===c&&o!==-1&&(i+=50),o=c,s++}return i+=s*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new P(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new P(e));return}typeof MutationObserver<"u"&&this.#t.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),o=this.selectMultiple(),s=t.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let r=o?s:[s[0]],u=e.filter(c=>{let p=i?this.#i(c,i)?.toString():c?.toString();return p&&r.includes(p)});this.selectedOptions.set(o?u:[u[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(o=>e?this.#i(o,e):o).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#i(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let o=this.selectMultiple(),s=this._isClearable(),r=this.value(),u=this.selectedOptionValues(),c=r?this.#i(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(p=>{let k=u.indexOf(c);if(k>-1){let T=[...p.slice(0,k),...p.slice(k+1)];return s||T.length>0?T:p}else return this.focusedOptionIndex.set(t),o?[...p,i]:[i]}),o?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),o&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],o=e?this.#i(i,e):i;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#s())}#s(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(o=>e?this.#i(o,e)===t:o===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#i(t,e){return e.split(".").reduce((i,o)=>i?.[o],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.#l(o);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#t.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,o){e&1&&he(o,i.inlineTemplate,ce,5),e&2&&Q()},viewQuery:function(e,i){e&1&&$(i.optionsWrapRef,ut,5),e&2&&Q()},hostVars:2,hostBindings:function(e,i){e&2&&V("multiple",i.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:ft,decls:32,vars:20,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let o=B();x(ht),ve(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),ge("isOpenChange",function(r){return _(o),me(i.isOpen,r)||(i.isOpen=r),C(r)}),b("closed",function(){return _(o),C(i.close())}),a(12,"spk-form-field",3),b("click",function(){return _(o),C(i.open())}),h(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),O(16,gt,1,1)(17,Tt,2,0)(18,Rt,2,1),h(19,1),h(20,2),l()(),O(21,Vt,2,0,"spk-icon",6)(22,Ft,1,0,"spk-spinner",7)(23,Pt,2,0,"spk-icon",6)(24,At,2,0,"spk-icon",6)(25,Lt,2,0,"spk-icon",6)(26,Ht,2,0,"spk-icon",6)(27,jt,2,0,"spk-icon",6),l(),a(28,"div",8,1),de(30,Ut,4,6,"li",9,pe),l()()}if(e&2){K(i.placeholderTemplate());let o=i.optionTemplate(),s=i.selectedOptionTemplate(),r=i.inlineTemplate();g(4);let u=K(i.selectedOptions()),c=i.inputState();g(2),K(s||o||r),g(),K(o||r),g();let p=K(!i.asText()&&i.selectMultiple());g();let k=K(i.isOpen()&&i.hasSearch()&&(p||i.inputValue().length>0));g(),fe("isOpen",i.isOpen),X("disableOpenByClick",!0)("options",_e(19,mt)),g(2),V("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),g(2),V("show-search-text",k),g(),V("is-selected",c==="selected"),g(),M(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:u.length>0?17:k?-1:18),g(5),M(c==="closed"?21:c==="loading"?22:c==="open-searching"?23:c==="searching"?24:c==="selected"&&i._isClearable()?25:c==="selected"&&!i._isClearable()?26:27),g(9),ue(i.filteredOptions())}},dependencies:[Fe,Ae,Le,ye,ri,di,ai],encapsulation:2,changeDetection:0})}}return n})(),Qi=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=m(!1),this.isOpen=A(!1),this.type=m(""),this.dragImageElement=q.required("dragImageElement"),this.dragIsEnding=S(!1),this.dragIsOnScreen=S(!0),this.isDragging=S(!1),this.dragPositionX=S(0),this.dragActualPositionX=I(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=I(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=R(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(t){t.stopPropagation(),this.#e(t.clientX)}#e(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#t(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#t(t)}#t(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#t(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#e(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&$(i.dragImageElement,$t,5),e&2&&Q()},hostVars:10,hostBindings:function(e,i){e&2&&V("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:Nt,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(e,i){e&1&&(x(Qt),O(0,Yt,2,0,"div",1)(1,Xt,1,0,"div",2),a(2,"div",3),h(3),l(),a(4,"div",4),O(5,Gt,1,0,"div",5),a(6,"div",6),h(7,1),l(),a(8,"main"),h(9,2),l()()),e&2&&(M(i.type()==="overlay"?0:-1),g(),M(i.type()==="overlay"&&i.isDragging()?1:-1),g(3),U("transform",i.draggingStyle()),g(),M(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var Ni=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-stepper"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function ui(n,d){let t=H(se),e=t.get(re),i=S([]),o=d.map(u=>u.toUpperCase()),s=null,r=u=>{s&&s.disconnect();let c=Array.from(u.nativeElement.querySelectorAll("*")).filter(p=>p.nodeType===Node.ELEMENT_NODE&&o.includes(p.nodeName)).map(p=>new P(p));i.set(c),s=new MutationObserver(p=>{let k=i();for(let T of p)T.addedNodes&&T.addedNodes.forEach(E=>{E.nodeType===Node.ELEMENT_NODE&&o.includes(E.nodeName)&&(k=[...k,new P(E)])}),T.removedNodes&&T.removedNodes.forEach(E=>{E.nodeType===Node.ELEMENT_NODE&&o.includes(E.nodeName)&&(k=k.filter(F=>F.nativeElement!==E))});i.set(k)}),s.observe(u.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>{s&&s.disconnect()})};return typeof n=="function"&&n[Oe]?R(()=>{let u=n();u?r(u):(i.set([]),s&&(s.disconnect(),s=null))},{injector:t}):n instanceof P&&r(n),i.asReadonly()}var Yi=(()=>{class n{constructor(){this.loading=m(!1),this.data=m([]),this.dataChange=Y(),this.sortByColumn=A(null),this.thead=q("thead"),this.columns=ui(this.thead,["TH"]),this.resizing=S(!1),this.sizeTrigger=S(!0),this.#e=null,this.#t=S(!1),this.columnSizes=I(()=>(this.sizeTrigger(),this.columns().reduce((t,e,i)=>{let o=e.nativeElement,s=i===this.columns().length-1;return o.dataset.size?`${t} ${o.dataset.size}`:s?`${t} max-content`:`${t} 1fr`},""))),this.e=R(()=>{let t=this.sortByColumn();if(t===null)return this.#t()||(this.#e=this.data(),this.#t.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data().sort((s,r)=>{let u=s[e],c=r[e],p=0;return typeof u=="number"&&typeof c=="number"&&(p=u-c),u instanceof Date&&c instanceof Date&&(p=u.getTime()-c.getTime()),typeof u=="string"&&typeof c=="string"&&(p=u.localeCompare(c,void 0,{sensitivity:"base"})),i?-p:p});this.dataChange.emit(o)})}#e;#t;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&$(i.thead,Kt,5),e&2&&Q()},hostVars:4,hostBindings:function(e,i){e&2&&(U("grid-template-columns",i.columnSizes()),V("resizing",i.resizing()))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Zt,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(x(Jt),a(0,"thead",null,0),h(2),O(3,ei,1,0,"spk-progress-bar",1),l(),a(4,"tbody"),h(5,1),l(),O(6,ti,2,0,"div",2)),e&2&&(g(3),M(i.loading()?3:-1),g(3),M(i.loading()?-1:6))},dependencies:[pi],encapsulation:2,changeDetection:0})}}return n})(),Xi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-tabs"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var Gi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-toggle"]],ngContentSelectors:L,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(x(),a(0,"div",0),j(1,"div",1),l(),h(2))},encapsulation:2,changeDetection:0})}}return n})(),Ki=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=m(!1),this.above=m(!1),this.right=m(!1),this._above=S(this.above()),this._right=S(this.right()),this.message=m.required(),this.isOpen=A(!1),this.closed=Y(),this.triggerRef=q.required("triggerRef"),this.tooltipRef=q.required("tooltipRef"),this.id=S("--"+De()),this.menuStyle=S(null),this.isCalculatingPosition=I(()=>{let t=this.tooltipRef()?.nativeElement;return this.isOpen()?(t?.showPopover(),!0):(t.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=R(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let e=this.abortController.signal;this.calculateMenuPosition(),this.#t(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:e}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:e})}),this.scrollableStyles=["scroll","auto"]}#e;#t(t){let e=t.parentElement;for(;e;){if(this.scrollableStyles.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#e,u=s+e.width>window.innerWidth,c=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(c),this._right.set(u);else{if(this.above()){let p=t.top-e.height-this.#e;p>=0&&(r=p)}else c&&(r=t.top-e.height-this.#e);if(this.right()){let p=t.right-e.width;p>=0&&(s=p)}else u&&(r=c?t.top+t.height-e.height:t.top,s=t.left-e.width-this.#e);this.menuStyle.set({left:s+"px",top:r+"px"})}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=D({type:n,selectors:[["spk-tooltip"]],viewQuery:function(e,i){e&1&&($(i.triggerRef,Pe,5),$(i.tooltipRef,ii,5)),e&2&&Q(2)},hostVars:6,hostBindings:function(e,i){e&2&&V("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:L,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(e,i){if(e&1){let o=B();x(),a(0,"div",2,0),b("mouseover",function(){return _(o),C(i.isOpen.set(!0))})("mouseout",function(){return _(o),C(i.isOpen.set(!1))}),h(2),l(),a(3,"div",3,1),y(5),l()}e&2&&(U("anchor-name",i.id()),g(3),J(i.menuStyle()),U("position-anchor",i.id()),g(2),G(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})();var Ji=(()=>{class n{constructor(){this.filesOver=S(!1),this.filesDropped=Y()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=Me({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&b("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),e&2&&V("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ye as a,Pi as b,Ai as c,oi as d,Li as e,Hi as f,si as g,ji as h,ri as i,ai as j,Bi as k,Le as l,Wi as m,zi as n,pi as o,qi as p,Ui as q,$i as r,Qi as s,Ni as t,Yi as u,Xi as v,Gi as w,Ki as x,Ji as y};
@@ -1 +1 @@
1
- import{ua as m}from"./chunk-OXZWBTVI.js";import{X as s,gb as p}from"./chunk-5ONOZUNN.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
1
+ import{ua as m}from"./chunk-2HS3CYRN.js";import{X as s,gb as p}from"./chunk-DTPZU6NP.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
@@ -0,0 +1 @@
1
+ import{b,d as h,e as $,h as B,m as G,p as P,q as v,s as L}from"./chunk-4IJQ7AAQ.js";import{b as y}from"./chunk-KLIPTMVG.js";import{c as A,d as I}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as w,c as V,g as x,l as X,y as U}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as i,Bb as r,Cb as _,D as g,L as T,Mb as C,Nb as O,Ob as f,Qa as F,Rb as k,Sb as m,X as u,db as R,fc as N,ib as S,rb as c,rc as M,sa as p,tb as D,wb as E}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new v,d=class l{#t=u(V);#e=u(y);#o=u(A);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=k(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),N(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",M(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[L,B,b,h,$,G,P,I,U,X,w,x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-KSYIZI2Y.js")},{path:"encryption",loadComponent:()=>import("./chunk-BRBZMNCZ.js")},{path:"select-files",loadComponent:()=>import("./chunk-SRIKTKDW.js")},{path:"options",loadComponent:()=>import("./chunk-UNTTIERD.js")}],o=t;export{o as default};
@@ -1,2 +1,2 @@
1
- import{a as K}from"./chunk-I56L7YBT.js";import{b as X}from"./chunk-F7TB6D2I.js";import{a as z,d as J,g as q}from"./chunk-KYG6FTJ2.js";import"./chunk-BE77QZG7.js";import"./chunk-OXZWBTVI.js";import{Ab as i,Bb as a,Cb as g,Gb as u,Mb as A,Mc as W,Nb as D,Oa as E,Ob as y,Qa as l,Sb as S,Tb as f,Wb as w,X as v,ca as d,da as _,db as h,fc as c,gc as C,hc as I,ib as k,ic as N,kc as $,lc as B,mc as V,nc as U,p as T,rb as F,rc as G,ta as m,wb as x,xb as M,yb as P,zb as R}from"./chunk-5ONOZUNN.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{a as K}from"./chunk-N5K6ODRA.js";import{b as X}from"./chunk-KLIPTMVG.js";import{a as z,d as J,g as q}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as i,Bb as a,Cb as g,Gb as u,Mb as A,Mc as W,Nb as D,Oa as E,Ob as y,Qa as l,Sb as S,Tb as f,Wb as w,X as v,ca as d,da as _,db as h,fc as c,gc as C,hc as I,ib as k,ic as N,kc as $,lc as B,mc as V,nc as U,p as T,rb as F,rc as G,sa as m,wb as x,xb as M,yb as P,zb as R}from"./chunk-DTPZU6NP.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),P(2,Q,13,5,"div",2,M),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),S("click",function(){return d(o),_(n.dialogLicense.set(null))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),R(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[z,q,J],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};
@@ -1 +1 @@
1
- import{b,c as L,d as N,e as M,h as k,m as v,p as P,q as O,s as x}from"./chunk-25A34CYL.js";import{c as S}from"./chunk-EEWVYRVF.js";import"./chunk-F7TB6D2I.js";import{c as y}from"./chunk-EMAOG2GJ.js";import"./chunk-CKZXQWC5.js";import{a as E,b as F,g as G,l as T}from"./chunk-KYG6FTJ2.js";import"./chunk-BE77QZG7.js";import"./chunk-OXZWBTVI.js";import{Ab as t,Bb as i,Cb as p,D as c,Qa as m,Sb as w,X as s,db as g,fc as n,ib as f,rb as h,ta as l,tb as _,wb as C}from"./chunk-5ONOZUNN.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
1
+ import{b,c as L,d as N,e as M,h as k,m as v,p as P,q as O,s as x}from"./chunk-4IJQ7AAQ.js";import{c as S}from"./chunk-OQEGPSC6.js";import"./chunk-KLIPTMVG.js";import{c as y}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as E,b as F,g as G,l as T}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as t,Bb as i,Cb as p,D as c,Qa as m,Sb as w,X as s,db as g,fc as n,ib as f,rb as h,sa as l,tb as _,wb as C}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{a as J}from"./chunk-WTDHHP4P.js";import{a as he}from"./chunk-VQ73M67Z.js";import{a as H}from"./chunk-N5K6ODRA.js";import{a as Ee}from"./chunk-QSTOMEKL.js";import{a as de,b as h,d as k,e as M,h as L,j as Oe,m as $,p as D,q as y,r as fe,s as A}from"./chunk-4IJQ7AAQ.js";import{b as I}from"./chunk-KLIPTMVG.js";import{a as P,c as d}from"./chunk-AIOUSVMR.js";import{a as b,g as v,l as Ce,o as Re,p as Ne,r as Pe,w as Ie}from"./chunk-GBNJJFEH.js";import{pa as q}from"./chunk-2HS3CYRN.js";import{Ab as s,Bb as a,C as ae,Cb as l,D as f,Db as Y,Eb as U,Gb as x,H as le,M as pe,Mb as u,Mc as j,Nb as F,Ob as T,Pb as ue,Qa as S,Qb as Fe,R as _e,Sb as E,Tb as B,X as p,ca as C,da as R,db as N,fc as K,g as re,ib as w,ic as Se,qc as me,rb as m,sa as _,tb as ce,v as se,vc as ge,wb as G,xc as Te}from"./chunk-DTPZU6NP.js";var ke=new y,$e=()=>ke.group({passphrase:ke.control("")}),Z=class n{#t=p(I);#e=p(O);#o=p(d);#i=p(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let o=this.#e.destinationTargetUrl();if(!o)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:o,Settings:t}},temporary:!0}).pipe(f(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let r=i.ID;this.#e.getBackup(r),this.#o.navigate([`/restore-draft/${r}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let o;o=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",o,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(s(0,"form",3),E("submit",function(){return t.next()}),s(1,"spk-form-field")(2,"label",4),T(3,0),a(),l(4,"input",5),a(),s(5,"div",6)(6,"button",7),E("click",function(){return t.back()}),u(7,1),l(8,"spk-icon"),F(),a(),s(9,"button",8),u(10,2),l(11,"spk-icon"),F(),a()()()),e&2&&m("formGroup",t.encryptionForm)},dependencies:[A,L,h,k,M,$,D,Ce,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ae(n,o){n&1&&l(0,"spk-progress-bar",7)}function be(n,o){if(n&1&&(s(0,"div",13),K(1),ge(2,"date"),a()),n&2){let e=o.$implicit;S(),Se("",e.Version,": ",Te(2,2,e.Time,"medium"),"")}}function ve(n,o){n&1&&l(0,"spk-progress-bar",7)}function we(n,o){if(n&1&&(s(0,"app-file-tree",14)(1,"label",15),T(2,4),a(),l(3,"input",16),a()),n&2){let e=B(3);m("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Ge(n,o){if(n&1&&w(0,we,4,4,"app-file-tree",14),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function xe(n,o){if(n&1){let e=x();s(0,"spk-select",11),E("cleared",function(){C(e);let i=B();return R(i.abortLoading())}),l(1,"input",12),w(2,be,3,5,"ng-template"),a(),w(3,ve,1,0,"spk-progress-bar",7)(4,Ge,1,1)}if(n&2){let e=B();m("options",e.versionOptions())("isClearable",!0),S(3),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),S(),G(e.showFileTree()?4:-1)}}var Q=new y,De=()=>Q.group({filesToRestore:Q.control(""),selectedOption:Q.control(null),passphrase:Q.control(null)}),te=class n{#t=p(I);#e=p(O);#o=p(d);#i=p(P);#n=p(q);#r=p(Ee);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPath=_(void 0);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=j(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;Number.isInteger(t)&&this.selectFilesForm.controls.selectedOption.setValue(t)}});backupSettingsEffect=j(()=>{let o=this.backupId(),e=this.isRepairing(),t=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof t!="number"||!o)return;let r=this.versionOptions()?.find(c=>c.Version===t)?.Time??null;!r||e||(this.showFileTree.set(!1),queueMicrotask(()=>{let c={id:o+"",time:r};this.backupSettings.set(c),this.getRootPath(c)}))});repairEffect=j(()=>{let o=this.#e.isDraft(),e=this.selectOptionSignal(),t=this.versionOptions();if(o&&e){let i=t.find(c=>c.Version===parseInt(e));if(i===void 0)return;let r=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:r,requestBody:{only_paths:!0,time:i.Time}}).subscribe(c=>{let W=c.ID;var X=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:W}).subscribe(z=>{z.Status==="Completed"&&(clearInterval(X),this.isRepairing.set(!1))})},1e3)})}});getRootPath(o){let e={id:o.id+"",time:o.time,prefixOnly:!0,folderContents:!1};this.isRepairing()||(this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(pe(this.abortLoading$),f(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:t=>{let i=t.Files[0].Path;this.rootPath.set(i)}}))}abortLoading$=new re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let o=this.versionOptions();return e=>{if(!e)return"";let t=o?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return t?`${t.Version}: ${this.#n.transform(t.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[me([q])],decls:13,vars:3,consts:()=>{let o;o=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let r;return r=$localize`Path`,[["formRef",""],o,e,t,r,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,"formControlName","selectedOption"],[1,"custom-option"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let i=x();s(0,"form",5,0),E("submit",function(){return C(i),R(t.next())}),s(2,"h3",6),T(3,1),a(),w(4,Ae,1,0,"spk-progress-bar",7)(5,xe,5,4),s(6,"div",8)(7,"button",9),E("click",function(){return C(i),R(t.back())}),u(8,2),l(9,"spk-icon"),F(),a(),s(10,"button",10),u(11,3),l(12,"spk-icon"),F(),a()()()}e&2&&(m("formGroup",t.selectFilesForm),S(4),G(t.versionOptionsLoading()?4:5),S(5),ue(t.isFileRestore()?"Back":"Exit"),Fe(8))},dependencies:[fe,L,h,k,M,A,$,D,q,J,v,b,Pe,Re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var O=class n{#t=p(d);#e=p(I);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=De();optionsForm=ye();encryptionForm=$e();optionsFormSignal=H(this.optionsForm.valueChanges);selectFilesFormSignal=H(this.selectFilesForm.valueChanges);selectOptionSignal=H(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);init(o,e=!1,t=!1){this.backupId.set(o),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(o,!0)}updateTargetUrl(o){this.destinationTargetUrl.set(o)}submit(){this.isSubmitting.set(!0);let o=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,i=this.versionOptions()?.find(r=>r.Version===t.selectedOption);this.#e.postApiV1BackupByIdRestore({id:o??"",requestBody:{paths:t.filesToRestore?.split("\0").map(r=>`${r}*`)??[],passphrase:t.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(f(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:r=>{console.error("restore error",r)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(o,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:o}),this.#e.getApiV1BackupByIdFilesets({id:o}).pipe(le(3))]).pipe(ae(1),f(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,i])=>{this.versionOptions.set(i),this.backup.set(t)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var V=new y,ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),oe=class n{#t=p(O);#e=p(d);#o=p(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let o;o=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let r;r=$localize`How do you want to handle existing files?`;let c;c=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let X;X=$localize`Permissions`;let z;z=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],o,e,t,i,r,c,W,X,z,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let i=x();s(0,"form",12,0),E("submit",function(){return C(i),R(t.submit())}),s(2,"h3",13),T(3,1),a(),s(4,"app-toggle-card",14),Y(5,15),T(6,2),U(),s(7,"spk-radio",16),u(8,3),l(9,"input",17),F(),a(),s(10,"spk-radio",16),u(11,4),l(12,"input",18),F(),a(),s(13,"app-file-tree",19)(14,"label",20),K(15,"Path"),a(),l(16,"input",21),a()(),s(17,"app-toggle-card",14),Y(18,15),T(19,5),U(),s(20,"spk-radio",16),u(21,6),l(22,"input",22),F(),a(),s(23,"spk-radio",16),u(24,7),l(25,"input",23),F(),a()(),s(26,"app-toggle-card"),Y(27,15),T(28,8),U(),s(29,"spk-toggle",24),u(30,9),l(31,"input",25),F(),a()(),s(32,"div",26)(33,"button",27),E("click",function(){return C(i),R(t.goBack())}),u(34,10),l(35,"spk-icon"),F(),a(),s(36,"button",28),u(37,11),l(38,"spk-icon"),F(),a()()()}if(e&2){let i;m("formGroup",t.optionsForm),S(4),m("disallowToggle",!0),S(9),m("disabled",((i=t.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),m("disallowToggle",!0),S(19),ce("loader",t.isSubmitting())}},dependencies:[A,L,h,de,Oe,k,M,$,D,he,J,Ie,Ne,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{ye as a,oe as b,$e as c,Z as d,De as e,te as f,O as g};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-I56L7YBT.js";import{a as te}from"./chunk-HRMKDPOR.js";import"./chunk-3CWO2EV5.js";import"./chunk-3NUWESLC.js";import"./chunk-IWMMFNSQ.js";import{a as j}from"./chunk-B27FY76R.js";import{b as H,d as J,g as Q,r as Y}from"./chunk-25A34CYL.js";import"./chunk-EEWVYRVF.js";import{b as W}from"./chunk-F7TB6D2I.js";import{a as z,d as q}from"./chunk-EMAOG2GJ.js";import"./chunk-CKZXQWC5.js";import{a as Z,g as x,l as ee}from"./chunk-KYG6FTJ2.js";import"./chunk-BE77QZG7.js";import"./chunk-OXZWBTVI.js";import"./chunk-KB62MNQB.js";import{Ab as i,Bb as a,C as g,Cb as l,D as u,Kc as C,L as k,Mb as r,Mc as h,Nb as p,Ob as T,Pb as L,Qa as s,Qb as U,Sb as A,X as D,db as y,fc as E,ib as v,kc as w,lc as X,mc as V,p as O,rb as F,ta as c,tb as P,vb as G,wb as K}from"./chunk-5ONOZUNN.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintainance`;let d;d=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
1
+ import{a as ae}from"./chunk-N5K6ODRA.js";import{a as te}from"./chunk-SXG7ELTX.js";import"./chunk-QSTOMEKL.js";import"./chunk-GEEPH37P.js";import"./chunk-72574KO2.js";import{a as j}from"./chunk-WZG34QS3.js";import{b as H,d as J,g as Q,r as Y}from"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as W}from"./chunk-KLIPTMVG.js";import{a as z,d as q}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as Z,g as x,l as ee}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-UQH5ZQG7.js";import{Ab as i,Bb as a,C as g,Cb as l,D as u,L as k,Lc as C,Mb as r,Mc as h,Nb as p,Ob as T,Pb as L,Qa as s,Qb as U,Sb as A,X as D,db as y,fc as E,ib as v,kc as w,lc as X,mc as V,p as O,rb as F,sa as c,tb as P,vb as G,wb as K}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintainance`;let d;d=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-OB2RR7QV.js";import"./chunk-UQH5ZQG7.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{a as DurationFormatPipe};
@@ -1 +1 @@
1
- import{g as W}from"./chunk-JD2VZ7AT.js";import"./chunk-Z3ALFDJZ.js";import"./chunk-RBEE6F5X.js";import{a as E}from"./chunk-I56L7YBT.js";import"./chunk-DXNCMAOT.js";import{a as G}from"./chunk-HRMKDPOR.js";import"./chunk-3CWO2EV5.js";import"./chunk-3NUWESLC.js";import"./chunk-IWMMFNSQ.js";import"./chunk-B27FY76R.js";import"./chunk-25A34CYL.js";import"./chunk-EEWVYRVF.js";import"./chunk-F7TB6D2I.js";import{a as $,b as P,d as L,e as M}from"./chunk-EMAOG2GJ.js";import"./chunk-CKZXQWC5.js";import{p as N,t as I}from"./chunk-KYG6FTJ2.js";import"./chunk-BE77QZG7.js";import"./chunk-OXZWBTVI.js";import"./chunk-KB62MNQB.js";import{Ab as o,Bb as i,Cb as n,Mb as F,Mc as A,Nb as r,Qa as R,Tb as u,X as T,db as m,ib as f,rb as _,rc as p,sc as l,wb as C}from"./chunk-5ONOZUNN.js";import"./chunk-C6Q5SG76.js";var y=()=>["/restore-from-files/destination"],v=()=>["/restore-from-files/encryption"],h=()=>["/restore-from-files/select-files"],K=()=>["/restore-from-files/options"],X=e=>["/restore-draft",e],w=e=>["/restore-draft",e,"options"],b=e=>["/restore",e],x=e=>["/restore",e,"options"];function z(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,y)),R(3),_("routerLink",p(5,v)),R(3),_("routerLink",p(6,h)),R(3),_("routerLink",p(7,K)))}function j(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,X,t.backupId())),R(3),_("routerLink",l(4,w,t.backupId()))}}function B(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}var c=class e{#t=T($);#e=T(W);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=A(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore-flow"]],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let O;O=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let g;g=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let D;return D=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,O,g,k,D,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),f(2,z,12,8)(3,j,6,6)(4,B,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),C(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[I,N,G,P,L,M],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{g as W}from"./chunk-HSX4KVKU.js";import"./chunk-WTDHHP4P.js";import"./chunk-VQ73M67Z.js";import{a as E}from"./chunk-N5K6ODRA.js";import"./chunk-CRREGVJC.js";import{a as G}from"./chunk-SXG7ELTX.js";import"./chunk-QSTOMEKL.js";import"./chunk-GEEPH37P.js";import"./chunk-72574KO2.js";import"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import"./chunk-KLIPTMVG.js";import{a as $,b as P,d as L,e as M}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{p as N,t as I}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-UQH5ZQG7.js";import{Ab as o,Bb as i,Cb as n,Mb as F,Mc as A,Nb as r,Qa as R,Tb as u,X as T,db as m,ib as f,rb as _,rc as p,sc as l,wb as C}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var y=()=>["/restore-from-files/destination"],v=()=>["/restore-from-files/encryption"],h=()=>["/restore-from-files/select-files"],K=()=>["/restore-from-files/options"],X=e=>["/restore-draft",e],w=e=>["/restore-draft",e,"options"],b=e=>["/restore",e],x=e=>["/restore",e,"options"];function z(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,y)),R(3),_("routerLink",p(5,v)),R(3),_("routerLink",p(6,h)),R(3),_("routerLink",p(7,K)))}function j(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,X,t.backupId())),R(3),_("routerLink",l(4,w,t.backupId()))}}function B(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}var c=class e{#t=T($);#e=T(W);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=A(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore-flow"]],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let O;O=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let g;g=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let D;return D=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,O,g,k,D,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),f(2,z,12,8)(3,j,6,6)(4,B,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),C(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[I,N,G,P,L,M],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 +1 @@
1
- import{a as D,c}from"./chunk-BE77QZG7.js";import{L as g,R as d,W as l,l as I,m as B,p as R,v as O,y as k}from"./chunk-5ONOZUNN.js";import{a as y,b as T}from"./chunk-C6Q5SG76.js";var v=class{_fns;constructor(){this._fns=[]}eject(e){let i=this._fns.indexOf(e);i!==-1&&(this._fns=[...this._fns.slice(0,i),...this._fns.slice(i+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new v}};var A=class extends Error{url;status;statusText;body;request;constructor(e,i,a){super(a),this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=e}};var h=p=>typeof p=="string",P=p=>h(p)&&p!=="",f=p=>p instanceof Blob,G=p=>p instanceof FormData,j=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},F=p=>{let e=[],i=(r,n)=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`)},a=(r,n)=>{n!=null&&(n instanceof Date?i(r,n.toISOString()):Array.isArray(n)?n.forEach(o=>a(r,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>a(`${r}[${o}]`,u)):i(r,n))};return Object.entries(p).forEach(([r,n])=>a(r,n)),e.length?`?${e.join("&")}`:""},L=(p,e)=>{let i=p.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?i(String(e.path[o])):n),r=p.BASE+a;return e.query?r+F(e.query):r},N=p=>{if(p.formData){let e=new FormData,i=(a,r)=>{h(r)||f(r)?e.append(a,r):e.append(a,JSON.stringify(r))};return Object.entries(p.formData).filter(([,a])=>a!=null).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>i(a,n)):i(a,r)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,U=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:i,username:a,password:r,additionalHeaders:n})=>{let o=Object.entries(y(y({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[m,b])=>T(y({},u),{[m]:String(b)}),{});if(P(i)&&(o.Authorization=`Bearer ${i}`),P(a)&&P(r)){let u=j(`${a}:${r}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:f(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":G(e.body)||(o["Content-Type"]="application/json")),new D(o)})),M=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):h(p.body)||f(p.body)||G(p.body)?p.body:JSON.stringify(p.body)},K=(p,e,i,a,r,n,o)=>i.request(e.method,a,{headers:o,body:r??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),z=(p,e)=>{if(e){let i=p.headers.get(e);if(h(i))return i}},W=p=>{if(p.status!==204&&p.body!==null)return p.body},$=(p,e)=>{let a=y({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},p.errors)[e.status];if(a)throw new A(p,e,a);if(!e.ok){let r=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new A(p,e,`Generic Error: status: ${r}; status text: ${n}; body: ${o}`)}},s=(p,e,i)=>{let a=L(p,i),r=N(i),n=M(i);return U(p,i).pipe(g(o=>K(p,i,e,a,n,r,o)),g(async o=>{for(let w of p.interceptors.response._fns)o=await w(o);let u=W(o),m=z(o,i.responseHeader),b=u;return i.responseTransformer&&o.ok&&(b=await i.responseTransformer(u)),{url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:m??b}}),k(o=>o.status?I({url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):B(()=>o)),R(o=>($(i,o),o.body)),k(o=>B(()=>o)))};var S=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(){return s(t,this.http,{method:"GET",url:"/api/v1/backups"})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1Mssql(){return s(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},q=class p{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},x=class p{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},H=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})};export{S as a,E as b,C as c,H as d};
1
+ import{a as D,c}from"./chunk-V5GVLIPJ.js";import{L as g,R as d,W as l,l as I,m as B,p as R,v as O,y as k}from"./chunk-DTPZU6NP.js";import{a as y,b as T}from"./chunk-C6Q5SG76.js";var v=class{_fns;constructor(){this._fns=[]}eject(e){let i=this._fns.indexOf(e);i!==-1&&(this._fns=[...this._fns.slice(0,i),...this._fns.slice(i+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new v}};var A=class extends Error{url;status;statusText;body;request;constructor(e,i,a){super(a),this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=e}};var h=p=>typeof p=="string",P=p=>h(p)&&p!=="",f=p=>p instanceof Blob,G=p=>p instanceof FormData,j=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},F=p=>{let e=[],i=(r,n)=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`)},a=(r,n)=>{n!=null&&(n instanceof Date?i(r,n.toISOString()):Array.isArray(n)?n.forEach(o=>a(r,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>a(`${r}[${o}]`,u)):i(r,n))};return Object.entries(p).forEach(([r,n])=>a(r,n)),e.length?`?${e.join("&")}`:""},L=(p,e)=>{let i=p.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?i(String(e.path[o])):n),r=p.BASE+a;return e.query?r+F(e.query):r},N=p=>{if(p.formData){let e=new FormData,i=(a,r)=>{h(r)||f(r)?e.append(a,r):e.append(a,JSON.stringify(r))};return Object.entries(p.formData).filter(([,a])=>a!=null).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>i(a,n)):i(a,r)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,U=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:i,username:a,password:r,additionalHeaders:n})=>{let o=Object.entries(y(y({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[m,b])=>T(y({},u),{[m]:String(b)}),{});if(P(i)&&(o.Authorization=`Bearer ${i}`),P(a)&&P(r)){let u=j(`${a}:${r}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:f(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":G(e.body)||(o["Content-Type"]="application/json")),new D(o)})),M=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):h(p.body)||f(p.body)||G(p.body)?p.body:JSON.stringify(p.body)},K=(p,e,i,a,r,n,o)=>i.request(e.method,a,{headers:o,body:r??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),z=(p,e)=>{if(e){let i=p.headers.get(e);if(h(i))return i}},W=p=>{if(p.status!==204&&p.body!==null)return p.body},$=(p,e)=>{let a=y({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},p.errors)[e.status];if(a)throw new A(p,e,a);if(!e.ok){let r=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new A(p,e,`Generic Error: status: ${r}; status text: ${n}; body: ${o}`)}},s=(p,e,i)=>{let a=L(p,i),r=N(i),n=M(i);return U(p,i).pipe(g(o=>K(p,i,e,a,n,r,o)),g(async o=>{for(let w of p.interceptors.response._fns)o=await w(o);let u=W(o),m=z(o,i.responseHeader),b=u;return i.responseTransformer&&o.ok&&(b=await i.responseTransformer(u)),{url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:m??b}}),k(o=>o.status?I({url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):B(()=>o)),R(o=>($(i,o),o.body)),k(o=>B(()=>o)))};var S=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(){return s(t,this.http,{method:"GET",url:"/api/v1/backups"})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1Mssql(){return s(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},q=class p{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},x=class p{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},H=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})};export{S as a,E as b,C as c,H as d};
@@ -0,0 +1,6 @@
1
+ import{g as Zt}from"./chunk-HSX4KVKU.js";import{a as jt,b as Qt,o as tt}from"./chunk-LZVTWC4S.js";import{a as Xt}from"./chunk-WTDHHP4P.js";import{a as qt}from"./chunk-VQ73M67Z.js";import"./chunk-DNHLTHLR.js";import"./chunk-N5K6ODRA.js";import"./chunk-CRREGVJC.js";import{a as U}from"./chunk-CK5N2PPF.js";import"./chunk-QSTOMEKL.js";import"./chunk-GEEPH37P.js";import"./chunk-72574KO2.js";import"./chunk-WZG34QS3.js";import{a as Ot,b as xt,d as Rt,e as kt,f as Nt,h as ht,i as It,l as yt,m as $t,n as At,o as wt,p as vt,q as Pt,s as Vt}from"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as Et}from"./chunk-KLIPTMVG.js";import{a as Dt,c as St}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as Mt,b as bt,d as Gt,e as Bt,l as Lt,n as Ut,o as Ht,r as Kt,w as Wt,x as zt}from"./chunk-GBNJJFEH.js";import{c as ft}from"./chunk-V5GVLIPJ.js";import{ia as gt}from"./chunk-2HS3CYRN.js";import{Ab as l,Bb as r,Cb as d,D as ot,Db as w,Eb as v,Fb as M,Gb as S,Lc as K,Mb as O,Mc as Ct,Nb as x,Ob as b,Pb as q,Qa as o,Qb as j,Rb as H,Sb as f,Tb as p,Wb as k,X as I,Xa as rt,Yb as st,Zb as T,ca as C,cc as pt,da as g,db as lt,dc as _t,ec as P,fc as _,gc as Q,ha as at,hc as D,ib as m,ic as ct,kc as mt,lc as Ft,mc as ut,nc as Z,oc as J,pc as Y,qc as dt,rb as c,rc as Tt,sa as R,sc as G,tb as X,uc as B,wb as u,xb as y,yb as $,yc as L,zb as A}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var Jt=["formRef"],Yt=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),z=n=>({$implicit:n}),te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),ie=()=>({maxWidth:"700px",width:"100%"});function oe(n,i){n&1&&(O(0,5,2),d(1,"spk-icon"),x())}function ae(n,i){n&1&&b(0,5,3)}function re(n,i){if(n&1){let t=S();O(0,5,1),l(1,"button",21),f("click",function(){C(t);let a=p();return g(a.testDestination())}),m(2,oe,2,0)(3,ae,1,0),r(),x()}if(n&2){let t=p();o(),X("success",t.successfulTest()),o(),u(t.successfulTest()?2:3)}}function le(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let a=p();return g(a.removeDestinationFormGroup(a.destinationCount()-1))}),O(1,8),d(2,"span",28),x(),r()}}function se(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addDestinationFormGroup(a.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;o(2),Q(t.displayName),o(2),Q(t.description)}}function pe(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addDestinationFormGroup(a.key))}),_(2),r()}if(n&2){let t=i.$implicit;o(2),D(" ",t.displayName," ")}}function _e(n,i){if(n&1&&(l(0,"div",29),$(1,se,5,2,"div",30,y),r(),l(3,"spk-menu",31)(4,"button",32),b(5,9),r(),w(6,20),$(7,pe,3,1,"button",33,y),v(),r()),n&2){let t=p();o(),A(t.destinationTypeOptionsFocused()),o(2),c("searchable",!0),o(4),A(t.destinationTypeOptionsNotFocused())}}function ce(n,i){n&1&&M(0)}function me(n,i){if(n&1&&m(0,ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,Yt,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Fe(n,i){n&1&&M(0)}function ue(n,i){if(n&1&&m(0,Fe,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,te,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function de(n,i){if(n&1){let t=S();O(0,10,1),l(1,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addAdvancedFormPair(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function Te(n,i){n&1&&M(0)}function Ce(n,i){if(n&1&&m(0,Te,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,ee,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function ge(n,i){if(n&1){let t=S();O(0,11,1),l(1,"button",35,1),f("click",function(){let a=C(t).$implicit,s=p(2);return g(s.addHttpOption(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function fe(n,i){n&1&&M(0)}function De(n,i){if(n&1&&m(0,fe,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let s=P(29),F=p();c("ngTemplateOutlet",s)("ngTemplateOutletContext",G(7,z,B(2,ne,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Se(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ee(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Se,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Oe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xe(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,Oe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function he(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function Ie(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),d(4,"input",50),m(5,ke,2,0,"spk-icon",51)(6,Ne,2,0,"spk-icon",51)(7,he,2,0,"spk-icon",51),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),o(),u(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function ye(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let a=p(2).$implicit,s=p(2);return g(s.oauthStartTokenCreation(a.destinationType))}),_(1,"AuthID"),r()}}function $e(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye "),r()}}function we(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye-slash "),r()}}function ve(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),d(3,"input",52),m(4,ye,2,0,"span",53)(5,$e,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,we,2,0,"spk-icon",54),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),o(),u(e.oauthField===e.formView.name?4:5),o(2),u(e.formView.showPassword?6:7)}}function Pe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function Ve(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Pe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Ve,1,1,"ng-template",null,3,L)),n&2){let t,e=P(6);p();let a=Y(0),s=p().$implicit;c("options",a)("isClearable",!1)("optionTemplate",e),o(),T("for","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),o(),D(" ",(t=s.formView.shortDescription)!==null&&t!==void 0?t:s.formView.name," "),o(),u(s.formView.longDescription?3:-1),o(),T("id","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),k("formControlName",s.formView.name)}}function be(n,i){if(n&1&&(Z(0),m(1,Me,7,14)),n&2){let t=p().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:-1)}}function Ge(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function Be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;ct(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Le(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Ge,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Be,1,2,"ng-template",null,4,L)),n&2){let t,e=P(6);p();let a=Y(0),s=p().$implicit;c("options",a)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),o(),T("for","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),o(),D(" ",(t=s.formView.shortDescription)!==null&&t!==void 0?t:s.formView.name," "),o(),u(s.formView.longDescription?3:-1),o(),T("id","destination-",s.formGroupName,"-",s.index,"-",s.asHttpOptions?"http":"other",""),k("formControlName",s.formView.name)}}function Ue(n,i){n&1&&d(0,"spk-progress-bar",58)}function He(n,i){if(n&1&&(Z(0),m(1,Le,7,15)(2,Ue,1,0,"spk-progress-bar",58)),n&2){let t=p().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:2)}}function Ke(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function We(n,i){if(n&1&&(l(0,"div",45)(1,"label",47),_(2),m(3,Ke,3,1,"spk-tooltip",48),r(),l(4,"div",60)(5,"spk-form-field"),d(6,"input",61),l(7,"spk-icon",51),_(8,"resize"),r()(),l(9,"spk-select",62),d(10,"input",63),r()()()),n&2){let t,e=p().$implicit,a=p(2);c("formGroupName",e.formView.name),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(3),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(3),c("options",a.sizeOptions())("inlineSearch",!0)}}function ze(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Xe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,ze,3,1,"spk-tooltip",48),r(),d(4,"input",64),l(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function qe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function je(n,i){if(n&1&&(l(0,"spk-toggle",46)(1,"label",47),_(2),m(3,qe,3,1,"spk-tooltip",48),r(),d(4,"input",65),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Qe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ze(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Je(n,i){if(n&1&&(l(0,"spk-select",66)(1,"label",47),_(2),m(3,Qe,3,1,"spk-tooltip",48),r(),d(4,"input",67),r(),m(5,Ze,1,1,"ng-template",null,4,L)),n&2){let t,e=P(6),a=p().$implicit;c("options",a.formView.options)("selectMultiple",!0)("optionTemplate",e),o(),st("for","destination-",a.formGroupName,"-",a.index,""),o(),D(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),o(),u(a.formView.longDescription?3:-1),o(),k("formControlName",a.formView.name)}}function Ye(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function tn(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Ye,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function en(n,i){if(n&1){let t=S();l(0,"button",68),f("click",function(){C(t);let a=p().$implicit,s=p(2);return g(s.removeFormView(a.formView,0))}),l(1,"spk-icon"),_(2,"x-circle"),r()()}}function nn(n,i){if(n&1&&(l(0,"div",41),w(1,42),m(2,Ee,5,17,"app-file-tree",43)(3,xe,5,13,"app-file-tree",44)(4,Ie,8,13,"spk-form-field")(5,ve,8,13,"spk-form-field")(6,be,2,2)(7,He,3,2)(8,We,11,13,"div",45)(9,Xe,7,11,"spk-form-field")(10,je,5,11,"spk-toggle",46)(11,Je,7,9)(12,tn,5,11,"spk-form-field"),v(),m(13,en,3,0,"button",32),r()),n&2){let t=i.$implicit;X("single-field",t.formGroupName!=="advanced"),o(),c("formGroupName",t.formGroupName),o(),u(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),o(11),u(t.formGroupName==="advanced"?13:-1)}}function on(n,i){if(n&1&&(w(0,22)(1,36),$(2,me,1,9,"ng-container",null,y),$(4,ue,1,9,"ng-container",null,y),l(6,"app-toggle-card",37),w(7,38),O(8,10),l(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),r(),w(12,20),$(13,de,3,1,"button",33,y),v(),r(),x(),v(),$(15,Ce,1,9,"ng-container",null,y),r(),l(17,"app-toggle-card",37),w(18,38),O(19,11),l(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),r(),w(23,20),$(24,ge,3,1,"button",33,y),v(),r(),x(),v(),$(26,De,1,9,"ng-container",null,y),r(),m(28,nn,14,5,"ng-template",null,2,L),v()()),n&2){let t=p();o(2),A(t.destinationFormPair().custom),o(2),A(t.destinationFormPair().dynamic),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedAdvancedFormPair().length===0),o(3),A(t.notSelectedAdvancedFormPair()),o(2),A(t.selectedAdvancedFormPair()),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedHttpOptions().length===0),o(3),A(t.notSelectedHttpOptions()),o(2),A(t.selectedHttpOptions())}}function an(n,i){if(n&1){let t=S();l(0,"spk-dialog",69),ut("isOpenChange",function(a){C(t);let s=p();return Ft(s.targetUrlDialogOpen,a)||(s.targetUrlDialogOpen=a),g(a)}),l(1,"header",70)(2,"h2"),b(3,12),r(),l(4,"spk-alert",71),b(5,13),r()(),l(6,"div",72)(7,"spk-form-field"),d(8,"textarea",73),r()(),l(9,"footer",74)(10,"button",24),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),l(12,"button",75),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!0))}),O(13,14),d(14,"spk-icon"),x(),r()()()}if(n&2){let t=p();mt("isOpen",t.targetUrlDialogOpen),c("options",Tt(3,ie)),o(8),c("formControl",t.targetUrlCtrl)}}var rn=["Bytes","KB","MB","GB","TB","PB"],W=new Pt,$n=(n={destinations:[]})=>W.group({destinations:W.array(n.destinations)}),An=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>W.group({destinationType:W.control(n),custom:i,dynamic:t,advanced:e}),et=class n{#l=I(St);#s=I(Dt);#p=I(ft);#t=I(tt);#i=I(Et);#e=I(Bt);#n=I(Zt);injector=I(at);formRef=rt.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=R(rn);successfulTest=R(!1);destinationTypeOptionsInFocus=R(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=R(Qt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=K(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(a=>a.key===e))});destinationTypeOptionsNotFocused=K(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=Ct(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#n.updateTargetUrl(i[0])}else this.#n.updateTargetUrl(null)});ngOnInit(){let i=this.#n.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new Nt;targetUrlInitial=R(null);targetUrlDialogOpen=R(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:e}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let s=a.error.error.Error;if(s==="missing-folder"&&this.#e.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:F=>{F&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe()}}),s.startsWith("incorrect-cert:")){let F=s.split("incorrect-cert:")[1];this.#e.open(U,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
+ If this is a self-signed certificate, you can choose to trust this certificate.
3
+ The server reported the certificate hash: ${F}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:E=>{E&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",F)}})}if(s.startsWith("incorrect-host-key:")){let F=s.split('incorrect-host-key:"')[1].split('",')[0],E=s.split('accepted-host-key:"')[1].split('",')[0];E?this.#e.open(U,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
+ Do you want to REPLACE your CURRENT host key ${E}
6
+ with the REPORTED host key: ${F}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}}):this.#e.open(U,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${F}`,confirmText:"Approve",cancelText:"Cancel"},closed:N=>{N&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}})}}})}mapToTargetUrl(i){return jt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#n.exit()}next(){this.#l.navigate(["encryption"],{relativeTo:this.#s.parent})}#o=R("https://duplicati-oauth-handler.appspot.com/").asReadonly();#a=R(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=R(!1);#_=R(null);keyCreation(){}oauthStartTokenCreation(i){this.#r.set(!0);let t=450,e=600,a=this.#o()+"?type="+i+"&token="+this.#a(),s=screen.width/2-t/2,F=screen.height/2-e/2,E=window.open(a,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+s+",top="+F);E?.addEventListener("blur",N=>{console.log("event blur",N)}),E?.addEventListener("beforeunload",N=>{console.log("event beforeunload",N),this.#p.get(this.#o()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#a()}}).pipe(ot(()=>this.#r.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=lt({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&&pt(e.formRef,Jt,5),t&2&&_t()},features:[dt([tt])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\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=H(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let a;a=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`Other destinations`;let F;F=$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:`,F=H(F);let E;E=$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:`,E=H(E);let N;N=$localize`Select an option...`;let V;V=$localize`Edit target URL`;let nt;nt=$localize` Be careful, this will overwrite everything you have in your destination. `;let it;return it=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,a,s,F,E,V,nt,it,[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,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","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"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",N,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["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(t,e){if(t&1){let a=S();l(0,"form",15,0),f("submit",function(){return C(a),g(e.next())}),l(2,"header")(3,"h3",16),O(4,5),l(5,"div",17),m(6,re,4,3,"button",18),l(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),r(),w(10,20),l(11,"button",21),f("click",function(){return C(a),g(e.openTargetUrlDialog())}),d(12,"spk-icon"),r(),v(),r()(),x(),r(),m(13,le,3,0,"p"),r(),m(14,_e,9,1)(15,on,30,6,"ng-container",22),l(16,"div",23)(17,"button",24),f("click",function(){return C(a),g(e.goBack())}),O(18,6),d(19,"spk-icon"),x(),r(),l(20,"button",25),O(21,7),d(22,"spk-icon"),x(),r()()(),m(23,an,15,4,"spk-dialog",26)}if(t&2){let a;c("formGroup",e.destinationForm),o(6),u(e.destinationCount()>0?6:-1),o(7),u(e.destinationCount()>0?13:-1),o(),u(e.destinationCount()===0?14:-1),o(),u(!((a=e.destinationFormSignal())==null||a.destinations==null)&&a.destinations.length?15:-1),o(8),u(e.targetUrlDialogOpen()?23:-1)}},dependencies:[Vt,ht,xt,It,Ot,Rt,kt,yt,$t,vt,At,wt,gt,Lt,Ut,Mt,Wt,zt,Gt,bt,Kt,Ht,qt,Xt],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{$n as createDestinationForm,An as createDestinationFormGroup,et as default};