@duplicati/ngclient 0.0.234 → 0.0.235
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.
- package/assets/sh.woff2 +0 -0
- package/chunk-29_4gGIi.js +2 -0
- package/{chunk-D5zSyubd.js → chunk-3YzyUT-a.js} +1 -1
- package/chunk-6-sszNfh.js +1 -0
- package/chunk-7T5O8Syb.js +1 -0
- package/{chunk-5kQsbzck.js → chunk-B61kkU_h.js} +1 -1
- package/chunk-B891gwjc.js +1 -0
- package/chunk-BDJqKfxm.js +1 -0
- package/chunk-BEUeHgR9.js +1 -0
- package/chunk-BEzhTDp8.js +2 -0
- package/{chunk-BnFO-7ok.js → chunk-BGuvkLC9.js} +1 -1
- package/{chunk-Dyq6iPbF.js → chunk-BJOhC2d8.js} +1 -1
- package/chunk-BOKNwzSl.js +2 -0
- package/chunk-BSCc2xDv.js +1 -0
- package/chunk-BWSg9cLt.js +2 -0
- package/chunk-BWvawawS.js +2 -0
- package/chunk-B_I_9Y7k.js +1 -0
- package/chunk-Bgd5lu61.js +1 -0
- package/chunk-BjqgOGb9.js +2 -0
- package/chunk-Bq_vr6Q3.js +2 -0
- package/{chunk-B-c3Zv6R.js → chunk-Brfc2m61.js} +1 -1
- package/{chunk-B0ETfgeR.js → chunk-Btvi2S15.js} +11 -11
- package/chunk-C0KXp4hd.js +1 -0
- package/chunk-C0XQD9NK.js +1 -0
- package/chunk-C1-31fA7.js +1 -0
- package/chunk-C185qUb-.js +1 -0
- package/{chunk-GKdOPH_4.js → chunk-C1py21yb.js} +2 -2
- package/chunk-C4Uv1C-T.js +1 -0
- package/{chunk-CTH9uShX.js → chunk-CFgDqLU0.js} +1 -1
- package/{chunk-FZcbbWYC.js → chunk-CGnjVnmu.js} +1 -1
- package/{chunk-Cv4o9u3S.js → chunk-CKUlUN3q.js} +1 -1
- package/chunk-CLlZiOaO.js +2 -0
- package/chunk-CQVPqpMp.js +2 -0
- package/chunk-CSrYlKTK.js +2 -0
- package/chunk-CdzKkYEw.js +2 -0
- package/chunk-Cj_yOpND.js +1 -0
- package/chunk-ClFp7JLZ.js +1 -0
- package/{chunk-DCsYP4vf.js → chunk-Cm7JSdTO.js} +1 -1
- package/{chunk-BaknLOqq.js → chunk-CnZx831x.js} +1 -1
- package/chunk-CsVpmA6t.js +1 -0
- package/chunk-Css7wqTG.js +2 -0
- package/chunk-CxbeRJcJ.js +1 -0
- package/chunk-CzoH_Agx.js +1 -0
- package/chunk-CzsiJ0k-.js +1 -0
- package/chunk-D04TnMUn.js +2 -0
- package/{chunk-pxcB56N0.js → chunk-D2P9ER0I.js} +1 -1
- package/{chunk-B-T54LAJ.js → chunk-D38QrkIM.js} +1 -1
- package/chunk-D4g_OF7M.js +1 -0
- package/chunk-D5V6OY_2.js +2 -0
- package/{chunk-DP2sLJDC.js → chunk-D6IQFx6m.js} +1 -1
- package/chunk-D6y9RCQD.js +1 -0
- package/chunk-D7UddV5F.js +1 -0
- package/chunk-D9jPw9Ov.js +1 -0
- package/chunk-DA7rrIf8.js +1 -0
- package/chunk-DB0aGcRM.js +1 -0
- package/{chunk-DqoYKCmi.js → chunk-DBkkb6OR.js} +3 -3
- package/chunk-DE8p9-HP.js +1 -0
- package/chunk-DFLxy15J.js +1 -0
- package/chunk-DHkdQ4u3.js +3 -0
- package/chunk-DKRWta24.js +2 -0
- package/chunk-DSeMtMg3.js +1 -0
- package/chunk-DWCofCiP.js +14 -0
- package/chunk-DXLQftDm.js +1 -0
- package/{chunk-BaNH2nfC.js → chunk-DYV1Pbu1.js} +1 -1
- package/chunk-DaXXLSfy.js +2 -0
- package/chunk-Dbq-qyNL.js +3 -0
- package/{chunk-xwdrpTfz.js → chunk-DkVHfoYw.js} +2 -2
- package/chunk-DmCJ7w-M.js +1 -0
- package/{chunk-UUMQmD5I.js → chunk-DneBfCBh.js} +2 -2
- package/{chunk-KNmRQWOM.js → chunk-DuRr4rDS.js} +1 -1
- package/chunk-Dv_fBX0w.js +1 -0
- package/chunk-IqMUABbN.js +1 -0
- package/chunk-Kq2ZFJSk.js +1 -0
- package/chunk-NAAMYA7J.js +1 -0
- package/chunk-NiMN4Rl6.js +1 -0
- package/chunk-OQ_HQ9EL.js +1 -0
- package/chunk-W1dL7dqQ.js +4 -0
- package/chunk-_OzpLe0L.js +1 -0
- package/chunk-ayE11Iz-.js +1 -0
- package/chunk-fDWfSg6Y.js +3 -0
- package/chunk-gId840Er.js +1 -0
- package/{chunk-BDhLEYas.js → chunk-iGzJokt-.js} +1 -1
- package/{chunk-BFquKzMb.js → chunk-iU19kwHx.js} +1 -1
- package/chunk-m8vMm7S6.js +1 -0
- package/chunk-xD8qjoz4.js +1 -0
- package/chunk-xI8Kkqgy.js +1 -0
- package/{chunk-0lYdrxte.js → chunk-zOY5leQB.js} +1 -1
- package/index.html +1 -1
- package/main-2ZYVV4C4.js +21 -0
- package/package.json +1 -1
- package/assets/dest-icons/sia_logo_dark.92db63f5.svg +0 -6
- package/chunk-1-oPQ4n-.js +0 -1
- package/chunk-5EFCeqK3.js +0 -3
- package/chunk-AHhgJqe4.js +0 -2
- package/chunk-B1dNb-QT.js +0 -1
- package/chunk-B8PnvglY.js +0 -2
- package/chunk-BAmgFjXY.js +0 -1
- package/chunk-BFVhQEGw.js +0 -1
- package/chunk-BGcVKmjp.js +0 -1
- package/chunk-BHrABvoK.js +0 -1
- package/chunk-BNG7N21y.js +0 -1
- package/chunk-BQapkAzp.js +0 -1
- package/chunk-BRqx-u9-.js +0 -2
- package/chunk-BaR3Dslz.js +0 -1
- package/chunk-Bg98dUtr.js +0 -2
- package/chunk-BiSIt2zb.js +0 -2
- package/chunk-BkLND74M.js +0 -1
- package/chunk-BqbJuWHd.js +0 -3
- package/chunk-C4zj812G.js +0 -1
- package/chunk-C5G4RPpS.js +0 -1
- package/chunk-CA-0mTsq.js +0 -1
- package/chunk-CAEYxmzQ.js +0 -1
- package/chunk-CGnsbLNG.js +0 -1
- package/chunk-CPjYiawK.js +0 -1
- package/chunk-CQHKuUqk.js +0 -2
- package/chunk-CSYDDxaa.js +0 -2
- package/chunk-CUNe6D-d.js +0 -2
- package/chunk-CUaDFQyH.js +0 -1
- package/chunk-CnyuuWJ3.js +0 -1
- package/chunk-CsgB8OpN.js +0 -1
- package/chunk-CspKioFm.js +0 -4
- package/chunk-CxOam2tf.js +0 -1
- package/chunk-CxUx2RFx.js +0 -1
- package/chunk-D0qGkLVr.js +0 -1
- package/chunk-D4S_1RMU.js +0 -1
- package/chunk-D6WUhpxO.js +0 -14
- package/chunk-D7C8xyJI.js +0 -1
- package/chunk-D9dEfxn4.js +0 -1
- package/chunk-DB1KeglF.js +0 -1
- package/chunk-DGO0_pkA.js +0 -2
- package/chunk-DKOaWS_j.js +0 -2
- package/chunk-DXh9g32e.js +0 -1
- package/chunk-DYfv4gJW.js +0 -1
- package/chunk-DZMTCfoN.js +0 -1
- package/chunk-DcU0yXkQ.js +0 -1
- package/chunk-Dg-uYwbp.js +0 -2
- package/chunk-DmwtL4h3.js +0 -2
- package/chunk-DnTA-m4k.js +0 -2
- package/chunk-Du0Hd0t6.js +0 -1
- package/chunk-DzYR8wiz.js +0 -2
- package/chunk-OIDsf_Aq.js +0 -1
- package/chunk-S-sgDIKw.js +0 -1
- package/chunk-UCY_7-Of.js +0 -1
- package/chunk-X3dwwJIr.js +0 -2
- package/chunk-_J1lTnCH.js +0 -1
- package/chunk-i6kMmbhY.js +0 -1
- package/chunk-oobMnyEm.js +0 -3
- package/chunk-sgM_r5NM.js +0 -1
- package/chunk-umUQn7LQ.js +0 -1
- package/main-XKLDSNLY.js +0 -16
package/chunk-D4S_1RMU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe$1}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BDhLEYas.js';import {T,e as ee,I,m,a as T$1,G as Ge,E as E1,N as Nt,q as qe,z as za,b as me$1,h as hw,_ as _t,v,u as ue$1,c as N,Q as Qi,d as aT,$ as $l,f as NC,t as tb,C as CE,g as cT,o as oC,F as Fg,j as jg,i as Ig,k as iC,l as vT,n as nC,p as lm,O as Od,U as UC,P as Pd,r as CD,s as jC,H as Hg,w as cm,x as _D,y as vg}from'./main-XKLDSNLY.js';import {S,C}from'./chunk-B8PnvglY.js';import {O}from'./chunk-CsgB8OpN.js';import'./chunk-DCsYP4vf.js';var re=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function ae(n,t){n&1&&nC(0,0,1);}function le(n,t){n&1&&nC(0,0,2);}function se(n,t){if(n&1){let e=vT();Qi(0,"button",10),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.cancel())}),jC(1,"Cancel registration"),$l();}}function ce(n,t){if(n&1&&(Qi(0,"div",7)(1,"p"),Fg(2,0),aT(3,ae,1,0)(4,le,1,0),jg(),$l(),Ig(5,"sh-progress-bar",8),aT(6,se,2,0,"button",9),$l()),n&2){let e=iC();CE(3),cT(e.state()==="unknown"?3:4),CE(3),cT((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1);}}function de(n,t){if(n&1){let e=vT();Qi(0,"sh-form-field")(1,"label",11),nC(2,1),$l(),Qi(3,"input",12),lm("ngModelChange",function(o){Od(e);let C=iC();return UC(C.customRegisterUrl,o)||(C.customRegisterUrl=o),Pd(o)}),$l(),CD(),$l(),Qi(4,"div",13)(5,"button",14),jC(6,"Go back"),$l(),Qi(7,"button",15),Hg("click",function(){Od(e);let o=iC();return Pd(o.registerViaCustomUrl())}),nC(8,2),$l()();}if(n&2){let e=iC();CE(3),cm("ngModel",e.customRegisterUrl),_D(),CE(4),vg("disabled",!e.customRegisterUrlValid());}}function _e(n,t){if(n&1){let e=vT();Qi(0,"p"),nC(1,3),$l(),Ig(2,"sh-progress-bar",8),Qi(3,"button",10),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.retryWhenFaulted())}),jC(4,"Cancel"),$l();}}function ue(n,t){if(n&1){let e=vT();Qi(0,"p"),nC(1,4),$l(),Qi(2,"button",10),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.retryWhenFaulted())}),jC(3,"Retry"),$l();}}function Ce(n,t){if(n&1&&aT(0,_e,5,0)(1,ue,4,0),n&2){let e=iC();cT(e.claimUrl()!==null?0:1);}}function ge(n,t){n&1&&(Fg(0,5,1),Ig(1,"p"),jg());}function me(n,t){n&1&&(Fg(0,5,2),Ig(1,"p"),jg());}function Fe(n,t){if(n&1){let e=vT();Qi(0,"sh-alert",16),Fg(1,5),aT(2,ge,2,0,"p")(3,me,2,0,"p"),jg(),$l(),Qi(4,"button",10),Hg("click",function(){Od(e);let o=iC();return Pd(o.retryWhenFaulted())}),jC(5," Retry "),Qi(6,"sh-icon"),jC(7,"arrow-arc-left"),$l()();}if(n&2){let e=iC();CE(2),cT(e.typeParam()==="link"?2:3);}}function fe(n,t){n&1&&(Qi(0,"h3"),jC(1,"Successfully connected"),$l(),Qi(2,"p"),jC(3,"We're going to redirect you to the home page"),$l());}var R=class n{#n=T(ee);#a=T(S);#e=T(C);#i=T(O);#l=T(I);#s=T(m);#c=T(T$1);isOldOpen=Ge(false);typeParam=E1.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);customRegisterUrlValid=Nt(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return !(t.length===0||!e.test(t))});registeringCounter=Ge(null);didTry=false;triedFinishConnection=false;#t=null;#d=T(qe);constructor(){this.#d.onDestroy(()=>{this.#r();});}ngAfterViewInit(){(this.#l.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded();}stateEffect=za(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=true,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||me$1(()=>this.claimUrl())!==null&&(this.triedFinishConnection=true,this.#_())),e==="registering"?me$1(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o();}):(this.#r(),me$1(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""]);});});});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o();},1e3);}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null);}ngOnInit(){this.#e.refreshRemoteControlStatus();}#_(){let t=this.#e.claimUrl();this.#a.open(`${t}?closeAfterConnection=true`,"_blank");}registerViaCustomUrl(){this.#e.beginRemoteRegistration(true);}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=false,this.triedFinishConnection=false,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"]);}cancel(){this.#e.cancelRemoteRegistration();}register(){this.#e.beginRemoteRegistration();}disable(){this.#e.disableRemoteControl();}enable(){this.#e.enableRemoteControl();}delete(){this.#e.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=oC(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(Qi(0,"sh-card",6),aT(1,ce,7,2,"div",7),aT(2,de,9,2),aT(3,Ce,2,1),aT(4,Fe,8,1),aT(5,fe,4,0),$l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";NC(tb(7,re,o,C,m,g,i.state()==="registered")),CE(),cT(o?1:-1),CE(),cT(C?2:-1),CE(),cT(i.state()==="registered"?3:-1),CE(),cT(g?4:-1),CE(),cT(m?5:-1);}},dependencies:[_t,Bn,Ze,Rn,Jt,Fe$1,v,d,f,ue$1,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"]})};export{R as default};
|
package/chunk-D6WUhpxO.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {y,F,m}from'./chunk-1-oPQ4n-.js';import {p as pn,S as Se,C as Ct$1,M as Mt}from'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import {I}from'./chunk-0lYdrxte.js';import {J}from'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {d as d$1,E as Ee,L as Le,x as xe,V,h,R as Re,W as We,B as Be,T as Te,G,I as Ie}from'./chunk-5EFCeqK3.js';import {N as Nt$2,m as m$2}from'./chunk-GKdOPH_4.js';import {v as ve}from'./chunk-KNmRQWOM.js';import {x}from'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import {D}from'./chunk-Cv4o9u3S.js';import {T,e as ee,aw as W,m as m$1,D as w1,G as Ge$1,N as Nt$1,z as za$1,h as hw,v,c as N,u as ue,Q as Qi$1,H as Hg,n as nC,$ as $l,d as aT,F as Fg,i as Ig,j as jg,r as CD,y as vg,C as CE,g as cT,x as _D,o as oC,M as qg,R as fC,a6 as be,l as vT,s as jC,aP as ql,aQ as Gl,p as lm,L as Kg,w as cm,cd as Vt,ce as E,J as zu,aZ as ee$1,af as D1,E as E1,S as aC,ak as dm,al as WC,ac as I1,ai as m$3,aj as l,U as UC,a1 as dT,a2 as fT,bF as ve$1,cf as Ty,aG as pt$1,aV as ay,ay as Qu,b0 as Hs$1,b1 as iy,at as h$1,bZ as ei,_ as _t,ab as C$1,bK as wy,cg as rd,k as iC,O as Od,P as Pd,bt as rE,Y as cC,a3 as KC,ae as eo$1,c9 as C1,aJ as ci,bV as re,bU as B,bi as cg,aD as YC,ca as Wg,ch as mo$1,bm as j,ci as Ss$1,cj as xs$1,ck as S,ao as qC,ar as Zp,aC as yg,ap as lT,c5 as lb,aY as x$1,cl as Sr$1,K as im,bu as N$1,a4 as uT,aa as Ql,f as NC,au as Vg,av as rC,ag as Yg,c3 as pC,a$ as JC,cm as eb,b_ as wg,aF as XC,bw as _C,aB as sm}from'./main-XKLDSNLY.js';import {f}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe$1,A as Ae}from'./chunk-DqoYKCmi.js';import {j as jn,m as me,G as Gn,T as Tn$1,Z as Ze,R as Rn,P as Pn,g as gn,h as hn$1,L,B as Bn,J as Jt,l as ln$1,f as ft,e as en$1,y as yt$1,b as m$4,D as D$1}from'./chunk-BDhLEYas.js';import {a as at$1}from'./chunk-UUMQmD5I.js';import {C}from'./chunk-B8PnvglY.js';import {O}from'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import {L as L$1,$,F as F$1}from'./chunk-DCsYP4vf.js';var Yt=class i{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return `${t}${e}`}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function ht(i){if(Sr$1(i))return i();if(Array.isArray(i))return i.map(t=>ht(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=ht(i[e]));return t}return i}var Oi=i=>i;function Ei(i,t){let e=mo$1(i,Oi,t?.equal),n=e[j],o=e;return o.set=a=>{let _=e();return Ss$1(n,a),()=>{Ss$1(n,_);}},o.update=a=>{let _=e();return xs$1(n,a),()=>{Ss$1(n,_);}},e}var ut=class i{#e=T(E);isSaving=Ge$1(false);resourceDestinations=$({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=Ei(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(true),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(zu(()=>{this.isSaving.set(false);}))}getById(t){return this.#e.getApiV2ConnectionStringById({id:t})}delete(t){return this.#e.deleteApiV2ConnectionStringById({id:t})}reload(){this.resourceDestinations.reload();}updateBackups(t,e){return this.#e.postApiV2ConnectionStringByIdUpdateBackups({id:t,requestBody:{BackupIDs:e}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var Pi=new Set(["true","1","yes","on"]),Mi=i=>(i??"").replace(/^--/,"").toLowerCase(),fi=i=>{let t=(i??[]).map(n=>({name:Mi(n.Name),value:n.Value??""})),e=n=>t.find(o=>o.name===n)?.value??"";return {encryptionDisabled:Pi.has(e("no-encryption").trim().toLowerCase()),encryptionModule:e("encryption-module"),passphrase:e("passphrase")}};var Ri=["daysRef"];function Li(i,t){if(i&1&&jC(0),i&2){let e=iC();Ql(" - ",e.getMonthName(e.getLastVisibleMonth())," ");}}function xi(i,t){if(i&1&&(Qi$1(0,"div"),jC(1),$l()),i&2){let e=t.$implicit;CE(),im(e);}}function vi(i,t){if(i&1){let e=vT();Qi$1(0,"button",9,1),Hg("keydown",function(o){let a=Od(e).$implicit,_=iC(2);return Pd(_.onKeydown(o,a))})("click",function(){let o=Od(e).$implicit,a=pC(1),_=iC(2);return Pd(_.setDate(o,a))}),jC(2),$l();}if(i&2){let e=t.$implicit,n=iC().$implicit,o=iC();NC(o.isDateSelected(e)),Kg("out-of-scope",!o.isCurrentMonth(e,n)),yg("aria-label",o.getAriaLabel(e))("tabindex",o.getTabIndex(e))("aria-selected",o.isDateSelectedBool(e)),CE(2),Ql(" ",e.getDate()," ");}}function bi(i,t){if(i&1&&(Qi$1(0,"article",7),Ig(1,"div",10),$l()),i&2){let e=iC(2);CE(),_C(e.selectedDateStylePosition());}}function wi(i,t){if(i&1&&(Qi$1(0,"div",5)(1,"nav",6),dT(2,xi,2,1,"div",null,lT),$l(),Qi$1(4,"div",7,0),dT(6,vi,3,8,"button",8,lT),aT(8,bi,2,2,"article",7),$l()()),i&2){let e=t.$implicit,n=iC();CE(2),fT(n.weekdays()),CE(4),fT(n.getMonthDates(e)),CE(2),cT(n.asRange()?-1:8);}}var Gi=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],$i=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"],ki=["ngProjectAs","label",5,["label"]],Ui=["ngProjectAs","[prefix]",5,["","prefix",""]],Vi=["ngProjectAs","[textPrefix]",5,["","textPrefix",""]],Bi=["ngProjectAs","[textSuffix]",5,["","textSuffix",""]],Ki=["ngProjectAs","[suffix]",5,["","suffix",""]];function Ji(i,t){if(i&1&&(Qi$1(0,"div",3),jC(1),$l()),i&2){let e=iC();CE(),Ql(" ",e._maskedDate()," ");}}function Xi(i,t){if(i&1){let e=vT();Qi$1(0,"sh-datepicker",7),Hg("dateChange",function(o){Od(e);let a=iC();return Pd(a.onDateChange(o))})("tabbedOut",function(){Od(e);let o=iC();return Pd(o.isOpen.set(false))}),$l();}if(i&2){let e=iC();NC(e.currentClass()),vg("date",e.internalDate());}}function zi(i,t){}var Hi=`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
2
|
-
`;var Tn=(()=>{class i{constructor(){this.#e=new Date(new Date().setHours(0,0,0,0)),this.date=D1(null),this.endDate=D1(null),this.asRange=E1(false),this.activeRangeSelection=E1(null),this.monthsToShow=E1(1),this.disabled=E1(false),this.tabbedOut=I1(),this.startOfWeek=E1(1),this.weekdayLabels=E1(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=w1("daysRef"),this.currentDate=Ge$1(this.date()??this.#e),this.#t=T(N$1),this.prevMonthShortcut=Nt$1(()=>{let e="datepicker.prev-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.nextMonthShortcut=Nt$1(()=>{let e="datepicker.next-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.monthOffsets=Nt$1(()=>Array.from({length:this.monthsToShow()},(e,n)=>n)),this.selectedDateStylePosition=Ge$1(null),this.weekdays=Nt$1(()=>{let e=this.startOfWeek(),n=this.weekdayLabels();return n.slice(e).concat(n.slice(0,e))}),this.currentClasses=re(),this.someEffect=za$1(()=>{this.currentClasses();this.#o();}),this.#n=za$1(()=>{this.monthsToShow()>1||this.#i();}),this.focusedDate=Ge$1(null),this.#a=T(eo$1);}#e;#t;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let n=new Date(this.currentDate());return n.setMonth(n.getMonth()+e),n}getMonthDates(e){let n=this.getOffsetDate(e);return this.#r(n,this.startOfWeek())}#n;ngOnInit(){this.monthsToShow()!==1&&this.#i();}#i(){let e=this.date();e&&!isNaN(e.getTime())&&this.currentDate.set(e),this.#o();}#o(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(n=>n?m$3(l({},n),{opacity:"0"}):null);this.setSelectedDateStylePosition(e);});}#r(e,n){let o=e.getFullYear(),a=e.getMonth(),_=new Date(o,a,1).getDay(),c=new Date(o,a+1,0).getDate(),u=[],E=_-n;E<0&&(E+=7);let D=new Date(o,a,0).getDate();for(let R=E-1;R>=0;R--)u.push(new Date(o,a-1,D-R,0,0,0,0));for(let R=1;R<=c;R++)u.push(new Date(o,a,R,0,0,0,0));let F=1;for(;u.length%7!==0;)u.push(new Date(o,a+1,F++,0,0,0,0));return u}nextMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()+1),n}),this.#o();}previousMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()-1),n}),this.#o();}setDate(e,n){this.focusedDate.set(e);let o=(a,_)=>{let c=0,u=0,E=0,D=0;return _&&((typeof _=="string"||typeof _=="number")&&(_=new Date(_)),_ instanceof Date&&!isNaN(_.getTime())&&(c=_.getHours(),u=_.getMinutes(),E=_.getSeconds(),D=_.getMilliseconds())),new Date(a.getFullYear(),a.getMonth(),a.getDate(),c,u,E,D)};if(!this.asRange())this.date.set(o(e,this.date())),this.endDate.set(null);else {let a=this.date(),_=this.endDate(),c=this.activeRangeSelection();if(c==="start"){let u=o(e,a);this.date.set(u),_&&u>_&&this.endDate.set(null);}else if(c==="end")if(!a||e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,_);this.endDate.set(u);}else if(a)if(_){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else if(e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,_);this.endDate.set(u);}else {let u=o(e,a);this.date.set(u);}}this.asRange()||this.setSelectedDateStylePosition(n);}isDateSelected(e){let n=this.date(),o=this.endDate();if((typeof n=="string"||typeof n=="number")&&(n=new Date(n)),(typeof o=="string"||typeof o=="number")&&(o=new Date(o)),!n||!(n instanceof Date)||isNaN(n.getTime()))return null;let a=F=>new Date(F.getFullYear(),F.getMonth(),F.getDate(),0,0,0,0),_=F=>new Date(F.getFullYear(),F.getMonth(),F.getDate(),23,59,59,999),c=a(e),u=a(n),E=o?_(o):null,D=[];if(this.asRange())if(E===null)c.getTime()===u.getTime()&&D.push("sel first last");else {if(c.getTime()===u.getTime()&&D.push("first"),c.getTime()===a(E).getTime()&&D.push("last"),c>=u&&c<=E){D.push("sel");let J=c.getDay(),z=this.startOfWeek();J===z&&D.push("week-start");let q=(z+6)%7;J===q&&D.push("week-end");}let F=new Date(c);F.setDate(c.getDate()+1),new Date(c).setDate(c.getDate()-1);let G=c.getDate()===1,I=F.getMonth()!==c.getMonth();G&&D.push("month-start"),I&&D.push("month-end");}else c.getTime()===u.getTime()&&D.push("sel");return D.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"});}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,n){let o=this.getOffsetDate(n);return e.getMonth()===o.getMonth()}#a;isSameDay(e,n){return !e||!n?false:e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()}getAriaLabel(e){return e.toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"})}getTabIndex(e){let n=this.focusedDate(),o=this.date(),a=new Date;return n?this.isSameDay(e,n)?0:-1:o?this.isSameDay(e,o)?0:-1:this.isSameDay(e,a)?0:-1}isDateSelectedBool(e){let n=this.isDateSelected(e);return n?n.includes("sel"):false}onKeydown(e,n){let o=new Date(n),a=false;this.#t.matches(e,"datepicker.prev-month")?(o.setMonth(n.getMonth()-1),a=true):this.#t.matches(e,"datepicker.next-month")?(o.setMonth(n.getMonth()+1),a=true):this.#t.matches(e,"datepicker.prev-year")?(o.setFullYear(n.getFullYear()-1),a=true):this.#t.matches(e,"datepicker.next-year")?(o.setFullYear(n.getFullYear()+1),a=true):this.#t.matches(e,"datepicker.month-start")?(o=new Date(n.getFullYear(),n.getMonth(),1,0,0,0,0),a=true):this.#t.matches(e,"datepicker.month-end")?(o=new Date(n.getFullYear(),n.getMonth()+1,0,0,0,0,0),a=true):this.#t.matches(e,"datepicker.day-next")?(o.setDate(n.getDate()+1),a=true):this.#t.matches(e,"datepicker.day-prev")?(o.setDate(n.getDate()-1),a=true):this.#t.matches(e,"datepicker.week-next")?(o.setDate(n.getDate()+7),a=true):this.#t.matches(e,"datepicker.week-prev")&&(o.setDate(n.getDate()-7),a=true),a&&(e.preventDefault(),this.ensureDateVisible(o),this.focusedDate.set(o),setTimeout(()=>{let _=this.#a.nativeElement.querySelectorAll("button");if(_){let c=this.getAriaLabel(o),u=null;for(let E=0;E<_.length&&!(_[E].getAttribute("aria-label")===c&&(u=_[E],!_[E].classList.contains("out-of-scope")));E++);u&&u.focus();}}));}ensureDateVisible(e){let n=this.currentDate(),o=this.getLastVisibleMonth();if(e<new Date(n.getFullYear(),n.getMonth(),1))this.currentDate.set(new Date(e.getFullYear(),e.getMonth(),1)),this.#o();else if(e>new Date(o.getFullYear(),o.getMonth()+1,0)){let a=new Date(e);a.setMonth(a.getMonth()-this.monthsToShow()+1),a.setDate(1),this.currentDate.set(a),this.#o();}}focusActiveDate(){setTimeout(()=>{let e=this.#a.nativeElement.querySelector('button[tabindex="0"]');e&&e.focus();},50);}onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#a.nativeElement.contains(n)&&this.tabbedOut.emit();});}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-datepicker"]],viewQuery:function(n,o){n&1&&qg(o.daysRef,Ri,5),n&2&&fC();},hostVars:6,hostBindings:function(n,o){n&1&&Hg("focusout",function(_){return o.onFocusOut(_)}),n&2&&(NC("columns-"+o.monthsToShow()),Kg("as-range",o.asRange())("disabled",o.disabled()));},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],activeRangeSelection:[1,"activeRangeSelection"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange",tabbedOut:"tabbedOut"},decls:14,vars:5,consts:[["daysRef",""],["elementRef",""],["tabindex","-1",3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],["type","button",3,"out-of-scope","class"],["type","button",3,"keydown","click"],[1,"sel-el"]],template:function(n,o){n&1&&(Qi$1(0,"header")(1,"button",2),Hg("click",function(){return o.previousMonth()}),Qi$1(2,"sh-icon"),jC(3,"caret-left"),$l()(),Qi$1(4,"div",3),jC(5),aT(6,Li,1,1),jC(7),$l(),Qi$1(8,"button",2),Hg("click",function(){return o.nextMonth()}),Qi$1(9,"sh-icon"),jC(10,"caret-right"),$l()()(),Qi$1(11,"section",4),dT(12,wi,9,1,"div",5,uT),$l()),n&2&&(CE(),yg("aria-keyshortcuts",o.prevMonthShortcut()),CE(4),Ql(" ",o.getMonthName(o.currentDate())," "),CE(),cT(o.monthsToShow()>1?6:-1),CE(),Ql(" ",o.getFullYear(o.currentDate())," "),CE(),yg("aria-keyshortcuts",o.nextMonthShortcut()),CE(4),fT(o.monthOffsets()));},dependencies:[N],styles:[`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
3
|
-
`],encapsulation:2});}}return i})(),hi=(()=>{class i{constructor(){this.#e=T(eo$1),this.ngControl=C1(m$4),this.#t=T(ci),this.#n=Ge$1(null),this.masking=E1("mediumDate"),this.closed=I1(),this._maskedDate=Nt$1(()=>{let e=this.internalDate(),n=this.masking();return n?e?this.#t.transform(e,n):null:e}),this.internalDate=Ge$1(null),this.isOpen=D1(false),this.currentClass=re(),this.#i=B("#input-wrap input"),this.datepicker=w1(Tn),this.#o=za$1(()=>{this.isOpen()&&setTimeout(()=>{this.datepicker()?.focusActiveDate();},50);}),this.#r=za$1(()=>{let e=this.#i();if(!e.length)return;let n=e[0];n&&(this.#a(n),n.addEventListener("inputValueChanged",o=>{let a=o.detail.value;if(!a){this.internalDate.set(null);return}let _=new Date(a);if(isNaN(_.getTime())&&typeof a=="string"&&/^(\d{2}):(\d{2})/.test(a)){let c=a.match(/^(\d{2}):(\d{2})(?::(\d{2}))?/);if(c){let u=this.internalDate()||new Date;_=new Date(u),_.setHours(parseInt(c[1],10),parseInt(c[2],10),c[3]?parseInt(c[3],10):0,0);}}isNaN(_.getTime())||this.internalDate.set(_);}),n.addEventListener("focus",()=>{this.isOpen.set(true);}),this.#n.set(n),n.autocomplete="off",typeof n.value=="string"&&this.internalDate.set(n.value?new Date(n.value):null));});}#e;#t;#n;#i;#o;onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#e.nativeElement.contains(n)&&this.isOpen.set(false);});}onDateChange(e){this.internalDate.set(e);let n=this.ngControl()?.control;if(n)n.setValue(e);else {let o=this.#n();o&&(o.value=e?e.toString():"",o.dispatchEvent(new Event("input")));}}close(){this.closed.emit(this.internalDate());}#r;#a(e){return Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,n);let a=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(a),n}}),e}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(n,o,a){n&1&&Wg(a,o.ngControl,m$4,5),n&2&&fC();},viewQuery:function(n,o){n&1&&qg(o.datepicker,Tn,5),n&2&&fC();},hostBindings:function(n,o){n&1&&Hg("focusout",function(_){return o.onFocusOut(_)});},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[YC([ci])],ngContentSelectors:$i,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","tabbedOut","date"]],template:function(n,o){if(n&1){let a=vT();aC(Gi),Qi$1(0,"sh-form-field-popover",1),Hg("closed",function(){return o.close()}),lm("isOpenChange",function(c){return Od(a),UC(o.isOpen,c)||(o.isOpen=c),Pd(c)}),cC(1,0,ki),cC(2,1,Ui),cC(3,2,Vi),Qi$1(4,"div",2),aT(5,Ji,2,1,"div",3),cC(6,3),$l(),cC(7,4,Bi),cC(8,5,Ki),Qi$1(9,"sh-icon",4),jC(10,"calendar"),$l(),Qi$1(11,"div",5),aT(12,Xi,1,3,"sh-datepicker",6),$l()(),cg(13,zi,0,0,"ng-template",null,0,lb);}n&2&&(cm("isOpen",o.isOpen),CE(5),cT(o.masking()?5:-1),CE(7),cT(o.isOpen()?12:-1));},dependencies:[Tn,Ae,N],styles:[Hi],encapsulation:2});}}return i})();var Wi=["mon","tue","wed","thu","fri","sat","sun"],ji={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:0};function yi(i,t){let e=Wi.filter(n=>t[n]).map(n=>i().day(ji[n]).format("dddd"));return e.length===7?$localize`All days`:e.length===0?$localize`No days selected`:new Intl.ListFormat(i.locale(),{style:"long",type:"conjunction"}).format(e)}function qi(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,13),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function Yi(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,14),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function Qi(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,15),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function Zi(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,16),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function eo(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,17),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function to(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,18),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function no(i,t){if(i&1&&(Qi$1(0,"span"),nC(1,19),$l()),i&2){iC(2);let e=qC(6);CE(),Vg(e.repeatValue)(e.repeatValue),rC(1);}}function io(i,t){if(i&1&&(Qi$1(0,"dl")(1,"div")(2,"dt"),nC(3,8),$l(),Qi$1(4,"dd"),nC(5,9),$l()(),Qi$1(6,"div")(7,"dt"),nC(8,10),$l(),Qi$1(9,"dd"),aT(10,qi,2,2,"span")(11,Yi,2,2,"span")(12,Qi,2,2,"span")(13,Zi,2,2,"span")(14,eo,2,2,"span")(15,to,2,2,"span")(16,no,2,2,"span"),$l()(),Qi$1(17,"div")(18,"dt"),nC(19,11),$l(),Qi$1(20,"dd"),jC(21),$l()()(),Qi$1(22,"p"),nC(23,12),$l()),i&2){iC();let e=qC(6);CE(5),Vg(e.date)(e.time),rC(5),CE(5),cT(e.repeatUnit==="s"?10:e.repeatUnit==="m"?11:e.repeatUnit==="h"?12:e.repeatUnit==="W"?13:e.repeatUnit==="M"?14:e.repeatUnit==="Y"?15:16),CE(11),im(e.allowedDays);}}function oo(i,t){i&1&&(Qi$1(0,"p"),nC(1,20),$l());}function ao(i,t){if(i&1){let e=vT();Qi$1(0,"div",41)(1,"sh-form-field")(2,"label",42),nC(3,21),$l(),Qi$1(4,"input",43,0),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),Pd(o)}),$l(),CD(),Qi$1(6,"sh-icon",44),jC(7,"clock"),$l()(),Qi$1(8,"sh-datepicker-input",45)(9,"label",46),jC(10,"\xA0"),$l(),Qi$1(11,"input",47,1),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),Pd(o)}),$l(),CD(),Qi$1(13,"sh-icon",44),jC(14,"calendar"),$l()()(),Qi$1(15,"div",41)(16,"sh-form-field")(17,"label",48),nC(18,22),$l(),Qi$1(19,"input",49),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),Pd(o)}),$l(),CD(),$l(),Qi$1(20,"sh-select",50)(21,"input",51),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),Pd(o)}),$l(),CD(),$l()(),Qi$1(22,"sh-toggle-card",52),ql(23,53),nC(24,23),Gl(),Qi$1(25,"div",54)(26,"sh-toggle",38),Fg(27,24),Qi$1(28,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(29,"sh-toggle",38),Fg(30,25),Qi$1(31,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(32,"sh-toggle",38),Fg(33,26),Qi$1(34,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(35,"sh-toggle",38),Fg(36,27),Qi$1(37,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(38,"sh-toggle",38),Fg(39,28),Qi$1(40,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(41,"sh-toggle",38),Fg(42,29),Qi$1(43,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(44,"sh-toggle",38),Fg(45,30),Qi$1(46,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),Pd(o)}),$l(),CD(),jg(),$l()()();}if(i&2){let e=iC(2);CE(4),cm("ngModel",e.scheduleFields.nextTime.time),_D(),CE(7),cm("ngModel",e.scheduleFields.nextTime.date),_D(),CE(8),cm("ngModel",e.scheduleFields.runAgain.repeatValue),_D(),CE(),vg("options",e.unitOptions)("isClearable",false),CE(),cm("ngModel",e.scheduleFields.runAgain.repeatUnit),_D(),CE(),vg("disableToggle",true),CE(6),cm("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_D(),CE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.sun),_D();}}function ro(i,t){if(i&1){let e=vT();Qi$1(0,"div",37)(1,"sh-toggle",38),Fg(2,5),Qi$1(3,"input",39),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),Pd(o)}),$l(),CD(),jg(),$l(),Qi$1(4,"p"),nC(5,6),$l()(),dm(6),Qi$1(7,"section",40)(8,"h4"),nC(9,7),$l(),aT(10,io,24,4)(11,oo,2,0,"p"),$l(),aT(12,ao,47,14);}if(i&2){let e=iC();CE(3),cm("ngModel",e.scheduleFields.autoRun),_D(),CE(3);let n=WC(e.scheduleSummary());CE(4),cT(n.autoRun?10:11),CE(2),cT(e.scheduleFields.autoRun()?12:-1);}}var so=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Qt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:false,sun:false}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:true,nextTime:{time:"13:00:00",date:lo().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:true,tue:false,wed:false,thu:false,fri:false,sat:false,sun:false}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:false,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}}];function Ni(i){if(!i.autoRun)return null;let t=[i.runAgain.allowedDays.mon?"Monday":null,i.runAgain.allowedDays.tue?"Tuesday":null,i.runAgain.allowedDays.wed?"Wednesday":null,i.runAgain.allowedDays.thu?"Thursday":null,i.runAgain.allowedDays.fri?"Friday":null,i.runAgain.allowedDays.sat?"Saturday":null,i.runAgain.allowedDays.sun?"Sunday":null].filter(G=>G!==null),e=new Date(i.nextTime.date),n=i.nextTime.time.split(":"),o=e.getFullYear(),a=e.getMonth(),_=e.getDate(),c=parseInt(n[0]??"0"),u=parseInt(n[1]??"0"),E=parseInt(n[2]??"0"),D=new Date(o,a,_,c,u,E,0),F=i.runAgain.repeatValue,R=i.runAgain.repeatUnit;return {Time:D.toISOString(),Repeat:`${F}${R}`,AllowedDays:t}}function lo(){let i=new Date,t=i.getDay(),e=t===1?7:(8-t)%7;return i.setDate(i.getDate()+e),i.setHours(12,0,0,0),i}var En=()=>({autoRun:Ge$1(true),nextTime:{time:Ge$1("13:00"),date:Ge$1(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:Ge$1(1),repeatUnit:Ge$1("D"),allowedDays:{mon:Ge$1(true),tue:Ge$1(true),wed:Ge$1(true),thu:Ge$1(true),fri:Ge$1(true),sat:Ge$1(true),sun:Ge$1(true)}}}),Sn=class i{#e=T(Ve);#t=T(ee);#n=T(W);#i=T(Vt);unitOptions=so;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Qt;scheduleSummary=Nt$1(()=>{if(!this.scheduleFields.autoRun())return {autoRun:false};let t=this.scheduleFields.runAgain.allowedDays;return {autoRun:true,date:this.scheduleFields.nextTime.date(),time:this.scheduleFields.nextTime.time(),repeatValue:this.scheduleFields.runAgain.repeatValue(),repeatUnit:this.scheduleFields.runAgain.repeatUnit(),allowedDays:yi(this.#i,{mon:t.mon(),tue:t.tue(),wed:t.wed(),thu:t.thu(),fri:t.fri(),sat:t.sat(),sun:t.sun()})}});updateScheduleType(t){let e=Qt.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??false),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??true),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??true),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??true),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??true),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??true),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??true),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??true);}else this.scheduleType.set("custom");}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#t.navigate(["options"],{relativeTo:this.#n.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let _;_=$localize`If a date was missed, the job will run as soon as possible.`;let c;c=$localize`Schedule summary`;let u;u=$localize`First run`;let E;E=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: at ${"\uFFFD1\uFFFD"}:INTERPOLATION_1:`;let D;D=$localize`Repeats`;let F;F=$localize`Allowed days`;let R;R=$localize`The first run sets the anchor for the recurring schedule.`;let G;G=$localize`{VAR_PLURAL, plural, =1 {Every second} other {Every {INTERPOLATION} seconds}}`,G=oC(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let I;I=$localize` ${G}:ICU@@5419491236737079104: `;let J;J=$localize`{VAR_PLURAL, plural, =1 {Every minute} other {Every {INTERPOLATION} minutes}}`,J=oC(J,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let z;z=$localize` ${J}:ICU@@9181525891437455640: `;let q;q=$localize`{VAR_PLURAL, plural, =1 {Every hour} other {Every {INTERPOLATION} hours}}`,q=oC(q,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Z;Z=$localize` ${q}:ICU@@1340843328390311686: `;let B;B=$localize`{VAR_PLURAL, plural, =1 {Every week} other {Every {INTERPOLATION} weeks}}`,B=oC(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let fe;fe=$localize` ${B}:ICU@@7052524268295174745: `;let de;de=$localize`{VAR_PLURAL, plural, =1 {Every month} other {Every {INTERPOLATION} months}}`,de=oC(de,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ce;Ce=$localize` ${de}:ICU@@2595475742100737159: `;let V;V=$localize`{VAR_PLURAL, plural, =1 {Every year} other {Every {INTERPOLATION} years}}`,V=oC(V,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let He;He=$localize` ${V}:ICU@@1400112360174321415: `;let $e;$e=$localize`{VAR_PLURAL, plural, =1 {Every day} other {Every {INTERPOLATION} days}}`,$e=oC($e,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Y;Y=$localize` ${$e}:ICU@@1295786187490408294: `;let Tt;Tt=$localize`Backups will not run automatically.`;let St;St=$localize`Next time`;let Q;Q=$localize`Run again every`;let Fn;Fn=$localize`Allowed days`;let Dn;Dn=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let An;An=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let In;In=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let On;On=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let Pn;Pn=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let Mn;Mn=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let Rn;return Rn=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,o,a,_,c,u,E,D,F,R,I,z,Z,fe,Ce,He,Y,Tt,St,Q,Fn,Dn,An,In,On,Pn,Mn,Rn,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],["aria-live","polite",1,"schedule-summary"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","text","id","date",3,"ngModelChange","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disableToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(Qi$1(0,"h3",31),nC(1,2),$l(),Qi$1(2,"sh-select",32)(3,"input",33),Hg("ngModelChange",function(a){return n.updateScheduleType(a)}),$l(),CD(),$l(),aT(4,ro,13,4),Qi$1(5,"div",34)(6,"button",35),Hg("click",function(){return n.goBack()}),Fg(7,3),Ig(8,"sh-icon"),jg(),$l(),Qi$1(9,"button",36),Hg("click",function(){return n.next()}),Fg(10,4),Ig(11,"sh-icon"),jg(),$l()()),e&2&&(CE(2),vg("isClearable",false)("options",n.scheduleOptions),CE(),vg("ngModel",n.scheduleType()),_D(),CE(),cT(n.scheduleType()==="custom"?4:-1));},dependencies:[Bn,Ze,en$1,yt$1,Rn,Jt,Fe$1,J,N,v,Nt$2,I,hi],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.schedule-summary[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1rem;border:.0625rem solid var(--base-4);border-radius:.5rem;background:var(--base-1)}.schedule-summary[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;gap:.5rem}.schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(6.25rem,1fr) 2fr;gap:.75rem}.schedule-summary[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--base-8)}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var _o=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],co=["[title]","[description]","[action]","*"];function uo(i,t){i&1&&jC(0,"Title");}function po(i,t){i&1&&(Qi$1(0,"sh-icon"),jC(1,"caret-down"),$l());}var ot=class i{isActive=D1(false);disableToggle=E1(false);ngOnInit(){this.disableToggle()&&this.isActive.set(true);}toggle(){this.isActive.set(!this.isActive());}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Kg("active",n.isActive());},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:co,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(aC(_o),Qi$1(0,"header")(1,"div",0)(2,"h3",1),Hg("click",function(){return n.disableToggle()||n.toggle()}),cC(3,0,null,uo,1,0),aT(5,po,2,0,"sh-icon"),$l(),cC(6,1),$l(),Qi$1(7,"div",2),cC(8,2),$l()(),Qi$1(9,"div",3),cC(10,3),$l()),e&2&&(CE(5),cT(n.disableToggle()?-1:5));},dependencies:[N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.25rem;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"]})};var mo=["textInput"];function Co(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",3)(1,"input",7),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.internalPath,o)||(a.internalPath=o),Pd(o)}),Hg("ngModelChange",function(){Od(e);let o=iC();return Pd(o.updateFilter())}),$l(),CD(),$l();}if(i&2){let e=iC();vg("options",e.fileGroupOptions())("isClearable",false)("selectMultiple",true),CE(),cm("ngModel",e.internalPath),_D();}}function go(i,t){if(i&1&&(Qi$1(0,"div",8),jC(1),$l()),i&2){let e=iC(2);CE(),im(e.currentExpressionOption()?.startsWith);}}function To(i,t){if(i&1&&(Qi$1(0,"div",9),jC(1),$l()),i&2){let e=iC(2);CE(),im(e.currentExpressionOption()?.endsWith);}}function So(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field",4)(1,"input",7,0),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.internalPath,o)||(a.internalPath=o),Pd(o)}),Hg("ngModelChange",function(){Od(e);let o=iC();return Pd(o.updateFilter())}),$l(),CD(),aT(3,go,2,1,"div",8),aT(4,To,2,1,"div",9),$l();}if(i&2){let e=iC();CE(),cm("ngModel",e.internalPath),_D(),CE(2),cT(e.currentExpressionOption()?.startsWith?.length?3:-1),CE(),cT(e.currentExpressionOption()?.endsWith?.length?4:-1);}}var Eo=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],fo=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Includes folders where name contains",value:"+FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Includes folder",value:"+Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Includes files where name contains",value:"+FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Include file extension",value:"+Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Include file groups",value:"+FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Zt=class i{#e=T(ve$1);path=E1.required();osType=E1();isNew=E1(false);pathChange=I1();remove=I1();internalPath=Ge$1("");pathType=Ge$1("-Expression");textInput=w1("textInput");currentExpressionOption=Nt$1(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=Ge$1(Eo);expressionOptions=Nt$1(()=>{let e=this.osType()==="Windows"?"\\":"/";return fo.map(n=>n.value==="-Folder"||n.value==="+Folder"?m$3(l({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?m$3(l({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?m$3(l({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?m$3(l({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?m$3(l({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?m$3(l({},n),{startsWith:"*.",endsWith:""}):m$3(l({},n),{startsWith:"",endsWith:""}))});pathEffect=za$1(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",o=this.osType()==="Windows",a=o?"\\":"/";e.startsWith("%")&&e.endsWith(a)||o&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e)),this.isNew()&&rE(()=>{this.focusInput();},{injector:this.#e});});focusInput(){let t=this.textInput()?.nativeElement;t&&(t.focus(),t.select());}updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&(t==="*"&&(t=""),this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`));}removeFilter(){this.remove.emit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&qg(n.textInput,mo,5),e&2&&fC();},inputs:{path:[1,"path"],osType:[1,"osType"],isNew:[1,"isNew"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["textInput",""],["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["boxPrefix",""],["boxSuffix",""]]},template:function(e,n){e&1&&(Qi$1(0,"sh-select",1)(1,"input",2),lm("ngModelChange",function(a){return UC(n.pathType,a)||(n.pathType=a),a}),Hg("ngModelChange",function(){return n.updateFilter()}),$l(),CD(),$l(),aT(2,Co,2,4,"sh-select",3)(3,So,5,3,"sh-form-field",4),Qi$1(4,"div",5),Hg("click",function(){return n.removeFilter()}),Qi$1(5,"sh-icon",6),jC(6,"x-circle"),$l()()),e&2&&(vg("options",n.expressionOptions())("isClearable",false),CE(),cm("ngModel",n.pathType),_D(),CE(),cT(n.currentExpressionOption()?.value=="-FileGroup"||n.currentExpressionOption()?.value=="+FileGroup"?2:3));},dependencies:[Bn,Ze,Rn,Jt,Nt$2,Fe$1,N],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"]})};var ho=["filtersContainer"],yo=()=>({updateOn:"blur",standalone:true});function No(i,t){i&1&&(Qi$1(0,"sh-icon",14),jC(1," warning "),$l());}function Fo(i,t){if(i&1){let e=vT();aT(0,No,2,0,"sh-icon",14),Qi$1(1,"button",15),Hg("click",function(){Od(e);let o=iC();return Pd(o.addFilter())}),Fg(2,3),Ig(3,"sh-icon"),jg(),$l();}if(i&2){let e=iC();cT(e.wrongConfiguration()?0:-1);}}function Do(i,t){i&1&&nC(0,2,1);}function Ao(i,t){i&1&&nC(0,2,2);}function Io(i,t){i&1&&(Qi$1(0,"p",12),nC(1,4),$l());}function Oo(i,t){i&1&&(Qi$1(0,"p",12),nC(1,5),$l());}function Po(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"textarea",16),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.bulkFilters,o)||(a.bulkFilters=o),Pd(o)}),Hg("ngModelChange",function(){Od(e);let o=iC();return Pd(o.saveBulkFilterEdit())}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),cm("ngModel",e.bulkFilters),vg("ngModelOptions",KC(2,yo)),_D();}}function Mo(i,t){if(i&1){let e=vT();Qi$1(0,"app-new-filter",18),Hg("pathChange",function(o){let a=Od(e).$index,_=iC(2);return Pd(_.updateFilterAt(o,a))})("remove",function(){let o=Od(e).$index,a=iC(2);return Pd(a.removeFilterAt(o))}),$l();}if(i&2){let e=t.$implicit,n=t.$index,o=iC(2);vg("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n);}}function Ro(i,t){if(i&1&&(Qi$1(0,"div",13,0),dT(2,Mo,1,3,"app-new-filter",17,lT),$l()),i&2){let e=iC();CE(2),fT(e.filters());}}var en=class i{#e=T(ve$1);filters=D1.required();osType=E1("");disableToggle=E1(true);bulkFilterEditMode=Ge$1(false);bulkFilters=Ge$1("");lastAddedIndex=Ge$1(null);filtersContainer=w1.required("filtersContainer");hasFilters=Nt$1(()=>this.filters().length>0);wrongConfiguration=Nt$1(()=>{let t=this.filters();if(t.length===0)return false;let e=t.findIndex(o=>o==="-*"||o==="-*.*"||o==="-**");if(e===-1)return false;let n=t.findIndex(o=>o.startsWith("+"));return n===-1||e<n});toggleBulkFilterEdit(){this.bulkFilterEditMode()?this.bulkFilterEditMode.set(false):(this.bulkFilters.set(this.filters().join(`
|
|
4
|
-
`)),this.bulkFilterEditMode.set(true));}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
5
|
-
`).map(n=>n.trim()).filter(n=>n!==""&&(n.startsWith("-")||n.startsWith("+"))),e=[...new Set(t)];this.filters.set(e),this.bulkFilterEditMode.set(false);}addFilter(){let t=this.filters(),e=t.length;this.filters.set([...t,"-*.lock"]),this.lastAddedIndex.set(e),rE(()=>{this.scrollToFilter(e);},{injector:this.#e});}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let n=e.querySelectorAll("app-new-filter");n[t]&&n[t].scrollIntoView({behavior:"smooth",block:"nearest"});}updateFilterAt(t,e){let o=[...this.filters()];o[e]=t,this.filters.set(o),this.lastAddedIndex.set(null);}removeFilterAt(t){let n=this.filters().filter((o,a)=>a!==t);this.filters.set(n),this.lastAddedIndex.set(null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&qg(n.filtersContainer,ho,5),e&2&&fC();},inputs:{filters:[1,"filters"],osType:[1,"osType"],disableToggle:[1,"disableToggle"]},outputs:{filters:"filtersChange"},decls:20,vars:5,consts:()=>{let t;t=$localize`Filters`;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*15:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*15:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let n;n=$localize`The filters will unconditionally exclude all files.`;let o;o=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let a;a=$localize`Customize your filters.`;let _;return _=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,o,a,_,[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["shTooltip",n,1,"warn"],["type","button","shButton","",1,"small",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[3,"path","osType","isNew"],[3,"pathChange","remove","path","osType","isNew"]]},template:function(e,n){e&1&&(Qi$1(0,"app-toggle-card",6),ql(1,7),Qi$1(2,"span"),nC(3,1),$l(),Ig(4,"div",8),aT(5,Fo,4,1),Qi$1(6,"sh-menu")(7,"button",9)(8,"sh-icon"),jC(9,"dots-three-vertical"),$l()(),ql(10,10),Qi$1(11,"button",11),Hg("click",function(){return n.toggleBulkFilterEdit()}),Fg(12,2),Ig(13,"sh-icon"),aT(14,Do,1,0)(15,Ao,1,0),jg(),$l(),Gl(),$l(),Gl(),aT(16,Io,2,0,"p",12)(17,Oo,2,0,"p",12),aT(18,Po,2,3,"sh-form-field")(19,Ro,4,0,"div",13),$l()),e&2&&(vg("disableToggle",n.disableToggle()),CE(5),cT(n.bulkFilterEditMode()?-1:5),CE(9),cT(n.bulkFilterEditMode()?14:15),CE(2),cT(n.bulkFilterEditMode()?17:16),CE(2),cT(n.bulkFilterEditMode()?18:19));},dependencies:[Bn,Ze,Rn,Jt,v,N,ve,Fe$1,at$1,ot,Zt],styles:["[_nghost-%COMP%]{display:block}.spacer[_ngcontent-%COMP%]{flex:1}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};function Lo(i,t){i&1&&(Qi$1(0,"div",24)(1,"sh-icon"),jC(2,"spinner"),$l(),Qi$1(3,"span"),nC(4,2),$l()());}function xo(i,t){if(i&1&&(Qi$1(0,"div",25)(1,"sh-icon"),jC(2,"warning"),$l(),Qi$1(3,"span"),jC(4),$l()()),i&2){let e=iC();CE(4),im(e.error());}}function vo(i,t){if(i&1&&(Qi$1(0,"div",31)(1,"dt"),Fg(2,20),Ig(3,"span",32),jg(),$l(),Qi$1(4,"dd"),jC(5),$l()(),Qi$1(6,"div",31)(7,"dt"),Fg(8,21),Ig(9,"span",32),jg(),$l(),Qi$1(10,"dd"),jC(11),$l()()),i&2){iC();let e=qC(0);CE(5),im(e.sites.personalLicensedUser),CE(6),im(e.sites.personalUnlicensedUser);}}function bo(i,t){if(i&1&&(dm(0),Qi$1(1,"div",26)(2,"section",29)(3,"h4"),nC(4,3),$l(),Qi$1(5,"dl")(6,"div")(7,"dt"),nC(8,4),$l(),Qi$1(9,"dd"),jC(10),$l()(),Qi$1(11,"div")(12,"dt"),nC(13,5),$l(),Qi$1(14,"dd"),jC(15),$l()(),Qi$1(16,"div")(17,"dt"),nC(18,6),$l(),Qi$1(19,"dd"),jC(20),$l()(),Qi$1(21,"div")(22,"dt"),nC(23,7),$l(),Qi$1(24,"dd"),jC(25),$l()(),Qi$1(26,"div",30)(27,"dt"),nC(28,8),$l(),Qi$1(29,"dd"),jC(30),$l()()()(),Qi$1(31,"section",29)(32,"h4"),nC(33,9),$l(),Qi$1(34,"dl")(35,"div")(36,"dt"),nC(37,10),$l(),Qi$1(38,"dd"),jC(39),$l()(),Qi$1(40,"div")(41,"dt"),nC(42,11),$l(),Qi$1(43,"dd"),jC(44),$l()(),Qi$1(45,"div",30)(46,"dt"),nC(47,12),$l(),Qi$1(48,"dd"),jC(49),$l()()()(),Qi$1(50,"section",29)(51,"h4"),nC(52,13),$l(),Qi$1(53,"dl")(54,"div")(55,"dt"),nC(56,14),$l(),Qi$1(57,"dd"),jC(58),$l()(),Qi$1(59,"div")(60,"dt"),nC(61,15),$l(),Qi$1(62,"dd"),jC(63),$l()(),Qi$1(64,"div")(65,"dt"),nC(66,16),$l(),Qi$1(67,"dd"),jC(68),$l()(),Qi$1(69,"div")(70,"dt"),nC(71,17),$l(),Qi$1(72,"dd"),jC(73),$l()(),aT(74,vo,12,2),Qi$1(75,"div")(76,"dt"),nC(77,18),$l(),Qi$1(78,"dd"),jC(79),$l()(),Qi$1(80,"div",30)(81,"dt"),nC(82,19),$l(),Qi$1(83,"dd"),jC(84),$l()()()()()),i&2){let e=WC(iC().counts());CE(10),im(e.users.licensed),CE(5),im(e.users.unlicensed),CE(5),im(e.users.sharedMailboxWithStorage),CE(5),im(e.users.sharedMailboxWithoutStorage),CE(5),im(e.users.total),CE(9),im(e.groups.unified),CE(5),im(e.groups.notUnified),CE(5),im(e.groups.total),CE(9),im(e.sites.group),CE(5),im(e.sites.classic),CE(5),im(e.sites.communication),CE(5),im(e.sites.personal),CE(),cT(e.sites.personalLicensedUser!==null&&e.sites.personalUnlicensedUser!==null?74:-1),CE(5),im(e.sites.other),CE(5),im(e.sites.total);}}var tn=class i{#e=T(d$1);data=E1();closed=I1();status=Ge$1("loading");error=Ge$1(null);counts=Ge$1(null);#t=za$1(()=>{let t=this.data(),e=t?.url,n=t?.sourcePrefix,o=t?.backupId??null;if(!e||!n){this.status.set("error"),this.error.set($localize`No URL provided`);return}this.status.set("loading"),this.#e.getOffice365Counts(e,n,o).subscribe({next:a=>{this.counts.set(a),this.status.set("success");},error:a=>{this.error.set(a?.message??$localize`Failed to load counts`),this.status.set("error");}});});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-office365-counts-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:1,consts:()=>{let t;t=$localize`Microsoft 365 tenant items found`;let e;e=$localize`Close`;let n;n=$localize`Loading counts…`;let o;o=$localize`Users`;let a;a=$localize`Licensed`;let _;_=$localize`Unlicensed`;let c;c=$localize`Shared mailbox (with storage)`;let u;u=$localize`Shared mailbox (without storage)`;let E;E=$localize`Total`;let D;D=$localize`Groups`;let F;F=$localize`Unified`;let R;R=$localize`Not unified`;let G;G=$localize`Total`;let I;I=$localize`Sites`;let J;J=$localize`Group`;let z;z=$localize`Classic`;let q;q=$localize`Communication`;let Z;Z=$localize`Personal`;let B;B=$localize`Other`;let fe;fe=$localize`Total`;let de;de=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPAN: Licensed users `;let Ce;return Ce=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPAN: Unlicensed users `,[t,e,n,o,a,_,c,u,E,D,F,R,G,I,J,z,q,Z,B,fe,de,Ce,[1,"title-30"],["content",""],[1,"state","loading"],[1,"state","error"],[1,"counts"],["footer",""],["shButton","","type","button",3,"click"],[1,"group"],[1,"total"],[1,"sub"],[1,"indent"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",22),nC(2,0),$l()(),Qi$1(3,"section",23),aT(4,Lo,5,0,"div",24)(5,xo,5,1,"div",25)(6,bo,85,16,"div",26),$l(),Qi$1(7,"footer",27)(8,"button",28),Hg("click",function(){return n.closed.emit()}),nC(9,1),$l()()),e&2){let o;CE(4),cT((o=n.status())==="loading"?4:o==="error"?5:o==="success"?6:-1);}},dependencies:[v,N],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 0}.state.loading[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1s linear infinite}.state.error[_ngcontent-%COMP%]{color:var(--color-danger, #c0392b)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.counts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.group[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .5rem}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;gap:.25rem;margin:0}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.25rem 0;border-bottom:1px solid var(--color-border, #e0e0e0)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{border-bottom:none}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.total[_ngcontent-%COMP%]{font-weight:700}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.sub[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666);font-size:.9em}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.sub[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{font-weight:500}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary, #666)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-weight:600}footer[_ngcontent-%COMP%]{z-index:1}"]})};var yt=class i{data=E1();closed=I1();path=Ge$1("");isValid=Nt$1(()=>this.path().length>0);dataEffect=za$1(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath);});submit(){this.closed.emit(this.path()||null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:4,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Full disk source`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this disk `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","destinationUrl"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(Qi$1(0,"header")(1,"h3",3),nC(2,0),$l()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),lm("ngModelChange",function(a){return UC(n.path,a)||(n.path=a),a}),$l(),CD(),$l()(),Qi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Hg("click",function(){return n.submit()}),nC(10,2),$l()()),e&2&&(CE(4),vg("customRemoteMode","diskimage")("destinationUrl","diskimage://"),CE(),cm("ngModel",n.path),_D(),CE(4),vg("disabled",!n.isValid()));},dependencies:[v,Se,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};function nn(i,t,e){return i??t??e}function Fi(i,t){return t?i.sourceDescription??i.description:i.description}var wo=[[["","displayName",""]],[["","description",""]],"*"],Go=["[displayName]","[description]","*"];function $o(i,t){if(i&1&&jC(0),i&2){iC(2);let e=qC(1);Ql(" ",e.Name," ");}}function ko(i,t){if(i&1&&jC(0),i&2){iC(2);let e=qC(0);Ql(" ",e.displayName," ");}}function Uo(i,t){i&1&&(Qi$1(0,"sh-chip",6),jC(1,"Untested"),$l());}function Vo(i,t){i&1&&(Qi$1(0,"sh-chip",6),jC(1,"Special"),$l());}function Bo(i,t){i&1&&(Qi$1(0,"sh-chip",7),jC(1,"Deprecated"),$l());}function Ko(i,t){if(i&1&&jC(0),i&2){iC();let e=qC(16);Ql(" ",e," ");}}function Jo(i,t){if(i&1&&jC(0),i&2){let e=iC(2);Ql(" ",e.description()," ");}}function Xo(i,t){if(i&1&&(Qi$1(0,"sh-card",0)(1,"div",1),Ig(2,"img",2),$l(),Qi$1(3,"div",3)(4,"div",4),cC(5),$l(),Qi$1(6,"div",5),aT(7,$o,1,1)(8,ko,1,1),aT(9,Uo,2,0,"sh-chip",6)(10,Vo,2,0,"sh-chip",6)(11,Bo,2,0,"sh-chip",7),$l()(),Qi$1(12,"div",8)(13,"div",4),cC(14,1),$l(),Qi$1(15,"div",5),dm(16),aT(17,Ko,1,1)(18,Jo,1,1),$l()(),Qi$1(19,"div",9),cC(20,2),$l()()),i&2){let e=iC(),n=qC(0),o=qC(1);vg("variant",e.variant()),CE(2),vg("src",n.icon,Zp),yg("alt",n.displayName),CE(5),cT(o&&o.Name?7:8),CE(2),cT((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),CE(7);let a=WC(e.getSimplePath(o?.BaseUrl));CE(),cT(a&&a.length>0?17:18);}}var pt=class i{destination=E1();targetUrl=E1();variant=E1("type-b");connectionStringId=E1();showAsSource=E1(false);#e=T(ut);connectionString=Nt$1(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=Nt$1(()=>{let t=this.targetUrl();return t?V(t)??null:null});destinationFromTargetUrl=Nt$1(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,sourceDescription:t.sourceDescription??null,icon:t.icon}:null});destinationItem=Nt$1(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});description=Nt$1(()=>{let t=this.destinationItem();return t?Fi(t,this.showAsSource()):""});getSimplePath(t){return t?h(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"],showAsSource:[1,"showAsSource"]},ngContentSelectors:Go,decls:3,vars:3,consts:[[3,"variant"],[1,"icon"],[3,"src"],[1,"name"],[1,"projected"],[1,"default"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,n){if(e&1&&(aC(wo),dm(0)(1),aT(2,Xo,21,7,"sh-card",0)),e&2){let o=WC(n.destinationItem());CE(),WC(n.connectionString()),CE(),cT(o?2:-1);}},dependencies:[f,D],styles:['[_nghost-%COMP%]{display:block;border-radius:var(--shape-3)}[_nghost-%COMP%]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}']})};var mt=class i{#e=T(m$1);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=Ie(e.Key);if(n.length<=1){let o=G(e.Key);return o.isDefaultEntry===true?[m$3(l({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||"",sourceDescription:nn(o.sourceDescription,e.Description,o.description)})]:m$3(l({},o),{sourceDescription:nn(o.sourceDescription,e.Description,o.description)})}else return n.map(o=>m$3(l({},o),{sourceDescription:nn(o.sourceDescription,e.Description,o.description)}))}).filter(e=>e!==null)}#n(t){return t.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,sourceDescription:e.sourceDescription??null,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=Nt$1(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=Nt$1(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=Nt$1(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=Nt$1(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(n=>n.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function zo(i,t){if(i&1){let e=vT();Qi$1(0,"input",8),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Pd(o)}),$l(),CD();}if(i&2){let e=iC();cm("ngModel",e.destinationSearchTerm),_D();}}function Ho(i,t){if(i&1){let e=vT();Qi$1(0,"input",9),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Pd(o)}),$l(),CD();}if(i&2){let e=iC();cm("ngModel",e.destinationSearchTerm),_D();}}function Wo(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list-item",10),Hg("click",function(){let o=Od(e).$implicit,a=iC();return Pd(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),Qi$1(1,"button",11),Fg(2,1),Ig(3,"sh-icon"),jg(),$l()();}if(i&2){let e=t.$implicit,n=iC();vg("destination",e)("showAsSource",n.showAsSources());}}var on=class i{#e=T(mt);#t=T(m$1);showAsSources=E1(false);moduleType=E1("Backend");setDestination=I1();destinationSearchTerm=Ge$1("");showAllDestinations=Ge$1(false);destinationTypeOptions=Nt$1(()=>{switch(this.moduleType()){case "SourceProvider":return this.#e.sourceProviderOptions();case "RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=Nt$1(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(_=>{let c=t.find(u=>u.Key==_.key);return c&&(_=m$3(l({},_),{sortOrder:c.IsDeprecated?-1:c.IsUntested?-3:_.sortOrder})),_}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((_,c)=>{let u=_.sortOrder??0,E=c.sortOrder??0;return u!==E?E-u:_.displayName.localeCompare(c.displayName)}).filter(_=>{if(o)return true;let c=_.sortOrder??0;return c<0&&n?.length&&(_.key.toLocaleLowerCase()===n.toLocaleLowerCase()||_.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?true:c>=0});return n?a.filter(_=>_.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:9,vars:2,consts:()=>{let t;t=$localize`Search for remote source...`;let e;e=$localize`Search for destination...`;let n;n=$localize`Show all`;let o;return o=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[n,o,[1,"search-area"],["type","text","placeholder",t,3,"ngModel"],["type","text","placeholder",e,3,"ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination","showAsSource"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["type","text","placeholder",e,3,"ngModelChange","ngModel"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination","showAsSource"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(Qi$1(0,"div",2)(1,"sh-form-field"),aT(2,zo,1,1,"input",3)(3,Ho,1,1,"input",4),$l(),Qi$1(4,"sh-toggle",5),lm("checkedChange",function(a){return UC(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),nC(5,0),$l()(),Qi$1(6,"div",6),dT(7,Wo,4,2,"app-destination-list-item",7,lT),$l()),e&2&&(CE(2),cT(n.showAsSources()?2:3),CE(2),cm("checked",n.showAllDestinations),CE(3),fT(n.destinationTypeOptionsFocused()));},dependencies:[pt,Bn,Ze,Rn,Jt,Fe$1,v,N,J],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem;min-height:250px}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding:.25rem .375rem 1rem;width:calc(100% + .5rem);margin-left:-.375rem;border-bottom:.0625rem solid var(--base-4)}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}"]})};var jo=["fileInput"],qo=[[["label"]]],Yo=["label"],Qo=["ngProjectAs","label",5,["label"]],an=class i{customId=E1();content=Ge$1("");readonly=Ge$1(false);placeholder=E1($localize`Drop a file here or use the browse button`);fileInputRef=w1("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0]);}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0]);}onDragOver(t){t.preventDefault();}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result);},e.readAsText(t);}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),false}onChange=()=>{};onTouched=()=>{};onChangeEffect=za$1(()=>{this.onChange(this.content());});writeValue(t){this.content.set(t??"");}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&qg(n.fileInputRef,jo,5),e&2&&fC();},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[YC([{provide:D$1,useExisting:i,multi:true}])],ngContentSelectors:Yo,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,n){if(e&1){let o=vT();aC(qo),cC(0,0,Qo),Qi$1(1,"div",1)(2,"button",2),Hg("click",function(){return n.triggerBrowse()}),Qi$1(3,"sh-icon"),jC(4,"upload"),$l()()(),Qi$1(5,"div",3),Hg("drop",function(_){return n.onFileDrop(_)})("dragover",function(_){return n.onDragOver(_)}),Qi$1(6,"textarea",4),lm("ngModelChange",function(_){return Od(o),UC(n.content,_)||(n.content=_),Pd(_)}),$l(),CD(),$l(),Qi$1(7,"input",5,0),Hg("change",function(_){return n.onFileSelected(_)}),$l();}e&2&&(CE(6),vg("placeholder",n.placeholder()),cm("ngModel",n.content),vg("disabled",n.readonly()),_D());},dependencies:[Bn,Ze,Rn,Jt,N,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}']})};var rn=class i{data=E1();closed=I1();path=Ge$1("");destinationUrl=Ge$1("");backupId=Ge$1("");connectionStringId=Ge$1(null);isValid=Nt$1(()=>this.path().length>0);dataEffect=za$1(()=>{let t=this.data();t?.destinationUrl&&this.destinationUrl.set(t.destinationUrl),t?.backupId&&this.backupId.set(t.backupId),t?.connectionStringId&&this.connectionStringId.set(t.connectionStringId);});submit(){this.closed.emit(this.path()||null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-browse-path-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:8,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Select destination folder`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this folder `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","backupId","destinationUrl","connectionStringId","onlySelectFolder","selectFiles"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(Qi$1(0,"header")(1,"h3",3),nC(2,0),$l()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),lm("ngModelChange",function(a){return UC(n.path,a)||(n.path=a),a}),$l(),CD(),$l()(),Qi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Hg("click",function(){return n.submit()}),nC(10,2),$l()()),e&2&&(CE(4),vg("customRemoteMode","backend")("backupId",n.backupId())("destinationUrl",n.destinationUrl())("connectionStringId",n.connectionStringId())("onlySelectFolder",true)("selectFiles",false),CE(),cm("ngModel",n.path),_D(),CE(4),vg("disabled",!n.isValid()));},dependencies:[v,Se,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};var Zo=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),Fe=i=>({$implicit:i}),ea=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),ta=()=>({updateOn:"blur"}),na=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),Ge=(i,t)=>({fieldGroup:i,formView:t}),ia=()=>["/connect/logon"];function oa(i,t){i&1&&wg(0);}function aa(i,t){if(i&1&&cg(0,oa,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC();let o=pC(15);iC();let a=qC(0),_=qC(1);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,Fe,eb(2,Zo,n,e,a,_.oauthField)));}}function ra(i,t){i&1&&wg(0);}function sa(i,t){if(i&1&&cg(0,ra,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC();let o=pC(15);iC();let a=qC(0),_=qC(1);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,Fe,eb(2,ea,n,e,a,_.oauthField)));}}function la(i,t){if(i&1){let e=vT();Qi$1(0,"button",26),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.showTextArea.set(false))}),Fg(1,8),Ig(2,"sh-icon"),jg(),$l();}}function _a(i,t){if(i&1){let e=vT();Qi$1(0,"button",33,2),Hg("click",function(){let o=Od(e).$implicit,a=iC(3);return Pd(a.addAdvancedOption(o))}),jC(2),$l();}if(i&2){let e=t.$implicit;CE(2),Ql(" ",e.name," ");}}function da(i,t){if(i&1){let e=vT();Qi$1(0,"div",23)(1,"sh-menu",27)(2,"button",28),Fg(3,9),Ig(4,"sh-icon"),jg(),$l(),ql(5,29),dT(6,_a,3,1,"button",30,lT),Gl(),$l(),Qi$1(8,"sh-menu")(9,"button",31)(10,"sh-icon"),jC(11,"dots-three-vertical"),$l()(),ql(12,29),Qi$1(13,"button",32),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.showTextArea.set(true))}),Qi$1(14,"sh-icon"),jC(15,"link"),$l(),jC(16," Edit contents as text "),$l(),Gl(),$l()();}if(i&2){iC();let e=qC(9);CE(),vg("searchable",true),CE(),vg("disabled",e.length===0),CE(4),fT(e);}}function ca(i,t){if(i&1){let e=vT();Qi$1(0,"textarea",34),Hg("ngModelChange",function(o){Od(e);let a=iC(2);return Pd(a.updateSettingsFromText(o))}),$l(),CD();}if(i&2){let e=iC(2);vg("ngModel",e.settingsAsText())("ngModelOptions",KC(2,ta)),_D();}}function ua(i,t){i&1&&wg(0);}function pa(i,t){if(i&1&&cg(0,ua,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC(2);let o=pC(15),a=iC(),_=qC(0),c=qC(1),u=a.getFormView("advanced",e)??a.getDefaultFormView(e);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,Fe,eb(2,na,n,u,_,c.oauthField)));}}function ma(i,t){if(i&1&&dT(0,pa,1,9,"ng-container",null,lT),i&2){let e=iC(2);fT(e.advancedFormFieldNames());}}function Ca(i,t){i&1&&(Qi$1(0,"sup",43),jC(1,"*"),$l());}function ga(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Ta(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-tree",36)(1,"label",42),aT(2,Ca,2,0,"sup",43),jC(3),aT(4,ga,2,1,"sh-icon",44),$l(),Qi$1(5,"input",45),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);vg("startingPath",a)("accepts",e.formView.accepts)("showFiles",true)("hideShortcuts",false)("showHiddenNodes",true)("selectFiles",true)("resolvePaths",true),CE(),vg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("id",c)("ngModel",o),_D();}}function Sa(i,t){i&1&&(Qi$1(0,"sup",46),jC(1,"*"),$l());}function Ea(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function fa(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-tree",37)(1,"label",42),aT(2,Sa,2,0,"sup",46),jC(3),aT(4,Ea,2,1,"sh-icon",44),$l(),Qi$1(5,"input",45),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);vg("hideShortcuts",false)("enableCreateFolder",true)("startingPath",a)("resolvePaths",true),CE(),vg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("id",c)("ngModel",o),_D();}}function ha(i,t){i&1&&(Qi$1(0,"sup",47),jC(1,"*"),$l());}function ya(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Na(i,t){i&1&&(Qi$1(0,"sh-icon",48),jC(1," warning "),$l());}function Fa(i,t){i&1&&wg(0);}function Da(i,t){if(i&1&&(Qi$1(0,"sh-icon",53),jC(1," link "),$l()),i&2){iC();let e=qC(8),n=qC(9);Kg("error",e&&n==="error")("warn",e&&n==="warning"),vg("shTooltip",e);}}function Aa(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"envelope"),$l());}function Ia(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"hard-drives"),$l());}function Oa(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"jar"),$l());}function Pa(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"textbox"),$l());}function Ma(i,t){if(i&1){let e=vT();Qi$1(0,"button",54),Hg("click",function(o){Od(e);let a=iC(2).$implicit,_=iC(2);return Pd(_.browse(a.fieldGroup,a.formView.name,o))}),jC(1," Browse ... "),$l();}}function Ra(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,ha,2,0,"sup",47),jC(3),aT(4,ya,2,1,"sh-icon",44),aT(5,Na,2,0,"sh-icon",48),cg(6,Fa,1,0,"ng-container",25),$l(),Qi$1(7,"input",49),Hg("keydown",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),dm(8)(9),aT(10,Da,2,5,"sh-icon",50)(11,Aa,2,0,"sh-icon",51)(12,Ia,2,0,"sh-icon",51)(13,Oa,2,0,"sh-icon",51)(14,Pa,2,0,"sh-icon",51),aT(15,Ma,2,0,"button",52),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);iC();let u=pC(17),E=iC();CE(),vg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),cT(_&&e.formView.type==="Path"?5:-1),CE(),vg("ngTemplateOutlet",u)("ngTemplateOutletContext",JC(17,Fe,XC(14,Ge,e.fieldGroup,e.formView))),CE(),vg("type",e.formView.type==="Email"?"email":"text")("id",c)("ngModel",o),_D();let D=a,F=E.hasLeadingSlash(D??"");CE(),WC(F&&e.formView.doubleSlash?.message),CE(),WC(e.formView.doubleSlash?.type),CE(),cT(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14),CE(5),cT(e.formView.type==="Path"&&E.hasV2ListBackendOperations()?15:-1);}}function La(i,t){i&1&&(Qi$1(0,"sup",55),jC(1,"*"),$l());}function xa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function va(i,t){i&1&&wg(0);}function ba(i,t){if(i&1){let e=vT();Qi$1(0,"span",59),Hg("click",function(){Od(e);let o=iC(2).$implicit,a=iC(2);return Pd(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),jC(1," AuthID "),$l();}}function wa(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"password"),$l());}function Ga(i,t){if(i&1){let e=vT();Qi$1(0,"sh-icon",60),Hg("click",function(){Od(e);let o=iC(2).$implicit;return Pd(o.formView.showPassword=!o.formView.showPassword)}),jC(1," eye "),$l();}}function $a(i,t){if(i&1){let e=vT();Qi$1(0,"sh-icon",60),Hg("click",function(){Od(e);let o=iC(2).$implicit;return Pd(o.formView.showPassword=!o.formView.showPassword)}),jC(1," eye-slash "),$l();}}function ka(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,La,2,0,"sup",55),jC(3),aT(4,xa,2,1,"sh-icon",44),cg(5,va,1,0,"ng-container",25),$l(),Qi$1(6,"input",56),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),aT(7,ba,2,0,"span",57)(8,wa,2,0,"sh-icon",51),aT(9,Ga,2,0,"sh-icon",58)(10,$a,2,0,"sh-icon",58),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(14,Fe,XC(11,Ge,e.fieldGroup,e.formView))),CE(),vg("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",o),_D(),CE(),cT(e.oauthField===e.formView.name?7:8),CE(2),cT(e.formView.showPassword?9:10);}}function Ua(i,t){i&1&&(Qi$1(0,"sup",62),jC(1,"*"),$l());}function Va(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function Ba(i,t){i&1&&wg(0);}function Ka(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function Ja(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",61)(1,"label",42),aT(2,Ua,2,0,"sup",62),jC(3),aT(4,Va,2,1,"sh-icon",44),cg(5,Ba,1,0,"ng-container",25),$l(),Qi$1(6,"input",45),Hg("ngModelChange",function(o){Od(e);let a=iC(2).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),cg(7,Ka,1,2,"ng-template",null,3,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let E=pC(17);vg("options",n)("isClearable",false)("optionTemplate",e),CE(),vg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",E)("ngTemplateOutletContext",JC(14,Fe,XC(11,Ge,o.fieldGroup,o.formView))),CE(),vg("id",u)("ngModel",_),_D();}}function Xa(i,t){if(i&1&&(dm(0),aT(1,Ja,9,16)),i&2){let e=iC().$implicit,n=WC(iC(2).mapOptions(e.formView));CE(),cT(n?1:-1);}}function za(i,t){i&1&&(Qi$1(0,"sup",65),jC(1,"*"),$l());}function Ha(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function Wa(i,t){i&1&&wg(0);}function ja(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function qa(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",64)(1,"label",42),aT(2,za,2,0,"sup",65),jC(3),aT(4,Ha,2,1,"sh-icon",44),cg(5,Wa,1,0,"ng-container",25),$l(),Qi$1(6,"input",45),Hg("ngModelChange",function(o){Od(e);let a=iC(2).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),cg(7,ja,1,2,"ng-template",null,4,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let E=pC(17);vg("options",n)("asFreeText",true)("inlineSearch",true)("optionTemplate",e),CE(),vg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",E)("ngTemplateOutletContext",JC(15,Fe,XC(12,Ge,o.fieldGroup,o.formView))),CE(),vg("id",u)("ngModel",_),_D();}}function Ya(i,t){i&1&&Ig(0,"sh-progress-bar",63);}function Qa(i,t){if(i&1&&(dm(0),aT(1,qa,9,17)(2,Ya,1,0,"sh-progress-bar",63)),i&2){let e=iC().$implicit,n=qC(2),o=WC(iC(2).mapOptionsWithFreeText(e.formView,n));CE(),cT(o?1:2);}}function Za(i,t){i&1&&(Qi$1(0,"sup",67),jC(1,"*"),$l());}function er(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function tr(i,t){i&1&&wg(0);}function nr(i,t){if(i&1){let e=vT();Qi$1(0,"app-size",66),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),aT(2,Za,2,0,"sup",67),jC(3),aT(4,er,2,1,"sh-icon",44),cg(5,tr,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);vg("inputType",e.Name)("ngModel",o)("customId",_),_D(),CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,Fe,XC(9,Ge,e.fieldGroup,e.formView)));}}function ir(i,t){i&1&&(Qi$1(0,"sup",68),jC(1,"*"),$l());}function or(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function ar(i,t){i&1&&wg(0);}function rr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,ir,2,0,"sup",68),jC(3),aT(4,or,2,1,"sh-icon",44),cg(5,ar,1,0,"ng-container",25),$l(),Qi$1(6,"input",69),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"numpad"),$l()();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,Fe,XC(8,Ge,e.fieldGroup,e.formView))),CE(),vg("id",_)("ngModel",o),_D();}}function sr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function lr(i,t){i&1&&wg(0);}function _r(i,t){if(i&1){let e=vT();Qi$1(0,"sh-toggle",39)(1,"label",42),jC(2),aT(3,sr,2,1,"sh-icon",44),cg(4,lr,1,0,"ng-container",25),$l(),Qi$1(5,"input",70),Hg("change",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),$l()();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(5);iC();let _=pC(17),c=iC();CE(),vg("for",a),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?3:-1),CE(),vg("ngTemplateOutlet",_)("ngTemplateOutletContext",JC(9,Fe,XC(6,Ge,e.fieldGroup,e.formView))),CE(),vg("checked",c.isTrue(o));}}function dr(i,t){i&1&&(Qi$1(0,"sup",72),jC(1,"*"),$l());}function cr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function ur(i,t){i&1&&wg(0);}function pr(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function mr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",71)(1,"label",42),aT(2,dr,2,0,"sup",72),jC(3),aT(4,cr,2,1,"sh-icon",44),cg(5,ur,1,0,"ng-container",25),$l(),Qi$1(6,"input",73),Hg("ngModelChange",function(o){Od(e);let a=iC(2).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),cg(7,pr,1,2,"ng-template",null,5,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let E=pC(17);vg("options",n)("selectMultiple",true)("optionTemplate",e),CE(),vg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",E)("ngTemplateOutletContext",JC(13,Fe,XC(10,Ge,o.fieldGroup,o.formView))),CE(),vg("ngModel",_),_D();}}function Cr(i,t){if(i&1&&(dm(0),aT(1,mr,9,15)),i&2){let e=iC().$implicit,n=WC(iC(2).mapOptions(e.formView));CE(),cT(n?1:-1);}}function gr(i,t){i&1&&(Qi$1(0,"sup",74),jC(1,"*"),$l());}function Tr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Sr(i,t){i&1&&wg(0);}function Er(i,t){if(i&1){let e=vT();Qi$1(0,"app-timespan",66),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),aT(2,gr,2,0,"sup",74),jC(3),aT(4,Tr,2,1,"sh-icon",44),cg(5,Sr,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);vg("inputType",e.formView.name)("ngModel",o)("customId",_),_D(),CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,Fe,XC(9,Ge,e.fieldGroup,e.formView)));}}function fr(i,t){i&1&&(Qi$1(0,"sup",76),jC(1,"*"),$l());}function hr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function yr(i,t){i&1&&wg(0);}function Nr(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-drop-textarea",75),Hg("ngModelChange",function(o){Od(e);let a=iC().$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label"),aT(2,fr,2,0,"sup",76),jC(3),aT(4,hr,2,1,"sh-icon",44),cg(5,yr,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(2),o=qC(4),a=qC(5);iC();let _=pC(17);vg("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),_D(),CE(2),cT(e.formView.isMandatory&&o?2:-1),CE(),Ql(" ",e.formView.shortDescription??e.formView.name," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",_)("ngTemplateOutletContext",JC(11,Fe,XC(8,Ge,e.fieldGroup,e.formView)));}}function Fr(i,t){i&1&&(Ig(0,"sh-spinner"),Qi$1(1,"span"),nC(2,10),$l()),i&2&&Yg("--spinner-size","16px")("--spinner-thickness","2px");}function Dr(i,t){if(i&1){let e=vT();Qi$1(0,"div",79)(1,"span"),nC(2,11),$l(),Qi$1(3,"button",32),Hg("click",function(){Od(e);let o=iC(6);return Pd(o.reloadTrigger.set(!o.reloadTrigger()))}),nC(4,12),$l()();}}function Ar(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function Ir(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",80)(1,"label",42)(2,"sup",81),jC(3,"*"),$l(),Qi$1(4,"span"),nC(5,13),$l()(),Qi$1(6,"input",45),Hg("ngModelChange",function(o){Od(e);let a=iC(4).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),cg(7,Ar,1,2,"ng-template",null,6,lb);}if(i&2){iC(4);let e=qC(2),n=qC(5),o=iC(2);vg("options",o.restoreBackupIdOptions())("isClearable",false),CE(),vg("for",n),CE(5),vg("id",n)("ngModel",e),_D();}}function Or(i,t){if(i&1&&aT(0,Fr,3,4)(1,Dr,5,0,"div",79)(2,Ir,9,5),i&2){let e=iC(5);cT(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2);}}function Pr(i,t){i&1&&(Qi$1(0,"sup",82),jC(1,"*"),$l());}function Mr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(4).$implicit;vg("shTooltip",e.formView.longDescription);}}function Rr(i,t){i&1&&wg(0);}function Lr(i,t){if(i&1){let e=vT();Qi$1(0,"button",84),Hg("click",function(){Od(e),iC(4);let o=qC(5),a=iC(2);return Pd(a.toggleDisabled(o))}),Fg(1,14),Ig(2,"sh-icon"),jg(),$l();}}function xr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,Pr,2,0,"sup",82),jC(3),aT(4,Mr,2,1,"sh-icon",44),cg(5,Rr,1,0,"ng-container",25),$l(),Qi$1(6,"input",83),Hg("ngModelChange",function(o){Od(e);let a=iC(3).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"textbox"),$l()(),aT(9,Lr,3,0,"button",41);}if(i&2){let e=iC(3).$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17),u=iC();CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,Fe,XC(12,Ge,e.fieldGroup,e.formView))),CE(),vg("type","text")("id",_)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",true),_D(),CE(3),cT(u.getIsDisabled(_)?9:-1);}}function vr(i,t){if(i&1&&(Qi$1(0,"div",77),aT(1,Or,3,1)(2,xr,10,17),$l()),i&2){let e=iC(4);CE(),cT(e.isRestoreFlow()?1:2);}}function br(i,t){if(i&1){let e=vT();Qi$1(0,"div",85),Fg(1,15),Ig(2,"div")(3,"div"),jg(),$l(),Qi$1(4,"button",84),Hg("click",function(){Od(e);let o=iC(5);return Pd(o.openConsole())}),Fg(5,16),Ig(6,"sh-icon"),jg(),$l();}}function wr(i,t){i&1&&(Qi$1(0,"div",85),nC(1,17),$l(),Qi$1(2,"button",86),Fg(3,18),Ig(4,"sh-icon"),jg(),$l()),i&2&&(CE(2),vg("routerLink",KC(1,ia)));}function Gr(i,t){if(i&1&&(Qi$1(0,"div",78),aT(1,br,7,0)(2,wr,5,2),$l()),i&2){let e=iC(4);CE(),cT(e.isConnectedToConsole()?1:2);}}function $r(i,t){if(i&1&&aT(0,vr,3,1,"div",77)(1,Gr,3,1,"div",78),i&2){let e=iC(3);cT(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1);}}function kr(i,t){i&1&&(Qi$1(0,"sup",87),jC(1,"*"),$l());}function Ur(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function Vr(i,t){i&1&&wg(0);}function Br(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,kr,2,0,"sup",87),jC(3),aT(4,Ur,2,1,"sh-icon",44),cg(5,Vr,1,0,"ng-container",25),$l(),Qi$1(6,"input",88),Hg("ngModelChange",function(o){Od(e);let a=iC(2).$implicit,_=iC(2);return Pd(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"textbox"),$l(),Qi$1(9,"button",89),Hg("click",function(){Od(e);let o=iC(4);return Pd(o.authenticateFilen())}),nC(10,19),$l()();}if(i&2){let e=iC(2).$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17),u=iC();CE(),vg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,Fe,XC(9,Ge,e.fieldGroup,e.formView))),CE(),vg("id",_)("ngModel",o),_D(),CE(3),vg("disabled",u.isAuthenticatingFilen());}}function Kr(i,t){if(i&1&&aT(0,Br,11,14,"sh-form-field"),i&2){let e=iC(3);cT(e.hasFilenApiKey()?-1:0);}}function Jr(i,t){if(i&1){let e=vT();Qi$1(0,"button",84),Hg("click",function(){Od(e);let o=iC().$implicit,a=iC(2);return Pd(a.removeAdvancedOption(o.formView.name))}),Qi$1(1,"sh-icon"),jC(2,"x-circle"),$l()();}}function Xr(i,t){if(i&1&&(Qi$1(0,"div",35),dm(1)(2)(3)(4)(5),aT(6,Ta,6,13,"app-file-tree",36)(7,fa,6,10,"app-file-tree",37)(8,Ra,16,19,"sh-form-field")(9,ka,11,16,"sh-form-field")(10,Xa,2,2)(11,Qa,3,2)(12,nr,6,14,"app-size",38)(13,rr,9,13,"sh-form-field")(14,_r,6,11,"sh-toggle",39)(15,Cr,2,2)(16,Er,6,14,"app-timespan",38)(17,Nr,6,13,"app-file-drop-textarea",40)(18,$r,2,1)(19,Kr,1,1),aT(20,Jr,3,0,"button",41),$l()),i&2){let e=t.$implicit;iC();let n=qC(0),o=iC();Kg("single-field",e.fieldGroup!=="advanced"),CE(),WC(e.formView.shortDescription??e.formView.name),CE(),WC(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),CE();let a=WC(o.getFieldValue(e.fieldGroup,e.formView.name));CE(),WC((a??"").toString().trim()===""),CE(),WC("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),CE(),cT(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),CE(14),cT(e.fieldGroup==="advanced"?20:-1);}}function zr(i,t){if(i&1&&(Qi$1(0,"sh-icon",90),jC(1,"x-circle"),$l()),i&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function Hr(i,t){if(i&1&&(Qi$1(0,"sh-icon",91),jC(1,"warning"),$l()),i&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function Wr(i,t){if(i&1&&(dm(0),aT(1,zr,2,1,"sh-icon",90)(2,Hr,2,1,"sh-icon",91)),i&2){let e=iC().$implicit,n=qC(0),o=WC(e.formView.validate(n));CE(),cT(o?.type==="error"?1:o?.type==="warning"?2:-1);}}function jr(i,t){if(i&1&&(dm(0),aT(1,Wr,3,2)),i&2){let e=t.$implicit,o=(WC(iC(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";CE(),cT(!o&&e.formView.validate?1:-1);}}function qr(i,t){if(i&1&&(dm(0),dT(1,aa,1,9,"ng-container",null,lT),dT(3,sa,1,9,"ng-container",null,lT),Qi$1(5,"sh-toggle-card",20),ql(6,21)(7),nC(8,7),Gl(),dm(9),aT(10,la,3,0,"button",22)(11,da,17,2,"div",23),Gl(),aT(12,ca,1,3,"textarea",24)(13,ma,2,0),$l(),cg(14,Xr,21,9,"ng-template",null,0,lb)(16,jr,2,2,"ng-template",null,1,lb)),i&2){let e=iC(),n=qC(1);WC(e.destinationForm()),CE(),fT(n.custom),CE(2),fT(n.dynamic),CE(2),vg("disableToggle",true),CE(4),WC(e.nonSelectedAdvancedFormViews()),CE(),cT(e.showTextArea()?10:11),CE(2),cT(e.showTextArea()?12:13);}}var sn=class i{#e=T(Ve);#t=T(m$1);#n=T(O);#i=T(mt);#o=T(C);#r=T(d$1);#a=T(be);injector=T(ve$1);targetUrl=D1.required();useBackupState=E1(false);#s=null;destinationType=Nt$1(()=>{let t=this.targetUrl();if(!t)return null;let e=V(t);return this.#s=e?.customKey??e?.key,this.#s});refreshView=Ge$1(false);destinationForm=Ge$1({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Nt$1(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=Ge$1(null);showTextArea=Ge$1(false);hasV2ListBackendOperations=this.#t.hasV2ListBackendOperations;isLoadingRestoreBackupIdOptions=Ge$1(false);isRestoreFlow=Nt$1(()=>!this.useBackupState());reloadTrigger=Ge$1(false);hasLoadedBackupIdOptions=Ge$1(false);restoreBackupIdOptions=L$1(Ty(F$1(this.targetUrl).pipe(ay(),pt$1(t=>({url:t,isReload:false}))),F$1(this.reloadTrigger).pipe(pt$1(()=>({url:this.targetUrl(),isReload:true})))).pipe(Qu(({url:t,isReload:e})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()&&(e||!this.hasLoadedBackupIdOptions())?(this.hasLoadedBackupIdOptions.set(true),this.isLoadingRestoreBackupIdOptions.set(true),this.#r.getDuplicatiStorageBackups(t).pipe(Hs$1(a=>(console.error("Error loading Duplicati storage backups",a),iy([]))),zu(()=>this.isLoadingRestoreBackupIdOptions.set(false)))):iy([]))),{initialValue:[]});isConnectedToConsole=Nt$1(()=>this.#o.state()==="connected");hasStorageApiKey=Nt$1(()=>{let t=this.destinationForm();return (this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});isAuthenticatingFilen=Ge$1(false);hasFilenApiKey=Nt$1(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=Nt$1(()=>{let t=this.destinationFormConfig();if(!t)return [];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=za$1(()=>{let t=this.targetUrl(),e=V(t??""),n=e.key,o=e.customKey??n,a=this.#i.allModules().find(G=>G.Key===n)??{DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!n)return;let _=e&&e.oauthField?e.oauthField:null,c=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],D=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],F={destinationType:o,oauthField:_,custom:[],dynamic:[],advanced:[]};c&&Object.entries(c).forEach(([G,I],J)=>{let z=I.order??J,q=I.validate;!q&&I.type==="Bucketname"&&(q=Z=>Re(Z)?null:{type:"error",message:$localize`Invalid bucket name.`}),q&&I.type==="Hostname"&&(q=Z=>We(Z)?null:{type:"error",message:$localize`Invalid hostname.`}),F.custom.push(l({order:900+z,validate:q},I));});for(let G=0;G<a.Options.length;G++){let I=a.Options[G];if(I.Deprecated)continue;let J=u.find(z=>z===I.Name||I.Aliases?.includes(z.name)||z.name===I.Name);if(J){let z=I.Aliases?.indexOf(J.name)??-1,q=I.Aliases&&z>-1?I.Aliases[z]:I.Name,Z=J&&typeof J!="string";Z?J?.defaultValue??I.DefaultValue:I.DefaultValue;let fe=Z&&J?.order!==void 0?J.order:G,de={name:q,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,order:900+fe},Ce=Z?l(l({},de),J):de;F.dynamic.push(Ce);}else {let z=I.Name;if(D.find(V=>V===z))continue;let Z=E.find(V=>V===z||V.name===z),B=Z&&typeof Z!="string",fe=B&&Z?.order!==void 0?Z.order:G,de={name:z,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,defaultValue:I.DefaultValue,order:900+fe},Ce=B?l(l({},de),Z):de;F.advanced.push(Ce);}}if(F.custom.sort((G,I)=>G.order-I.order),F.dynamic.sort((G,I)=>G.order-I.order),F.advanced.sort((G,I)=>G.order-I.order),this.destinationFormConfig.set(F),!t)return;let R=xe(t);R&&this.destinationForm.set({custom:R.custom,dynamic:R.dynamic,advanced:R.advanced});});destinationFormEffect=za$1(()=>{let t=this.#s,e=this.destinationForm();this.refreshView();if(!e||!t)return;let o=Be({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o);});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return {name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??false}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(l({},e));}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}onKeyDown(t,e,n,o){if(n==="Hostname"||n==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,n){let o=this.destinationForm();o[t][e]=n,this.destinationForm.set(l({},o));}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(l({},e));}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let n=t.options;return n?n.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let n=this.mapOptions(t);return n?(e&&e.length>0&&(n.find(a=>a.value===e)||n.push({key:e,value:e})),n):null}#l=Ge$1(false);browse(t,e,n){let o=this.useBackupState()?this.#e.backupId():null,a=this.useBackupState()?this.#e.connectionStringId():null;this.#a.open(rn,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{backupId:o,destinationUrl:this.targetUrl(),connectionStringId:a}}).closed.subscribe(c=>{c&&(c=c.replace(/^\/+/,""),this.destinationForm.update(u=>(u[t][e]=c,l({},u))));});}oauthStartTokenCreation(t,e,n,o){this.#l.set(true);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let I=this.#e.mapFormsToSettings().find(J=>J.Name==="--oauth-url")?.Value;I&&I.length>0&&(a=I);}let c=this.destinationForm().advanced["oauth-url"];c&&c.length>0&&(a=c);let u=`${a}?type=${t}`,E=450,D=600,F=screen.width/2-E/2,R=screen.height/2-D/2,G=window.open(u,"_blank","height="+D+",width="+E+",menubar=0,status=0,titlebar=0,toolbar=0,left="+F+",top="+R);return window.addEventListener("message",I=>{let J=I.data.startsWith("authid:"),z=J?I.data.replace("authid:",""):null;J&&(this.destinationForm.update(q=>(q[e][n]=z,l({},q))),this.#l.set(false),this.refreshView.set(!this.refreshView()),G?.close());}),false}settingsAsText=Nt$1(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,n])=>{let o=e??"",a="";return typeof n=="boolean"?a=this.isTrue(n)?"True":"False":(typeof n=="number"||n!=null)&&(a=n.toString()),`${o}=${a}`}).join(`
|
|
6
|
-
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Te(t);this.destinationForm.update(n=>m$3(l({},n),{advanced:e}));}getIsDisabled(t){return document.getElementById(t)?.disabled??true}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled);}openConsole(){this.#o.openConsole();}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(true),this.#r.getFilenApiKey(t,e).pipe(zu(()=>this.isAuthenticatingFilen.set(false))).subscribe({next:n=>{if(n.length===0){this.#a.open(h$1,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=n,o.dynamic["two-factor-code"]=null,l({},o))),this.refreshView.set(!this.refreshView());},error:n=>{console.error("Error authenticating Filen",n),this.#a.open(h$1,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${n.message}`,confirmText:$localize`OK`}});}});}authenticateFilen(){let t=this.targetUrl();if(!t)return;let n=this.destinationForm().advanced["api-key"];if(n&&n.length>0){this.#a.open(h$1,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:o=>{if(o){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString());}}});return}this.#_(t);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let _;_=$localize`This field is mandatory`;let c;c=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let u;u=$localize`This field is mandatory`;let E;E=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let F;F=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let G;G=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let J;J=$localize`This field is mandatory`;let z;z=$localize`Loading available backups...`;let q;q=$localize`No backups found from this machine, contact support`;let Z;Z=$localize` Try again `;let B;B=$localize`This field is mandatory`;let fe;fe=$localize`Pick the backup to restore from`;let de;de=$localize`This field is mandatory`;let Ce;Ce=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let V;V=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,V=oC(V);let He;He=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let $e;$e=$localize`Connect to the console to use Duplicati storage.`;let Y;Y=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Tt;Tt=$localize`This field is mandatory`;let St;return St=$localize` Authenticate now `,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,z,q,Z,fe,Ce,V,He,$e,Y,St,[1,"advanced-options",3,"disableToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles","resolvePaths"],[3,"hideShortcuts","enableCreateFolder","startingPath","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",_],["shTooltip",c,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["suffix","","shButton","","type","button",1,"outlined","small","browse"],["prefix","",3,"shTooltip"],["suffix","","shButton","","type","button",1,"outlined","small","browse",3,"click"],["shTooltip",u],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",E],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",D],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",F],["shTooltip",R],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",G],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",I],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",J],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",B],["shTooltip",de],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shTooltip",Tt],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["suffix","","shButton","","type","button",1,"outlined","small",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,n){if(e&1&&(dm(0)(1),aT(2,qr,18,5)),e&2){let o=WC(n.destinationType());CE();let a=WC(n.destinationFormConfig());CE(),cT(o&&a?2:-1);}},dependencies:[Gn,Ze,en$1,Rn,Bn,Jt,ei,_t,Se,Ct$1,Mt,an,Fe$1,v,N,I,ve,Nt$2,at$1,J,d,m$2],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}.no-backups-found[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:4px;margin-right:4px}.browse[_ngcontent-%COMP%]{padding:.25rem}"]})};var ln=class i{#e=T(C$1);#t=T(be);#n=T(m$1);testDestination(t,e,n,o,a,_,c,u,E){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,_,c,u,E):this.testDestinationv1(t,e,n,o,a,_,c,u,E)}testDestinationv2(t,e,n,o,a,_,c,u,E){return new S(D=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:u==="create",ReadOnlyTest:E,Options:null,DestinationType:_,SourcePrefix:e=="new"?null:o}}).subscribe({next:F=>{if(F.Success){this.emitSuccessV2(D,t,a,F);return}this.handleGenericError(D,t,a,F.Error??"Unknown error",c);},error:F=>{let R=F?.error?.body??F?.error?.requestBody;if(R?.Data?.FolderExists===false||R?.StatusCode==="missing-folder"){this.handleMissingFolder(D,t,e,n,a,c,u,E);return}if(R?.Data?.HostCertificate){this.handleMissingCertificate(D,t,a,R.Data?.HostCertificate,c);return}if(R?.Data?.ReportedHostKey){this.handleIncorrectKey(D,t,a,R.Data.ReportedHostKey,R.Data.AcceptedHostKey??null,c);return}this.handleGenericError(D,t,a,F?.message??"Unknown error",c);}});})}testDestinationv1(t,e,n,o,a,_,c,u,E){return new S(D=>{this.#e.postApiV1RemoteoperationTest({readOnlyTest:E,requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o},type:_}).subscribe({next:F=>{D.next({action:"success",targetUrl:t,testAgain:false,destinationIndex:a}),D.complete();},error:F=>{this.handleDestinationErrorv1(F.message,t,e,n,a,c,u,E).subscribe(R=>{D.next(R);});}});})}handleMissingFolder(t,e,n,o,a,_,c,u){function E(){t.next({action:"missing-folder",targetUrl:e,testAgain:false,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete();}if(_||c==="error"){E();return}this.#t.open(h$1,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:D=>{if(!D){this.reportNoAction(t,e,a,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:true,ReadOnlyTest:u,Options:null,BackupId:n=="new"?null:n}}).subscribe({next:F=>{if(F.Success){this.emitSuccessV2(t,e,a,F);return}else this.handleFolderCreateFailure(t,e,a,F.Error??$localize`Unknown error`);},error:F=>{this.handleFolderCreateFailure(t,e,a,F.message??$localize`Unknown error`);}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:n=="new"?null:n}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a);},error:F=>{this.handleFolderCreateFailure(t,e,a,F.message??$localize`Unknown error`);}});}});}handleFolderCreateFailure(t,e,n,o){this.#t.open(h$1,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n}),t.complete();}});}emitSuccessV2(t,e,n,o){t.next({action:"success",targetUrl:e,testAgain:false,destinationIndex:n,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete();}handleFolderCreated(t,e,n){this.#t.open(h$1,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:true,destinationIndex:n}),t.complete();}});}reportNoAction(t,e,n,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:false,destinationIndex:n}),t.complete();}handleMissingCertificate(t,e,n,o,a){let _=$localize`The server is using a certificate that is not trusted.
|
|
7
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
8
|
-
The server reported the certificate hash: ${o}`,c=e.includes("?");function u(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${c?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:true,certData:o,errorMessage:_,destinationIndex:n}),t.complete();}if(a){u();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:_,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:E=>{if(!E){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}u();}});}handleIncorrectKey(t,e,n,o,a,_){if(a){let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:E,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
9
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
10
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
11
|
-
with the REPORTED host key: ${o}?`,E=e;try{let R=new URL(e);R.searchParams.set("ssh-fingerprint",o),E=R.toString();}catch{let R=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),G=R.includes("?");E=R+`${G?"&":"?"}ssh-fingerprint=${o}`;}if(_){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:R=>{if(!R){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}else {let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${E?"&":"?"}ssh-fingerprint=${o}`,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,E=e.includes("?");if(_){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:F=>{if(!F){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}}handleGenericError(t,e,n,o,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n,errorMessage:o}),t.complete();}if(a){_();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:c=>_()});}handleDestinationErrorv1(t,e,n,o,a,_,c,u){return new S(E=>{if(t==="missing-folder"){this.handleMissingFolder(E,e,n,o,a,_,c,u);return}if(t.startsWith("incorrect-cert:")){let D=t.split("incorrect-cert:")[1];this.handleMissingCertificate(E,e,a,D,_);return}if(t.startsWith("incorrect-host-key:")){let D=t.split('incorrect-host-key:"')[1].split('",')[0],F=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(E,e,a,D,F,_);return}this.handleGenericError(E,e,a,t,_);})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function Yr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",13),Fg(1,0),Qi$1(2,"button",14),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.testDestinationClick())}),$l(),jg(),$l();}}function Qr(i,t){i&1&&(Qi$1(0,"sh-alert",13),Fg(1,1),Ig(2,"sh-icon"),Qi$1(3,"div",15),Ig(4,"sh-spinner"),$l(),jg(),$l()),i&2&&(CE(4),Yg("--spinner-size","16px")("--spinner-thickness","2px"));}function Zr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,2),$l());}function es(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,3),$l());}function ts(i,t){if(i&1&&aT(0,Zr,2,0,"sh-alert",17)(1,es,2,0,"sh-alert",16),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:1);}}function ns(i,t){i&1&&(Qi$1(0,"sh-alert",18),nC(1,4),$l());}function is(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,5),$l());}function os(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,6),$l());}function as(i,t){if(i&1&&aT(0,ns,2,0,"sh-alert",18)(1,is,2,0,"sh-alert",16)(2,os,2,0,"sh-alert",17),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function rs(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,7),$l());}function ss(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,8),$l());}function ls(i,t){if(i&1&&aT(0,rs,2,0,"sh-alert",17)(1,ss,2,0,"sh-alert",16),i&2){let e=iC(4);cT(e.testResponse()?.anyFilesFound?0:1);}}function _s(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,9),$l());}function ds(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,10),$l());}function cs(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,11),$l());}function us(i,t){if(i&1&&aT(0,_s,2,0,"sh-alert",17)(1,ds,2,0,"sh-alert",17)(2,cs,2,0,"sh-alert",17),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function ps(i,t){if(i&1&&aT(0,ts,2,1)(1,as,3,1)(2,ls,2,1)(3,us,3,1),i&2){let e=iC(3);cT(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3);}}function ms(i,t){if(i&1){let e=vT();Fg(0,12,1),Qi$1(1,"button",14),Hg("click",function(){Od(e);let o=iC(4);return Pd(o.createFolder())}),$l(),jg();}}function Cs(i,t){if(i&1&&(Qi$1(0,"sh-alert",16),Fg(1,12),aT(2,ms,2,0,"button",19),jg(),$l()),i&2){let e=iC(3);CE(2),cT(e.askToCreate()?2:-1);}}function gs(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.useSuggestedUrl())}),jC(3,"Approve"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Ts(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.useSuggestedUrl())}),jC(3,"Approve"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Ss(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.testDestinationClick())}),jC(3,"Test again"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Es(i,t){if(i&1&&aT(0,ps,4,1)(1,Cs,3,1,"sh-alert",16)(2,gs,4,1,"sh-alert",16)(3,Ts,4,1,"sh-alert",16)(4,Ss,4,1,"sh-alert",16),i&2){let e=iC(2);cT(e.testResponse()?.action==="success"?0:e.testResponse()?.action==="missing-folder"?1:e.testResponse()?.action==="trust-cert"?2:e.testResponse()?.action==="approve-host-key"?3:e.testResponse()?.action==="generic-error"?4:-1);}}function fs(i,t){if(i&1&&aT(0,Yr,3,0,"sh-alert",13)(1,Qr,5,4,"sh-alert",13)(2,Es,5,1),i&2){let e=iC();cT(e.testSignal()===null?0:e.testSignal()==="testing"?1:2);}}var _n=class i{#e=T(ln);targetUrl=D1.required();testSignal=D1.required();connectionStringId=E1(null);backupId=E1.required();sourcePrefix=E1.required();suppressErrorDialogs=E1.required();askToCreate=E1.required();readOnlyTest=E1.required();testExpectation=E1.required();moduleType=E1.required();testResponse=Nt$1(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=Nt$1(()=>{let t=this.targetUrl();return !(!t||!xe(t))});prevTargetUrl=null;targetUrlEffect=za$1(()=>{let t=this.targetUrl(),e=this.prevTargetUrl;t!==e&&(this.prevTargetUrl=t,this.testSignal()!=="testing"&&e!==null&&this.testSignal.set(null));});useSuggestedUrl(){let t=this.targetUrl(),e=this.testSignal(),n=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return !t||!o||n!==t||(this.targetUrl.set(o),this.testDestinationClick()),false}createFolder(){return this.testDestination(true),false}testDestinationClick(){return this.testDestination(false),false}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let n=t?"create":this.askToCreate()?"prompt":"error";return new Promise(o=>{this.#e.testDestination(e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let _=a.suggestedUrl;_&&this.targetUrl.set(_),this.testSignal.set("testing"),this.#e.testDestination(_??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:c=>{this.testSignal.set(c),o(c);}});}else this.testSignal.set(a),o(a);}});})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],connectionStringId:[1,"connectionStringId"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],suppressErrorDialogs:[1,"suppressErrorDialogs"],askToCreate:[1,"askToCreate"],readOnlyTest:[1,"readOnlyTest"],testExpectation:[1,"testExpectation"],moduleType:[1,"moduleType"]},outputs:{targetUrl:"targetUrlChange",testSignal:"testSignalChange"},decls:1,vars:1,consts:()=>{let t;t=$localize` Make sure to test the configuration ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON:Test now${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV: Testing connection... ${"\uFFFD#4\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`;let n;n=$localize`Success! Test completed, backup found.`;let o;o=$localize`No backup found at the specified destination.`;let a;a=$localize` The remote destination already contains a backup. Please use a different folder for each backup. `;let _;_=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let c;c=$localize`Success! Test completed, destination is empty.`;let u;u=$localize`Success! Test completed, destination contains files.`;let E;E=$localize`The remote destination is empty.`;let D;D=$localize`Success! Test completed, backup found.`;let F;F=$localize`Success! Test completed, destination contains files.`;let R;R=$localize`Success! Test completed, destination is empty.`;let G;return G=$localize` The specified folder does not exist. ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:Create now${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_BUTTON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:`,[t,e,n,o,a,_,c,u,E,D,F,R,G,[1,"simple","primary"],["shButton","",1,"primary","small",3,"click"],[1,"testing"],[1,"simple","warn"],[1,"simple","success"],[1,"simple","error"],["shButton","",1,"primary","small"]]},template:function(e,n){e&1&&aT(0,fs,3,1),e&2&&cT(n.isExpectedValidTargetUrl()?0:-1);},dependencies:[ue,v,N,m$2],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"]})};function hs(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list",10),Hg("setDestination",function(o){Od(e);let a=iC();return Pd(a.setDestination(o))}),$l();}if(i&2){let e=iC();vg("showAsSources",true)("moduleType",e.moduleType());}}function ys(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list-item",11)(1,"button",8),Hg("click",function(){Od(e);let o=iC();return Pd(o.removeDestination())}),nC(2,3),$l()(),Qi$1(3,"app-test-url",12),lm("targetUrlChange",function(o){Od(e);let a=iC();return UC(a.targetUrlModel,o)||(a.targetUrlModel=o),Pd(o)})("testSignalChange",function(o){Od(e);let a=iC();return UC(a.testSignal,o)||(a.testSignal=o),Pd(o)}),$l(),Qi$1(4,"app-single-destination",13),lm("targetUrlChange",function(o){Od(e);let a=iC();return UC(a.targetUrlModel,o)||(a.targetUrlModel=o),Pd(o)}),$l();}if(i&2){let e=iC();vg("targetUrl",e.targetUrlModel()),CE(3),cm("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),vg("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",true)("moduleType",e.moduleType()),CE(),cm("targetUrl",e.targetUrlModel);}}function Ns(i,t){i&1&&nC(0,2,1);}function Fs(i,t){i&1&&nC(0,2,2);}function Ds(i,t){i&1&&nC(0,2,3);}function As(i,t){i&1&&nC(0,2,4);}var Nt=class i{data=E1();closed=I1();targetUrlModel=Ge$1(null);moduleType=Ge$1("Backend");askToCreate=Ge$1(false);expectedResult=Ge$1("any");suppressErrorDialogs=Ge$1(false);backupId=Ge$1(null);sourcePrefix=Ge$1(null);dataEffect=za$1(()=>{let t=this.data();t?.targetUrlModel&&this.targetUrlModel.set(t.targetUrlModel),t?.moduleType&&this.moduleType.set(t.moduleType),t?.askToCreate!==null&&t?.askToCreate!==void 0&&this.askToCreate.set(t.askToCreate),t?.expectedResult&&this.expectedResult.set(t.expectedResult),t?.suppressErrorDialogs!==null&&t?.suppressErrorDialogs!==void 0&&this.suppressErrorDialogs.set(t.suppressErrorDialogs),t?.backupId&&this.backupId.set(t.backupId),t?.sourcePrefix&&this.sourcePrefix.set(t.sourcePrefix);});testSignal=Ge$1(null);setTargetUrl(t,e=false){this.targetUrlModel.set(t);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.setTargetUrl(n,true);return}this.setTargetUrl(`${t}://`,true);}}submit(){this.closed.emit(this.targetUrlModel());}removeDestination(){this.setTargetUrl(null,true);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-target-url-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:15,vars:6,consts:()=>{let t;t=$localize`Remote source`;let e;e=$localize`Cancel`;let n;n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Use storage destination ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE_IF: Use remote source ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Use remote destination ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_ELSE: Use remote URL ${"\uFFFD/*14:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=oC(n);let o;return o=$localize`Change`,[t,e,n,o,[1,"title-30"],["content",""],[3,"showAsSources","moduleType"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[3,"setDestination","showAsSources","moduleType"],[1,"current-destination",3,"targetUrl"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",4),nC(2,0),$l()(),Qi$1(3,"section",5),aT(4,hs,1,2,"app-destination-list",6),aT(5,ys,5,11),$l(),Qi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Hg("click",function(){return n.submit()}),Fg(10,2),aT(11,Ns,1,0)(12,Fs,1,0)(13,Ds,1,0)(14,As,1,0),jg(),$l()()),e&2){let o=!!n.targetUrlModel();CE(4),cT(o?-1:4),CE(),cT(o?5:-1),CE(4),Kg("loading",n.testSignal()==="testing"),vg("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),CE(2),cT(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14);}},dependencies:[sn,on,pt,v,_n],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};var Is=["formRef"],Os=()=>({updateOn:"blur",standalone:true}),hn=()=>({standalone:true});function Ps(i,t){if(i&1){let e=vT();Qi$1(0,"button",41),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.openLocalDiskDialog())}),Fg(1,12),Ig(2,"sh-icon"),jg(),$l();}}function Ms(i,t){if(i&1){let e=vT();aT(0,Ps,3,0,"button",40),Qi$1(1,"button",41),Hg("click",function(){Od(e);let o=iC();return Pd(o.openRemoteDestinationDialog())}),Fg(2,11),Ig(3,"sh-icon"),jg(),$l();}if(i&2){let e=iC();cT(e.isLocalDiskSupported()?0:-1);}}function Rs(i,t){i&1&&nC(0,7,1);}function Ls(i,t){i&1&&nC(0,7,2);}function xs(i,t){i&1&&(Qi$1(0,"p",34),nC(1,13),$l());}function vs(i,t){i&1&&(Qi$1(0,"p",34),nC(1,14),$l());}function bs(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"textarea",42),lm("ngModelChange",function(o){Od(e);let a=iC();return UC(a.bulkPaths,o)||(a.bulkPaths=o),Pd(o)}),Hg("ngModelChange",function(){Od(e);let o=iC();return Pd(o.savePathBulkEdit())}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),cm("ngModel",e.bulkPaths),vg("ngModelOptions",KC(2,Os)),_D();}}function ws(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field",46)(1,"input",47),lm("ngModelChange",function(o){Od(e);let a=iC(3);return UC(a.editingPath,o)||(a.editingPath=o),Pd(o)}),$l(),CD(),$l(),Qi$1(2,"button",24),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.updatePath())}),Qi$1(3,"sh-icon"),jC(4,"floppy-disk"),$l()(),Qi$1(5,"button",24),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.cancelEditPath())}),Qi$1(6,"sh-icon"),jC(7,"x-bold"),$l()();}if(i&2){let e=iC(3);CE(),cm("ngModel",e.editingPath),vg("ngModelOptions",KC(2,hn)),_D();}}function Gs(i,t){if(i&1){let e=vT();Qi$1(0,"button",50),Hg("click",function(){Od(e);let o=iC(3).$implicit,a=iC(2);return Pd(a.openOffice365Counts(o))}),Qi$1(1,"sh-icon"),jC(2,"info"),$l()();}}function $s(i,t){if(i&1&&(Qi$1(0,"sh-chip"),Ig(1,"img",48),jC(2),$l(),aT(3,Gs,3,0,"button",49)),i&2){let e=iC(2).$implicit,n=iC(2);CE(),vg("src",n.getBackendIcon(e),Zp),CE(),Ql(" ",n.getRemotePathDisplayName(e)," "),CE(),cT(e.includes("|office365://")?3:-1);}}function ks(i,t){if(i&1&&(Qi$1(0,"sh-form-field",46),Ig(1,"input",51),CD(),$l()),i&2){let e=iC(2).$implicit;yg("readonly",true),CE(),vg("ngModel",e)("ngModelOptions",KC(3,hn)),_D();}}function Us(i,t){if(i&1){let e=vT();aT(0,$s,4,3)(1,ks,2,4,"sh-form-field",46),Qi$1(2,"button",24),Hg("click",function(){Od(e);let o=iC().$implicit,a=iC(2);return Pd(a.editPath(o))}),Qi$1(3,"sh-icon"),jC(4,"pen"),$l()(),Qi$1(5,"button",24),Hg("click",function(){Od(e);let o=iC().$implicit,a=iC(2);return Pd(a.removePath(o))}),Qi$1(6,"sh-icon"),jC(7,"trash-simple"),$l()();}if(i&2){let e=iC().$implicit;cT(e.startsWith("@")?0:1);}}function Vs(i,t){if(i&1&&(Qi$1(0,"div",43),aT(1,ws,8,3)(2,Us,8,1),$l()),i&2){let e=t.$implicit,n=iC(2);CE(),cT(n.oldPath()===e?1:2);}}function Bs(i,t){if(i&1){let e=vT();dT(0,Vs,3,1,"div",43,lT),Qi$1(2,"div",39)(3,"sh-form-field"),Ig(4,"input",44),CD(),$l(),Qi$1(5,"button",45),Hg("click",function(){Od(e);let o=iC();return Pd(o.addNewPath())}),Qi$1(6,"sh-icon"),jC(7,"plus"),$l()()();}if(i&2){let e=iC();fT(e.nonFilterPaths()),CE(4),vg("formControl",e.newPathCtrl),_D();}}function Ks(i,t){if(i&1){let e=vT();Qi$1(0,"div",39)(1,"app-size",52),Hg("ngModelChange",function(o){Od(e);let a=iC();return Pd(a.updateFilesLargerThan(o))}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),vg("ngModel",e.filesLargerThan())("ngModelOptions",KC(2,hn)),_D();}}var Ct=new jn,Di=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>Ct.group({path:Ct.control(i.path),excludes:Ct.group({filesLargerThan:Ct.group({size:Ct.control(null),unit:Ct.control(null)})})}),fn=class i{#e=T(Ve);#t=T(be);#n=T(ee);#i=T(W);#o=T(m$1);#r=T(d$1);formRef=w1.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new L("");filesLargerThan=Nt$1(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=L$1(this.sourceDataForm.controls.path.valueChanges);pathArray=Nt$1(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=Nt$1(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=Ge$1(null);editingPath=Ge$1(null);addingNewPath=Ge$1(false);bulkPathEditMode=Ge$1(false);bulkPaths=Ge$1("");mobileMenuOpen=Ge$1(false);backupId=this.#e.backupId();isLocalDiskSupported=Nt$1(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=Ge$1([]);#a=za$1(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e);});openRemoteDestinationDialog(){this.#t.open(Nt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),o=e.split("://")[0],_=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(_);});}openLocalDiskDialog(){this.#t.open(yt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${n}|diskimage://${e}`;this.addPath(a);});}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(false);else {let t=this.nonFilterPaths()?.join(`
|
|
12
|
-
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(true);}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
13
|
-
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),n=[...t,...e],o=[...new Set(n)].join("\0");this.sourceDataForm.controls.path.setValue(o);}editPath(t){if(t&&t.startsWith("@")){let e=t.split("|");if(e.length!==2)return;e[1].startsWith("diskimage://")?this.editLocalDiskSource(t,e[0],e[1].substring(12)):this.editTargetUrlPath(t,e[0],e[1]);return}this.oldPath.set(t),this.editingPath.set(t);}editLocalDiskSource(t,e,n){this.#t.open(yt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|diskimage://${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}editTargetUrlPath(t,e,n){this.#t.open(Nt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:n,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}updateFilesLargerThan(t){let{size:e,unit:n}=pn(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n});}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null);}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null);}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),o=n.indexOf(t);if(o===-1)return;n.splice(o,1);let a=n.filter(_=>_&&_!=="").join("\0");this.sourceDataForm.controls.path.setValue(a);}addPath(t){let n=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}updateFilters(t){let n=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return "";let e=t.split("|")[1];return Ee(e)}getRemotePathDisplayName(t){if(!t)return "";let e=t.split("|")[1];return Le(e)}openOffice365Counts(t){if(!t||!t.startsWith("@"))return;let e=t.split("|");if(e.length!==2||!e[1].startsWith("office365://"))return;let n=e[0],o=e[1];this.#t.open(tn,{maxWidth:"500px",width:"100%",closeOnOutsideClick:true,data:{url:o,sourcePrefix:n,backupId:this.backupId}});}toggleFilesLargerThan(t){t?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null});}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let o=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(o),this.newPathCtrl.setValue("");}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Is,5),e&2&&fC();},decls:57,vars:18,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Source Data`;let n;n=$localize`Folder path`;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let _;_=$localize`Options`;let c;c=$localize`Paths`;let u;u=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*41:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*41:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*42:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*42:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let E;E=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let F;F=$localize` Files larger than `;let R;R=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let I;I=$localize`Manually add a path.`;let J;J=$localize`Edit paths as text, one per line.`;let z;z=$localize`Add a direct path`;let q;q=$localize`Edit path`;let Z;return Z=$localize`Show item counts`,[["formRef",""],e,n,o,a,_,c,u,E,D,F,R,G,I,J,[3,"submit","formGroup"],[1,"left"],[1,"header-row"],[1,"title-30"],["shButton","","type","button",1,"small","ghost","mobile-menu-toggle",3,"click"],[1,"fill",3,"multiSelect","startingPath","showFiles","showUnrootedSources","backupId"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","submit",1,"raised","primary","small"],[1,"right"],[1,"mobile-header"],["shButton","","type","button",1,"small","ghost",3,"click"],[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["description",""],[1,"paths"],[3,"filtersChange","filters","osType"],["formGroupName","excludes",3,"disableToggle"],[1,"raised","primary",3,"checkedChange","checked"],[1,"row-inputs"],["shButton","","type","button",1,"small","rowbutton"],["shButton","","type","button",1,"small","rowbutton",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",z,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",q,3,"ngModelChange","ngModel","ngModelOptions"],["alt","Provider icon",1,"provider-icon",3,"src"],["shButton","","type","button","title",Z,1,"small"],["shButton","","type","button","title",Z,1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=vT();Qi$1(0,"form",15,0),Hg("submit",function(){return n.next()}),Qi$1(2,"div",16)(3,"div",17)(4,"h3",18),nC(5,1),$l(),Qi$1(6,"button",19),Hg("click",function(){return n.mobileMenuOpen.set(true)}),Qi$1(7,"sh-icon"),jC(8,"sliders"),$l()()(),Qi$1(9,"app-file-tree",20)(10,"label",21),nC(11,2),$l(),Ig(12,"input",22),CD(),$l(),Qi$1(13,"div",23)(14,"button",24),Hg("click",function(){return n.goBack()}),Fg(15,3),Ig(16,"sh-icon"),jg(),$l(),Qi$1(17,"button",25),Fg(18,4),Ig(19,"sh-icon"),jg(),$l()()(),Qi$1(20,"div",26)(21,"div",27)(22,"span",18),nC(23,5),$l(),Qi$1(24,"button",28),Hg("click",function(){return n.mobileMenuOpen.set(false)}),Qi$1(25,"sh-icon"),jC(26,"x-bold"),$l()()(),Qi$1(27,"app-toggle-card",29),ql(28,30),Qi$1(29,"span"),nC(30,6),$l(),Ig(31,"div",31),aT(32,Ms,4,1),Qi$1(33,"sh-menu")(34,"button",32)(35,"sh-icon"),jC(36,"dots-three-vertical"),$l()(),ql(37,33),Qi$1(38,"button",24),Hg("click",function(){return n.togglePathBulkEdit()}),Fg(39,7),Ig(40,"sh-icon"),aT(41,Rs,1,0)(42,Ls,1,0),jg(),$l(),Gl(),$l(),Gl(),aT(43,xs,2,0,"p",34)(44,vs,2,0,"p",34),Qi$1(45,"div",35),aT(46,bs,2,3,"sh-form-field")(47,Bs,8,1),$l()(),Qi$1(48,"app-filters",36),lm("filtersChange",function(_){return Od(o),UC(n.filters,_)||(n.filters=_),Pd(_)}),Hg("filtersChange",function(_){return n.updateFilters(_)}),$l(),Qi$1(49,"app-toggle-card",37),ql(50,30),nC(51,8),Gl(),Qi$1(52,"p",34),nC(53,9),$l(),Qi$1(54,"sh-toggle",38),Hg("checkedChange",function(_){return n.toggleFilesLargerThan(_)}),nC(55,10),$l(),aT(56,Ks,2,3,"div",39),$l()()();}e&2&&(vg("formGroup",n.sourceDataForm),CE(9),vg("multiSelect",true)("startingPath",n.getPath())("showFiles",true)("showUnrootedSources",true)("backupId",n.backupId),CE(3),_D(),CE(8),Kg("open",n.mobileMenuOpen()),CE(7),vg("disableToggle",true),CE(5),cT(n.bulkPathEditMode()?-1:32),CE(9),cT(n.bulkPathEditMode()?41:42),CE(2),cT(n.bulkPathEditMode()?44:43),CE(3),cT(n.bulkPathEditMode()?46:47),CE(2),cm("filters",n.filters),vg("osType",n.osType()??""),CE(),vg("disableToggle",true),CE(5),vg("checked",n.filesLargerThan()!==null),CE(2),cT(n.filesLargerThan()?56:-1));},dependencies:[Bn,Tn$1,Ze,Rn,Pn,Jt,Gn,ln$1,gn,hn$1,ft,Fe$1,N,v,J,ve,en,Se,ot,Ct$1,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}@media only screen and (max-width:768px){form[_ngcontent-%COMP%]{display:block;position:relative}}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-header[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}}.mobile-menu-toggle[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-menu-toggle[_ngcontent-%COMP%]{display:inline-flex}}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{border-right:none;padding:1.5rem 1.5rem 4.5rem;height:100%;width:100%}}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}@media only screen and (max-width:768px){.right[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:10;background:var(--base-1);padding:1.5rem;transform:translate(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.right.open[_ngcontent-%COMP%]{transform:translate(0)}}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.path[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content min-content min-content;gap:.25rem;align-items:center}.path[_ngcontent-%COMP%] sh-chip[_ngcontent-%COMP%]{width:100%}.path[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.5rem}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.paths[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};var Ai="1W:1D,4W:1W,12M:1M",yn=false,dn=(i,t,e,n)=>({uiKey:x$1(),url:i,connectionStringId:t,urlKey:e,save:n}),Ve=class i{#e=T(ee);#t=T(m$1);#n=T(be);#i=T(C$1);#o=T(O);#r=T(Yt);#a=T(ut);generalForm=Ii();sourceDataForm=Di();scheduleFields=En();scheduleType=Ge$1("daily");settings=Ge$1([]);optionsFields={backupRetention:Ge$1("all"),backupRetentionTime:Ge$1(""),backupRetentionVersions:Ge$1(0),backupRetentionCustom:Ge$1("")};targetUrls=Ge$1([]);targetUrlModel=Nt$1(()=>this.targetUrls()[0]?.url??null);connectionStringId=Nt$1(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=Ge$1(null);backupMetadata=Ge$1(null);isDraft=Ge$1(false);backupId=Ge$1(null);backupName=Nt$1(()=>this.generalFormSignal()?.name??"");isSubmitting=Ge$1(false);finishedLoading=Ge$1(false);backupDefaults=Ge$1(null);applicationOptions=Ge$1(null);isNew=Nt$1(()=>this.backupId()==="new");shouldAutoSave=Nt$1(()=>!this.isDraft()&&!this.isNew());osType=Nt$1(()=>this.#t.systemInfo()?.OSType);isSyncMode=Nt$1(()=>this.generalForm.controls.operationType.value==="Sync");isConnectionStringSaved=Nt$1(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):false});selectedOptions=Ge$1([]);sourceDataFormSignal=L$1(this.sourceDataForm.valueChanges);generalFormSignal=L$1(this.generalForm.valueChanges);encryptionFieldSignal=L$1(this.generalForm.controls.encryption.valueChanges);operationTypeFieldSignal=L$1(this.generalForm.controls.operationType.valueChanges);advancedOptions=Nt$1(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=Ge$1(null);#l=null;testSignal=this.#s.asReadonly();#_=za$1(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&this.#s.set(null);});#C=za$1(()=>{this.targetUrlModel();let e=this.connectionStringId();if(e){let n=this.#a.destinations();if(n.length===0)return;let o=n.find(a=>a.ID===e);!o||o.BaseUrl;}});setTestState(t){this.#s.set(t);}#u(t){return {name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=Nt$1(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return [gt,...t]});nonSelectedOptions=Nt$1(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=false){this.isSubmitting.set(true),this.#p().pipe(Qu(e=>{let n=this.#d(),o=this.backupId(),a=n;if(a.Backup){e.length>0&&e[0]!==null?n.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(n.Backup.ConnectionStringID=void 0);let c=this.targetUrls().slice(1).map((u,E)=>{let D=e[E+1];return {TargetUrl:u.url,ConnectionStringID:D??void 0,UrlKey:u.urlKey}});c.length>0&&(a.Backup.AdditionalTargetURLs=c);}return this.isDraft()&&n.Backup&&(n.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}):this.#i.putApiV1BackupById({id:o,requestBody:n})}),zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{t||this.exit(false);},error:()=>{}});}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#d(),e=(t.Backup.Name??"").trim()!=="",a=(!(this.generalForm.controls.operationType.value==="Sync")&&this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===false||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!a)return this.#n.open(h$1,{data:{title:$localize`Validation Error`,message:this.isNew()?$localize`Please fix the errors indicated before creating the backup.`:$localize`Please fix the errors indicated before saving.`,confirmText:$localize`OK`}}),"general";let _=this.targetUrls();if(!(_.length>0&&_.some(E=>E.url.trim()!=="")))return this.#n.open(h$1,{data:{title:$localize`Destination required`,message:this.isNew()?$localize`You must setup a destination before creating the backup.`:$localize`Please setup a destination before saving.`,confirmText:$localize`OK`}}),"destination";var u=(t.Backup.Sources??[]).filter(E=>E.trim()!=="").length>0;return !u||!this.sourceDataForm.valid?(this.#n.open(h$1,{data:{title:$localize`Source data required`,message:this.isNew()?$localize`You must setup source data before creating the backup.`:$localize`Please add at least one source path before saving.`,confirmText:$localize`OK`}}),"source"):""}exit(t){if(!t){this.#c(),this.#e.navigate(["/"]);return}this.#n.open(h$1,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#e.navigate(["/"]));}});}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(_=>`${_.Include?"+":"-"}${_.Expression}`)??[],o=t.Settings?.find(_=>_.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:pn(o)}};this.sourceDataForm.patchValue(a);}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[dn(n,o,null,!!o)]:[],_=e.AdditionalTargetURLs?.map(c=>dn(c.TargetUrl,c.ConnectionStringID??null,c.UrlKey??null,!!c.ConnectionStringID))??[];this.targetUrls.set([...a,..._]);}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",{encryptionDisabled:o,encryptionModule:a,passphrase:_}=fi(t.Settings),c=t.OperationType??"Backup",u={name:t.Name??"",description:t.Description??"",operationType:c};e&&e!==""&&(u.name=e),n&&n!==""&&(u.description=n),o?u.encryption=gt.Key:a&&(u.encryption=a),u.password=_,u.repeatPassword=_,this.generalForm.patchValue(u);}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(false);return}let e=this.#r.fromString(t.Repeat)??null,n=this.#m(t.Time);this.scheduleFields.autoRun.set(true),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??false),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??false),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??false),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??false),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??false),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??false),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??false);let o=ht(this.scheduleFields),a=Qt.find(_=>JSON.stringify(_.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom");}mapOptionsToForms(t,e=false){let n=["--no-encryption","--skip-files-larger-than","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(u=>u);if(e){let u=this.#o.serverSettings()??{};Object.keys(u).filter(E=>E.startsWith("--")).forEach(E=>{o.find(F=>F.Name===E)||o.push({Name:E,Value:u[E],Filter:null});});}let a=o.filter(u=>!n.includes(u.Name)),_=o.filter(u=>n.includes(u.Name));this.settings.set(a??[]),a?.forEach(u=>{if(u.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(u.Value??"")});var c="all";_?.forEach(u=>{if(u.Name==="keep-time"&&(u.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(u.Value??"");if(u.Name==="keep-versions"&&(u.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(u.Value?parseInt(u.Value):null);if(u.Name==="retention-policy"&&(u.Value??"")!=="")if(u.Value===Ai)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(u.Value??"")}),this.optionsFields.backupRetention.set(c);}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null);}getScheduleFormValue(){let t=ht(this.scheduleFields);return Ni(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],_=a?.url??null,c=n.path?.split("\0")??[],u=this.mapFormsToSettings(),E=n.excludes?.filesLargerThan;return E&&E.size!==null&&E.unit!==null&&u.push({Name:"--skip-files-larger-than",Value:`${E.size}${E.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:_??null,ConnectionStringID:a?.connectionStringId??null,OperationType:t.operationType??"Backup",Sources:c.filter(D=>!(D.startsWith("-")||D.startsWith("+"))),Settings:u,Filters:c.filter(D=>D.startsWith("-")||D.startsWith("+")).map((D,F)=>({Order:F,Include:D.startsWith("+"),Expression:D.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(F=>`--${F}`)],a=[{Name:"--no-encryption",Value:"True"}];!(e.operationType==="Sync")&&e.encryption!==""&&e.encryption!==gt.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let c=n.map(F=>{let R=this.settings().find(G=>G.Name===F||G.Name==="--"+F);return R?{Name:F,Value:R.Value}:null}).filter(F=>F!==null),u=[];if(!this.isSyncMode())switch(this.optionsFields.backupRetention()){case "time":u.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case "versions":u.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case "custom":u.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case "smart":u.push({Name:"retention-policy",Value:Ai});break}let E=[...t,...o],D=this.settings().filter(F=>!E.includes(F.Name)).map(F=>{let R=F.Value;return typeof F.Value=="number"&&(R=F.Value.toString()),typeof F.Value=="boolean"&&(R=F.Value?"True":"False"),{Name:F.Name?.startsWith("--")?F.Name:`--${F.Name}`,Value:R}});return [...a,...c,...u,...D]}#p(){let t=this.targetUrls();if(t.length===0)return iy([]);let e=t.map(n=>{if(n.connectionStringId)return iy(n.connectionStringId);if(!n.save)return iy(null);let o=n.url,_=V(o)?.displayName??"Destination";this.#a.destinations().filter(F=>F.Name?.startsWith(_)).length;let D={Name:`${_} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",D).pipe(pt$1(F=>F.Data?.ID??null))});return wy(e).pipe(rd(n=>{let o=this.targetUrls();n.forEach((a,_)=>{if(a&&_<o.length&&(this.#a.reload(),o[_].connectionStringId!==a)){let c=o[_].urlKey;this.updateTargetUrl(_,o[_].url,a,c);}});}))}#m(t){if(!t||t?.indexOf("T")===-1)return {time:t??"13:00"};let e=new Date(t);return {time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:`${(""+e.getFullYear()).padStart(4,"0")}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}}setTargetUrl(t,e=false,n=null,o=null){if(e&&(this.#l=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let _=[...a];return _.length===0?_.push(dn(t,n,o,n?true:yn)):_[0]=m$3(l({},_[0]),{url:t,urlKey:o,connectionStringId:n,save:n?true:yn}),_});}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,dn(t,e,n,e?true:yn)]);}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let _=[...a],c=_[t].save;return _[t]=m$3(l({},_[t]),{url:e,connectionStringId:n,urlKey:o,save:n?true:c}),_});}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=m$3(l({},n[t]),{save:!n[t].save}),n});}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t));}#c(){this.generalForm.reset({operationType:"Backup"}),this.sourceDataForm.reset(),this.scheduleFields=En(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([]);}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var Js=["formRef"];function Xs(i,t){i&1&&(Qi$1(0,"sh-alert",31),Fg(1,5),Ig(2,"sh-icon",33),jg(),$l());}function zs(i,t){i&1&&(Qi$1(0,"sh-alert",32),Fg(1,6),Ig(2,"sh-icon",33),jg(),$l());}function Hs(i,t){if(i&1&&aT(0,Xs,3,0,"sh-alert",31)(1,zs,3,0,"sh-alert",32),i&2){let e=iC();cT(e.generalFormSignal()?.operationType==="Sync"?0:!e.canEditEncryption()&&e.generalFormSignal()?.encryption!==""?1:-1);}}function Ws(i,t){if(i&1){let e=vT();Qi$1(0,"div",26)(1,"label"),nC(2,7),$l(),Qi$1(3,"sh-button-group",34),lm("valueChange",function(o){Od(e);let a=iC();return UC(a.operationTypeFieldSignal,o)||(a.operationTypeFieldSignal=o),Pd(o)}),Qi$1(4,"button",35),Fg(5,8),Ig(6,"sh-icon",36),jg(),$l(),Qi$1(7,"button",37),Fg(8,9),Ig(9,"sh-icon",36),jg(),$l()()();}if(i&2){let e=iC();CE(3),cm("value",e.operationTypeFieldSignal),CE(3),vg("shTooltip","Store backups with version history, deduplication, compression and encryption"),CE(3),vg("shTooltip","Copy files from the source to the destination without compression or encryption");}}function js(i,t){i&1&&(Qi$1(0,"sh-alert",38),Fg(1,10),Ig(2,"sh-icon",33),jg(),$l());}function qs(i,t){if(i&1&&aT(0,js,3,0,"sh-alert",38),i&2){let e=iC();cT(e.isNew()?0:-1);}}function Ys(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.DisplayName," ");}}function Qs(i,t){if(i&1&&Ig(0,"sh-progress-bar",52),i&2){let e=iC(4);Kg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),vg("value",e.calculatePasswordStrength()*(100/5));}}function Zs(i,t){i&1&&(Qi$1(0,"span",47),nC(1,15),$l());}function el(i,t){i&1&&(Fg(0,13,1),Ig(1,"sh-icon"),jg());}function tl(i,t){i&1&&(Fg(0,13,2),Ig(1,"sh-icon"),jg());}function nl(i,t){i&1&&(Fg(0,16,1),Ig(1,"sh-icon",54),jg());}function il(i,t){i&1&&(Fg(0,16,2),Ig(1,"sh-icon"),jg());}function ol(i,t){if(i&1){let e=vT();Qi$1(0,"button",53),Hg("click",function(){Od(e);let o=iC(4);return Pd(o.copyPassword())}),Fg(1,16),aT(2,nl,2,0)(3,il,2,0),jg(),$l();}if(i&2){let e=iC(4);CE(2),cT(e.copiedPassword()?2:3);}}function al(i,t){i&1&&(Qi$1(0,"sh-alert",51),nC(1,17),$l());}function rl(i,t){if(i&1){let e=vT();Qi$1(0,"div",42)(1,"sh-form-field")(2,"label",43),Fg(3,12),Ig(4,"sup"),jg(),$l(),Ig(5,"input",44),CD(),$l(),aT(6,Qs,1,9,"sh-progress-bar",45),Qi$1(7,"sh-form-field"),Ig(8,"input",46),CD(),aT(9,Zs,2,0,"span",47),$l(),Qi$1(10,"div",48)(11,"button",49),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.showPassword.set(!o.showPassword()))}),Fg(12,13),aT(13,el,2,0)(14,tl,2,0),jg(),$l(),Qi$1(15,"button",49),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.generatePassword())}),Fg(16,14),Ig(17,"sh-icon"),jg(),$l(),aT(18,ol,4,1,"button",50),$l(),aT(19,al,2,0,"sh-alert",51),$l();}if(i&2){let e=iC(3);CE(5),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.generalForm.value.password?6:-1),CE(2),vg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),CE(4),cT(e.showPassword()?13:14),CE(5),cT(e.showCopyPassword()?18:-1),CE(),cT(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1);}}function sl(i,t){if(i&1&&(Qi$1(0,"sh-select",39)(1,"label",40),nC(2,11),$l(),Ig(3,"input",41),CD(),cg(4,Ys,1,1,"ng-template"),$l(),aT(5,rl,20,7,"div",42)),i&2){let e=iC(2);vg("options",e.encryptionOptions())("isClearable",false),CE(3),_D(),CE(2),cT(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1);}}function ll(i,t){if(i&1&&aT(0,sl,6,3),i&2){let e=iC();cT(e.canEditEncryption()?0:-1);}}function _l(i,t){if(i&1&&(Qi$1(0,"button",29),Fg(1,18),Ig(2,"sh-icon"),jg(),$l()),i&2){let e=iC();vg("disabled",e.nameAndDescriptionValid()===false);}}function dl(i,t){if(i&1&&(Qi$1(0,"button",30),Fg(1,19),Ig(2,"sh-icon"),jg(),$l()),i&2){let e=iC();vg("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword());}}var at=new jn,Ii=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:"",operationType:"Backup"})=>at.group({name:at.control(i.name,[me.required]),description:at.control(i.description),encryption:at.control(i.encryption,[F()]),password:at.control(i.password,[y(t=>t?.value.encryption!=="-",[me.required])]),repeatPassword:at.control(i.repeatPassword,[y(t=>t?.value.encryption!=="-",[me.required])]),operationType:at.control(i.operationType)}),gt={Key:"-",DisplayName:"None"},Nn=class i{#e=T(ee);#t=T(W);#n=T(m);#i=T(Ve);#o=T(m$1);formRef=w1.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;operationTypeFieldSignal=Ge$1("Backup");encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;isDraft=this.#i.isDraft;canEditEncryption=Nt$1(()=>this.isNew()||this.isDraft());syncModeSupported=this.#o.hasSyncMode;showPassword=Ge$1(false);copiedPassword=Ge$1(false);showCopyPassword=Ge$1(false);noneOptionKey=gt.Key;encryptionEffect=za$1(()=>{this.encryptionFieldSignal()===gt.Key&&(this.copiedPassword.set(false),this.showCopyPassword.set(false));});#r=za$1(()=>{let t=this.#i.operationTypeFieldSignal();this.operationTypeFieldSignal.set(t??"Backup");});#a=za$1(()=>{let t=this.operationTypeFieldSignal();this.generalForm.controls.operationType.setValue(t);});nameAndDescriptionValid=Nt$1(()=>{this.generalFormSignal();let e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=Nt$1(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus();}exit(){this.#i.exit(true);}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#s(t??""),this.copiedPassword.set(true);}async#s(t){try{await navigator.clipboard.writeText(t);}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let t=this.#n.generate(41);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(true);}next(){this.#i.shouldAutoSave()&&this.#i.submit(true),this.#e.navigate(["destination"],{relativeTo:this.#t.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Js,5),e&2&&fC();},decls:23,vars:5,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let c;c=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Synchronization job - files are not encrypted `;let E;E=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let D;D=$localize`Operation mode`;let F;F=$localize` Backup ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let R;R=$localize` Sync ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: This is a synchronization job. Files are copied without encryption. `;let I;I=$localize`Encryption`;let J;J=$localize`Encryption`;let z;z=$localize`Password`;let q;q=$localize`Repeat password`;let Z;Z=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let B;B=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,B=oC(B);let fe;fe=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let de;de=$localize`Passwords do not match`;let Ce;Ce=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Ce=oC(Ce);let V;V=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let He;He=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let $e;return $e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,_,c,u,E,D,F,R,G,J,Z,B,fe,de,Ce,V,He,$e,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"mode-toggle"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],[1,"primary","accent"],[1,"primary"],["icon",""],[3,"valueChange","value"],["value","Backup","type","button"],[3,"shTooltip"],["value","Sync","type","button"],[1,"accent"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",z,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){e&1&&(Qi$1(0,"form",20,0),Hg("submit",function(){return n.next()}),Qi$1(2,"h3",21),nC(3,1),$l(),aT(4,Hs,2,1),Qi$1(5,"sh-form-field")(6,"label",22),Fg(7,2),Ig(8,"sup"),jg(),$l(),Ig(9,"input",23),CD(),$l(),Qi$1(10,"sh-form-field")(11,"label",24),nC(12,3),$l(),Ig(13,"textarea",25),CD(),$l(),aT(14,Ws,10,3,"div",26),aT(15,qs,1,1)(16,ll,1,1),Qi$1(17,"div",27)(18,"button",28),Hg("click",function(){return n.exit()}),Fg(19,4),Ig(20,"sh-icon"),jg(),$l(),aT(21,_l,3,1,"button",29)(22,dl,3,1,"button",30),$l()()),e&2&&(vg("formGroup",n.generalForm),CE(4),cT(n.isNew()?-1:4),CE(5),_D(),CE(4),_D(),CE(),cT(n.isNew()&&n.syncModeSupported()?14:-1),CE(),cT(n.generalFormSignal()?.operationType==="Sync"?15:16),CE(6),cT(n.generalFormSignal()?.operationType==="Sync"||n.encryptionFieldSignal()===n.noneOptionKey||!n.canEditEncryption()?21:22));},dependencies:[Gn,Tn$1,Ze,Rn,Pn,gn,hn$1,Fe$1,Nt$2,v,N,d,ue,at$1,x],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.mode-toggle[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1);gap:.25rem}.mode-toggle[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{width:100%}"]})};
|
|
14
|
-
var chunk5M3AFOV5=/*#__PURE__*/Object.freeze({__proto__:null,NONE_OPTION:gt,createGeneralForm:Ii,default:Nn});var chunk2CNIH76F=/*#__PURE__*/Object.freeze({__proto__:null,createSourceDataForm:Di,default:fn});var chunkSGR45BXU=/*#__PURE__*/Object.freeze({__proto__:null,SCHEDULE_DEFAULT_OPTIONS:Qt,SCHEDULE_FIELD_DEFAULTS:En,default:Sn,scheduleOptionToSchedule:Ni});export{Nt as N,Ve as V,_n as _,ot as a,chunk2CNIH76F as b,chunk5M3AFOV5 as c,chunkSGR45BXU as d,en as e,on as o,pt as p,sn as s,ut as u};
|
package/chunk-D7C8xyJI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {T,ad as Mr,br as uv,B as A,G as Ge,N as Nt,z as za,bs as Rr,aZ as ee}from'./main-XKLDSNLY.js';import {S}from'./chunk-B8PnvglY.js';var m=class i{#i=T(S);#t=T(Mr);#o=T(uv);#e=A("darkTheme",null,true);#s=Ge(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ge(this.isMobile()?"overlay":"");isNavOpen=Ge(false);isDarkMode=this.#e.asReadonly();darkModeEffect=za(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=za(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
|
package/chunk-D9dEfxn4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {T,A as v$1,h as hw,v as v$2,_ as _t,Q as Qi,d as aT,$ as $l,C as CE,g as cT,S as aC,V as Ul,W as Eg,s as jC,X as Wl,Y as cC,n as nC}from'./main-XKLDSNLY.js';var S=["*",[["","footer",""]]],L=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-custom-card"]],ngContentSelectors:L,decls:11,vars:0,consts:[[1,"card"],["src","assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(aC(S),Ul(0,"div",0),Eg(1,"img",1),Ul(2,"header")(3,"div",2),Eg(4,"img",3),jC(5," Duplicati "),Wl()(),Ul(6,"main"),cC(7),Ul(8,"footer"),cC(9,1),Wl()()(),Eg(10,"div",4));},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}']})};function v(t,n){t&1&&(Qi(0,"h3"),nC(1,0),$l());}function N(t,n){t&1&&(Qi(0,"h3"),nC(1,1),$l(),Qi(2,"button",3),nC(3,2),$l());}var p=class t{#e=T(v$1);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(Qi(0,"app-custom-card"),aT(1,v,2,0,"h3")(2,N,4,0),$l()),e&2&&(CE(),cT(o.isLoggingOut()?1:2));},dependencies:[s,v$2,_t],styles:["[_nghost-%COMP%]{display:block}"]})};export{p as default};
|