@duplicati/ngclient 0.0.206 → 0.0.208
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-2DOT6WAE.js +1 -0
- package/{chunk-JJY6UOEY.js → chunk-2LSZ2I43.js} +1 -1
- package/chunk-2T442RZU.js +1 -0
- package/chunk-2V75WWT2.js +1 -0
- package/chunk-3A4HTZ7B.js +1 -0
- package/{chunk-PGISF7LM.js → chunk-3KMV4PTJ.js} +1 -1
- package/{chunk-3MS6SVET.js → chunk-3SSB4QCJ.js} +1 -1
- package/chunk-3WOW2XM3.js +1 -0
- package/{chunk-WLAJ3YIP.js → chunk-3ZCJK7PY.js} +1 -1
- package/{chunk-VNF7NNO5.js → chunk-47PB4WN3.js} +1 -1
- package/chunk-4FDBDI3J.js +1 -0
- package/chunk-4KNVWFT2.js +1 -0
- package/chunk-4QE3MT56.js +1 -0
- package/chunk-54PAHILA.js +1 -0
- package/{chunk-OVLGKJ3Z.js → chunk-5ECY4LSP.js} +1 -1
- package/chunk-5KQZMHFN.js +1 -0
- package/{chunk-FNGDI6JY.js → chunk-5VSRHMHD.js} +1 -1
- package/{chunk-2FPYV4EW.js → chunk-64IX6ISO.js} +1 -1
- package/{chunk-A5F2OWRS.js → chunk-7B4AIHYK.js} +1 -1
- package/{chunk-G3FMV74P.js → chunk-7FYL7MVA.js} +1 -1
- package/{chunk-NJBOYRXU.js → chunk-7YLK4QIL.js} +1 -1
- package/{chunk-XHDAWK7I.js → chunk-7ZA3Q6TS.js} +1 -1
- package/chunk-AYCSIHGS.js +1 -0
- package/chunk-AYOFR344.js +1 -0
- package/chunk-AZFGZQQK.js +1 -0
- package/{chunk-QY5UGQ3R.js → chunk-AZJ2P3YU.js} +1 -1
- package/{chunk-GGW26MAG.js → chunk-B35WNLRM.js} +1 -1
- package/chunk-B6CAREL6.js +1 -0
- package/{chunk-NGKFJLI2.js → chunk-BEXYTIOL.js} +1 -1
- package/{chunk-V63YAEPZ.js → chunk-BKQA64HZ.js} +1 -1
- package/chunk-BMWZYMK6.js +1 -0
- package/chunk-BSYMQ4VF.js +1 -0
- package/chunk-BT44N2RL.js +2 -0
- package/{chunk-R4E5IO3A.js → chunk-C6RVYQ4M.js} +1 -1
- package/chunk-CJ5SZZQC.js +1 -0
- package/chunk-CNUQWXBC.js +1 -0
- package/chunk-COKAO446.js +1 -0
- package/chunk-CPI5ZQUF.js +1 -0
- package/chunk-ERITO7WM.js +4 -0
- package/chunk-FSFXGPH3.js +11 -0
- package/chunk-G6ZV6LAU.js +1 -0
- package/chunk-GG5S6RWM.js +1 -0
- package/{chunk-7T44DW2B.js → chunk-GLR4FXRG.js} +1 -1
- package/{chunk-3QS6DB3O.js → chunk-GROPRXXJ.js} +1 -1
- package/{chunk-O3GGVB2B.js → chunk-HA7XREWO.js} +1 -1
- package/chunk-I2HYK2BL.js +1 -0
- package/{chunk-EG3PT3XW.js → chunk-I4XRVBRQ.js} +1 -1
- package/{chunk-RWDQ3L3C.js → chunk-ITA7DTN3.js} +1 -1
- package/chunk-IXUAJIIQ.js +1 -0
- package/{chunk-7HFTVA4J.js → chunk-IZCDGVXJ.js} +1 -1
- package/chunk-J33RTTTX.js +1 -0
- package/{chunk-CTQKCCGM.js → chunk-JKIZ6U22.js} +1 -1
- package/chunk-JW6W3ER7.js +1 -0
- package/chunk-K32ZRHDV.js +1 -0
- package/chunk-KQZNQ7RD.js +1 -0
- package/{chunk-VPUFUCR3.js → chunk-LGILJ5LY.js} +1 -1
- package/{chunk-NAMMULH4.js → chunk-LJBFPDG2.js} +1 -1
- package/{chunk-KUX6NGQU.js → chunk-LO5YNFFR.js} +1 -1
- package/chunk-LQKADAHT.js +1 -0
- package/{chunk-ZPIR5QIQ.js → chunk-LSF3JCSI.js} +1 -1
- package/{chunk-6COK7FLL.js → chunk-MAKVVEKB.js} +1 -1
- package/{chunk-LU7RSOI6.js → chunk-NBTTYKXH.js} +2 -2
- package/chunk-NCN2TOJR.js +1 -0
- package/chunk-NDLPNBGE.js +1 -0
- package/chunk-O7MDPYFW.js +1 -0
- package/chunk-ODHFI4PA.js +1 -0
- package/{chunk-MT6UNBGG.js → chunk-OISQ63OG.js} +1 -1
- package/chunk-OQ6BKP5N.js +1 -0
- package/{chunk-X5JLWZ7R.js → chunk-P5MXBPC4.js} +1 -1
- package/{chunk-TBQPNXMN.js → chunk-Q5WLMQD4.js} +1 -1
- package/chunk-Q72Y55NB.js +1 -0
- package/chunk-R63C22I3.js +1 -0
- package/{chunk-AI6EYFMY.js → chunk-RC3UQLPB.js} +1 -1
- package/chunk-RCZGOO7K.js +1 -0
- package/{chunk-7E5J43IH.js → chunk-RFB5A3B7.js} +1 -1
- package/{chunk-FJFREVRV.js → chunk-SLS3DCJP.js} +1 -1
- package/{chunk-OWBBT5WF.js → chunk-SUY5AQLW.js} +1 -1
- package/chunk-U3SGWHNI.js +1 -0
- package/chunk-UCR4I5MD.js +1 -0
- package/{chunk-KLAJGS5T.js → chunk-UUQWSINE.js} +1 -1
- package/{chunk-VKNFRCHQ.js → chunk-VAQ435AR.js} +1 -1
- package/{chunk-UOZTEZ7B.js → chunk-VTFVTC7O.js} +1 -1
- package/{chunk-7MPZ3MRD.js → chunk-W4HWOC3K.js} +1 -1
- package/chunk-WOZTK7S5.js +2 -0
- package/{chunk-SIMG6PGZ.js → chunk-WQVQC2MC.js} +1 -1
- package/{chunk-MMF252RQ.js → chunk-WZV32HLQ.js} +1 -1
- package/{chunk-OAAXQ2BE.js → chunk-X64LSE6Y.js} +1 -1
- package/chunk-XQTUBHIK.js +1 -0
- package/chunk-YCLTQEU6.js +1 -0
- package/{chunk-GTZRHPRV.js → chunk-YQD4QIGG.js} +1 -1
- package/index.html +2 -2
- package/{main-DLNEYRGV.js → main-BYMMXHVT.js} +1 -1
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +2404 -2404
- package/{styles-377DNUNK.css → styles-6WG7TD6T.css} +1 -1
- package/chunk-23UYU3M3.js +0 -1
- package/chunk-2E2AU7CO.js +0 -1
- package/chunk-2K74TI2N.js +0 -1
- package/chunk-2T4BMRWX.js +0 -2
- package/chunk-4GQJ6TJZ.js +0 -1
- package/chunk-4OBMW6MZ.js +0 -1
- package/chunk-4VYR5E5I.js +0 -1
- package/chunk-5HB22USV.js +0 -1
- package/chunk-5MKFV3IB.js +0 -1
- package/chunk-5QAUCDEV.js +0 -1
- package/chunk-5T2JCBPV.js +0 -1
- package/chunk-6ETVPQVI.js +0 -1
- package/chunk-7JHU54QM.js +0 -1
- package/chunk-7PUXNL75.js +0 -1
- package/chunk-A57TBTOD.js +0 -1
- package/chunk-AAECT3VT.js +0 -1
- package/chunk-AGMFKAHM.js +0 -1
- package/chunk-AJF77BHX.js +0 -1
- package/chunk-AWL7E6ZQ.js +0 -11
- package/chunk-DKPWJYG3.js +0 -1
- package/chunk-GJGFMZUV.js +0 -1
- package/chunk-HFNC6WUL.js +0 -1
- package/chunk-I6PR2AV2.js +0 -1
- package/chunk-I7MAEY3S.js +0 -1
- package/chunk-ISG53K32.js +0 -1
- package/chunk-KICR4V2W.js +0 -1
- package/chunk-KUGAORAS.js +0 -1
- package/chunk-KYTPZ3WD.js +0 -1
- package/chunk-NGPZXZJJ.js +0 -1
- package/chunk-NWNCATHF.js +0 -1
- package/chunk-PVWYJV5Y.js +0 -1
- package/chunk-QY4Y5NJB.js +0 -4
- package/chunk-RFCIV3AX.js +0 -1
- package/chunk-RNE4Z2E4.js +0 -1
- package/chunk-SFW3N5OL.js +0 -1
- package/chunk-STB3WOIA.js +0 -1
- package/chunk-V5ZJABDA.js +0 -1
- package/chunk-VLMNSWR3.js +0 -1
- package/chunk-XZHXN75E.js +0 -1
- package/chunk-Y46QCSB5.js +0 -1
- package/chunk-YYAHWCC5.js +0 -1
- package/chunk-ZFREX3ZV.js +0 -1
- package/chunk-ZKGGCQ2N.js +0 -2
package/chunk-AWL7E6ZQ.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as xn,b as jt,c as Rn}from"./chunk-RWDQ3L3C.js";import{a as vt,b as bt,c as Ut,d as Mn}from"./chunk-V5ZJABDA.js";import{a as Nn,b as Dn,c as Pe,d as $t,e as An,f as In,g as Gt,i as Pn,j as On,k as yn}from"./chunk-ZPIR5QIQ.js";import{a as Fn}from"./chunk-O3GGVB2B.js";import{a as Q}from"./chunk-7E5J43IH.js";import{a as wt}from"./chunk-3MS6SVET.js";import{a as fn,b as $e,c as hn}from"./chunk-4VYR5E5I.js";import{a as Se}from"./chunk-NGKFJLI2.js";import{B as ne,C as Tn,E as Pt,F as Sn,H as Te,K as Ot,L as yt,O as Mt,P as we,V as xt,W as je,Y as Rt,a as pn,b as St,c as re,d as Et,e as se,f as ft,h as mn,i as Ce,j as ht,k as Ft,n as Cn,o as gn,p as Nt,q as Dt,r as At,s as ge,t as He,v as Y,w as It,z as Le}from"./chunk-Y46QCSB5.js";import{c as En,d as Lt}from"./chunk-JJY6UOEY.js";import{b as We,d as Re,e as un}from"./chunk-2K74TI2N.js";import{_ as dn}from"./chunk-VLMNSWR3.js";import{$b as Ke,Ab as Ie,Ac as Me,Bb as u,Bc as te,Cb as l,Cc as de,D as an,Db as r,Dc as Tt,E as Ge,Eb as P,Ib as me,Jb as _e,Jc as be,K as dt,Kb as ee,Lb as D,M as ut,N as ln,O as pt,P as rn,Pa as mt,Pc as L,Sa as _,Sb as M,Tb as x,Tc as Ue,U as Ne,Ub as O,Uc as B,Vc as ze,Xb as ve,Yb as h,Yc as ke,Z as R,_b as s,a as nn,ac as he,ca as T,da as S,f as _t,fb as H,fc as Je,ga as sn,gc as Xe,hc as q,ic as gt,jc as ce,kb as X,l as Be,mc as p,nb as _n,nc as Ht,oa as F,oc as b,p as ct,pc as ot,qa as Z,rc as k,sc as U,tc as V,ub as Ct,uc as le,v as on,vb as C,vc as j,wb as g,wc as f,xb as De,zb as Ae,zc as cn}from"./chunk-QY4Y5NJB.js";import{a as W,b as ae}from"./chunk-7CGTOI24.js";var kt=class n{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||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})};function at(n){if(_n(n))return n();if(Array.isArray(n))return n.map(t=>at(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=at(n[e]));return t}return n}var Un=n=>n;function Ln(n,t){let e=ln(n,Un,t?.equal),i=e[nn],o=e;return o.set=a=>{let c=e();return pt(i,a),()=>{pt(i,c)}},o.update=a=>{let c=e();return rn(i,a),()=>{pt(i,c)}},e}var qe=class n{#e=R(En);isSaving=F(!1);resourceDestinations=hn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=Ln(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(!0),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(Ge(()=>{this.isSaving.set(!1)}))}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||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})};function kn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),O(3,7),r(),l(4,"input",28,0),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),S(o)}),r(),l(6,"sh-icon",29),p(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),p(10,"\xA0"),r(),l(11,"input",32,1),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),S(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),O(18,8),r(),l(19,"input",34),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),S(o)}),r()(),l(20,"sh-select",35)(21,"input",36),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),S(o)}),r()()(),l(22,"sh-toggle-card",37),me(23,38),O(24,9),_e(),l(25,"div",39)(26,"sh-toggle",24),M(27,10),l(28,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),S(o)}),r(),x(),r(),l(29,"sh-toggle",24),M(30,11),l(31,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),S(o)}),r(),x(),r(),l(32,"sh-toggle",24),M(33,12),l(34,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),S(o)}),r(),x(),r(),l(35,"sh-toggle",24),M(36,13),l(37,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),S(o)}),r(),x(),r(),l(38,"sh-toggle",24),M(39,14),l(40,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),S(o)}),r(),x(),r(),l(41,"sh-toggle",24),M(42,15),l(43,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),S(o)}),r(),x(),r(),l(44,"sh-toggle",24),M(45,16),l(46,"input",25),V("ngModelChange",function(o){T(e);let a=s(2);return U(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),S(o)}),r(),x(),r()()()}if(n&2){let e=s(2);_(4),k("ngModel",e.scheduleFields.nextTime.time),_(7),k("ngModel",e.scheduleFields.nextTime.date),_(8),k("ngModel",e.scheduleFields.runAgain.repeatValue),_(),u("options",e.unitOptions)("isClearable",!1),_(),k("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),u("disableToggle",!0),_(6),k("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),k("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Vn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),M(2,5),l(3,"input",25),V("ngModelChange",function(o){T(e);let a=s();return U(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),S(o)}),r(),x(),r(),l(4,"p"),O(5,6),r()(),C(6,kn,47,14)}if(n&2){let e=s();_(3),k("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var Bn=[{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`}],Vt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:Kn().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:!1,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function wn(n){if(!n.autoRun)return null;let t=[n.runAgain.allowedDays.mon?"Monday":null,n.runAgain.allowedDays.tue?"Tuesday":null,n.runAgain.allowedDays.wed?"Wednesday":null,n.runAgain.allowedDays.thu?"Thursday":null,n.runAgain.allowedDays.fri?"Friday":null,n.runAgain.allowedDays.sat?"Saturday":null,n.runAgain.allowedDays.sun?"Sunday":null].filter(c=>c!==null),e=n.nextTime.time.split(":"),i=new Date(n.nextTime.date);i.setHours(parseInt(e[0])),i.setMinutes(parseInt(e[1]));let o=n.runAgain.repeatValue,a=n.runAgain.repeatUnit;return{Time:i.toISOString(),Repeat:`${o}${a}`,AllowedDays:t}}function Kn(){let n=new Date,t=n.getDay(),e=t===1?7:(8-t)%7;return n.setDate(n.getDate()+e),n.setHours(12,0,0,0),n}var Yt=()=>({autoRun:F(!0),nextTime:{time:F("13:00"),date:F(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:F(1),repeatUnit:F("D"),allowedDays:{mon:F(!0),tue:F(!0),wed:F(!0),thu:F(!0),fri:F(!0),sat:F(!0),sun:F(!0)}}}),qt=class n{#e=R(ye);#t=R(Re);#n=R(We);unitOptions=Bn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Vt;updateScheduleType(t){let e=Vt.find(i=>i.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let i=e.data;this.scheduleFields.autoRun.set(i.autoRun??!1),this.scheduleFields.nextTime.time.set(i.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(i.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(i.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(i.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(i.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(i.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(i.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(i.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(i.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(i.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(i.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let i;i=$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 c;c=$localize`If a date was missed, the job will run as soon as possible.`;let d;d=$localize`Next time`;let m;m=$localize`Run again every`;let E;E=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let J;return J=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,d,m,E,A,I,$,G,N,K,J,[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"],[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,i){e&1&&(l(0,"h3",17),O(1,2),r(),l(2,"sh-select",18)(3,"input",19),h("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),C(4,Vn,7,2),l(5,"div",20)(6,"button",21),h("click",function(){return i.goBack()}),M(7,3),P(8,"sh-icon"),x(),r(),l(9,"button",22),h("click",function(){return i.next()}),M(10,4),P(11,"sh-icon"),x(),r()()),e&2&&(_(2),u("isClearable",!1)("options",i.scheduleOptions),_(),u("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[ge,re,Ft,St,se,Ce,Te,je,Y,ne,we,xt,Sn],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}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Jn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Xn=["[title]","[description]","[action]","*"];function zn(n,t){n&1&&p(0,"Title")}function Wn(n,t){n&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var lt=class n{isActive=ke(!1);disableToggle=B(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&ce("active",i.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Xn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Ke(Jn),l(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disableToggle()||i.toggle()}),he(3,0,null,zn,1,0),C(5,Wn,2,0,"sh-icon"),r(),he(6,1),r(),l(7,"div",2),he(8,2),r()(),l(9,"div",3),he(10,3),r()),e&2&&(_(5),g(i.disableToggle()?-1:5))},dependencies:[Y],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;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}"],changeDetection:0})};function Hn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),V("ngModelChange",function(o){T(e);let a=s();return U(a.internalPath,o)||(a.internalPath=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.updateFilter())}),r()()}if(n&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),k("ngModel",e.internalPath)}}function jn(n,t){if(n&1&&(l(0,"div",7),p(1),r()),n&2){let e,i=s(2);_(),Ht((e=i.currentExpressionOption())==null?null:e.startsWith)}}function qn(n,t){if(n&1&&(l(0,"div",8),p(1),r()),n&2){let e,i=s(2);_(),Ht((e=i.currentExpressionOption())==null?null:e.endsWith)}}function Yn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),V("ngModelChange",function(o){T(e);let a=s();return U(a.internalPath,o)||(a.internalPath=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.updateFilter())}),r(),C(2,jn,2,1,"div",7),C(3,qn,2,1,"div",8),r()}if(n&2){let e,i,o=s();_(),k("ngModel",o.internalPath),_(),g(!((e=o.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),_(),g(!((i=o.currentExpressionOption())==null||i.endsWith==null)&&i.endsWith.length?3:-1)}}var Qn=[{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"}],Zn=[{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"}],Bt=class n{path=B.required();osType=B();pathChange=Ue();remove=Ue();internalPath=F("");pathType=F("-Expression");currentExpressionOption=L(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(Qn);expressionOptions=L(()=>{let e=this.osType()==="Windows"?"\\":"/";return Zn.map(i=>i.value==="-Folder"||i.value==="+Folder"?ae(W({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?ae(W({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?ae(W({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?ae(W({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?ae(W({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?ae(W({},i),{startsWith:"*.",endsWith:""}):ae(W({},i),{startsWith:"",endsWith:""}))});pathEffect=Z(()=>{let t=this.path(),e=t.slice(1),i=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(`${i}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${i}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${i}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${i}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${i}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${i}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${i}Expression`),this.internalPath.set(e))});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||n)};static \u0275cmp=H({type:n,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["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,i){if(e&1&&(l(0,"sh-select",0)(1,"input",1),V("ngModelChange",function(a){return U(i.pathType,a)||(i.pathType=a),a}),h("ngModelChange",function(){return i.updateFilter()}),r()(),C(2,Hn,2,4,"sh-select",2)(3,Yn,4,3,"sh-form-field",3),l(4,"div",4),h("click",function(){return i.removeFilter()}),l(5,"sh-icon",5),p(6,"x-circle"),r()()),e&2){let o;u("options",i.expressionOptions())("isClearable",!1),_(),k("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[ge,re,se,Ce,we,Te,Y],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var ei=[[["","displayName",""]],[["","description",""]],"*"],ti=["[displayName]","[description]","*"];function ni(n,t){if(n&1&&p(0),n&2){s(2);let e=f(1);b(" ",e.Name," ")}}function ii(n,t){if(n&1&&p(0),n&2){s(2);let e=f(0);b(" ",e.displayName," ")}}function oi(n,t){n&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function ai(n,t){n&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function li(n,t){if(n&1&&p(0),n&2){s();let e=f(15);b(" ",e," ")}}function ri(n,t){if(n&1&&p(0),n&2){s(2);let e=f(0);b(" ",e.description," ")}}function si(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),P(2,"img",2),r(),l(3,"div",3)(4,"div",4),he(5),r(),l(6,"div",5),C(7,ni,1,1)(8,ii,1,1),r(),C(9,oi,2,0,"sh-chip",6)(10,ai,2,0,"sh-chip",7),r(),l(11,"div",8)(12,"div",4),he(13,1),r(),l(14,"div",5),le(15),C(16,li,1,1)(17,ri,1,1),r()(),l(18,"div",9),he(19,2),r()()),n&2){let e=s(),i=f(0),o=f(1);u("variant",e.variant()),_(2),u("src",i.icon,mt),Ct("alt",i.displayName),_(5),g(o&&o.Name?7:8),_(2),g((i.sortOrder??0)==-2?9:(i.sortOrder??0)<0?10:-1),_(6);let a=j(e.getSimplePath(o==null?null:o.BaseUrl));_(),g(a&&a.length>0?16:17)}}var Qe=class n{destination=B();targetUrl=B();variant=B("type-b");connectionStringId=B();#e=R(qe);connectionString=L(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=L(()=>{let t=this.targetUrl();return t?Pe(t)??null:null});destinationFromTargetUrl=L(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon}:null});destinationItem=L(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?Dn(t):""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:ti,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,i){if(e&1&&(Ke(ei),le(0)(1),C(2,si,20,7,"sh-card",0)),e&2){let o=j(i.destinationItem());_(),j(i.connectionString()),_(),g(o?2:-1)}},dependencies:[Tn,Pt],styles:['[_nghost-%COMP%]{display:block}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}'],changeDetection:0})};var Ze=class n{#e=R(Se);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=An(e.Key);if(i.length<=1){let o=$t(e.Key);return o.isDefaultEntry===!0?[ae(W({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return i}).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,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=L(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=L(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=L(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=L(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(i=>i.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})};function _i(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let o=T(e).$implicit,a=s();return S(a.setDestination.emit(o.customKey??o.key))}),M(2,0),P(3,"sh-icon"),x(),r()()}if(n&2){let e=t.$implicit;u("destination",e)}}var Kt=class n{#e=R(Ze);showAsSources=B(!1);moduleType=B("Backend");setDestination=Ue();destinationSearchTerm=F("");destinationTypeOptions=L(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=L(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((o,a)=>{let c=o.sortOrder??0,d=a.sortOrder??0;return c!==d?d-c:o.displayName.localeCompare(a.displayName)}).filter(o=>{let a=o.sortOrder??0;return a<0&&e?.length&&(o.key.toLocaleLowerCase()===e.toLocaleLowerCase()||o.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?i.filter(o=>o.searchTerms.toLowerCase().includes(e)):i});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),V("ngModelChange",function(a){return U(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),Ae(3,_i,4,1,"app-destination-list-item",3,De),r()),e&2&&(_(),k("ngModel",i.destinationSearchTerm),_(2),Ie(i.destinationTypeOptionsFocused()))},dependencies:[Qe,ge,re,se,Ce,Te,ne,Y],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var ci=["fileInput"],di=[[["label"]]],ui=["label"],Jt=class n{customId=B();content=F("");readonly=F(!1);placeholder=B($localize`Drop a file here or use the browse button`);fileInputRef=ze("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(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Z(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&Je(i.fileInputRef,ci,5),e&2&&Xe()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[cn([{provide:pn,useExisting:n,multi:!0}])],ngContentSelectors:ui,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,i){if(e&1){let o=D();Ke(di),he(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),h("click",function(){return T(o),S(i.triggerBrowse())}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),h("drop",function(c){return T(o),S(i.onFileDrop(c))})("dragover",function(c){return T(o),S(i.onDragOver(c))}),l(6,"textarea",4),V("ngModelChange",function(c){return T(o),U(i.content,c)||(i.content=c),S(c)}),r()(),l(7,"input",5,0),h("change",function(c){return T(o),S(i.onFileSelected(c))}),r()}e&2&&(_(6),u("placeholder",i.placeholder()),k("ngModel",i.content),u("disabled",i.readonly()))},dependencies:[ge,re,se,Ce,Y,ne],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var pi=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),oe=n=>({$implicit:n}),mi=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Ci=()=>({updateOn:"blur"}),gi=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),Ee=(n,t)=>({fieldGroup:n,formView:t}),Ti=()=>["/connect/logon"];function Si(n,t){n&1&&ee(0)}function Ei(n,t){if(n&1&&X(0,Si,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",te(7,oe,Tt(2,pi,i,e,a,c.oauthField)))}}function fi(n,t){n&1&&ee(0)}function hi(n,t){if(n&1&&X(0,fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",te(7,oe,Tt(2,mi,i,e,a,c.oauthField)))}}function Fi(n,t){if(n&1){let e=D();l(0,"button",25),h("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!1))}),M(1,8),P(2,"sh-icon"),x(),r()}}function Ni(n,t){if(n&1){let e=D();l(0,"button",32,2),h("click",function(){let o=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(o))}),p(2),r()}if(n&2){let e=t.$implicit;_(2),b(" ",e.name," ")}}function Di(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),M(3,9),P(4,"sh-icon"),x(),r(),me(5,28),Ae(6,Ni,3,1,"button",29,De),_e(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),me(12,28),l(13,"button",31),h("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),_e(),r()()}if(n&2){s();let e=f(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Ie(e)}}function Ai(n,t){if(n&1){let e=D();l(0,"textarea",33),h("ngModelChange",function(o){T(e);let a=s(2);return S(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Me(2,Ci))}}function Ii(n,t){n&1&&ee(0)}function Pi(n,t){if(n&1&&X(0,Ii,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=q(15),a=s(),c=f(0),d=f(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",te(7,oe,Tt(2,gi,i,m,c,d.oauthField)))}}function Oi(n,t){if(n&1&&Ae(0,Pi,1,9,"ng-container",null,De),n&2){let e=s(2);Ie(e.advancedFormFieldNames())}}function yi(n,t){n&1&&(l(0,"sup",42),p(1,"*"),r())}function Mi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function xi(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),C(2,yi,2,0,"sup",42),p(3),C(4,Mi,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);u("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function Ri(n,t){n&1&&(l(0,"sup",45),p(1,"*"),r())}function Li(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function wi(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),C(2,Ri,2,0,"sup",45),p(3),C(4,Li,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);u("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function $i(n,t){n&1&&(l(0,"sup",46),p(1,"*"),r())}function Gi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function vi(n,t){n&1&&(l(0,"sh-icon",47),p(1," warning "),r())}function bi(n,t){n&1&&ee(0)}function Ui(n,t){if(n&1&&(l(0,"sh-icon",51),p(1," link "),r()),n&2){s();let e=f(8),i=f(9);ce("error",e&&i==="error")("warn",e&&i==="warning"),u("shTooltip",e)}}function ki(n,t){n&1&&(l(0,"sh-icon",50),p(1,"envelope"),r())}function Vi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"hard-drives"),r())}function Bi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"jar"),r())}function Ki(n,t){n&1&&(l(0,"sh-icon",50),p(1,"textbox"),r())}function Ji(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,$i,2,0,"sup",46),p(3),C(4,Gi,2,1,"sh-icon",43),C(5,vi,2,0,"sh-icon",47),X(6,bi,1,0,"ng-container",24),r(),l(7,"input",48),h("keydown",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),le(8)(9),C(10,Ui,2,5,"sh-icon",49)(11,ki,2,0,"sh-icon",50)(12,Vi,2,0,"sh-icon",50)(13,Bi,2,0,"sh-icon",50)(14,Ki,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);s();let m=q(17);_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),g(c&&e.formView.type==="Path"?5:-1),_(),u("ngTemplateOutlet",m)("ngTemplateOutletContext",te(16,oe,de(13,Ee,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let E=a,A=s().hasLeadingSlash(E??"");_(),j(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),j(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),_(),g(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)}}function Xi(n,t){n&1&&(l(0,"sup",52),p(1,"*"),r())}function zi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Wi(n,t){n&1&&ee(0)}function Hi(n,t){if(n&1){let e=D();l(0,"span",56),h("click",function(){T(e);let o=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function ji(n,t){n&1&&(l(0,"sh-icon",50),p(1,"password"),r())}function qi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function Yi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function Qi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Xi,2,0,"sup",52),p(3),C(4,zi,2,1,"sh-icon",43),X(5,Wi,1,0,"ng-container",24),r(),l(6,"input",53),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),C(7,Hi,2,0,"span",54)(8,ji,2,0,"sh-icon",50),C(9,qi,2,0,"sh-icon",55)(10,Yi,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(14,oe,de(11,Ee,e.fieldGroup,e.formView))),_(),u("type",e.formView.showPassword?"text":"password")("id",c)("ngModel",o),_(),g(e.oauthField===e.formView.name?7:8),_(2),g(e.formView.showPassword?9:10)}}function Zi(n,t){n&1&&(l(0,"sup",59),p(1,"*"),r())}function eo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function to(n,t){n&1&&ee(0)}function no(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ot(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function io(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),C(2,Zi,2,0,"sup",59),p(3),C(4,eo,2,1,"sh-icon",43),X(5,to,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,no,1,2,"ng-template",null,3,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),m=f(5);s();let E=q(17);u("options",i)("isClearable",!1)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),b(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",te(14,oe,de(11,Ee,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function oo(n,t){if(n&1&&(le(0),C(1,io,9,16)),n&2){let e=s().$implicit,i=j(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function ao(n,t){n&1&&(l(0,"sup",62),p(1,"*"),r())}function lo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function ro(n,t){n&1&&ee(0)}function so(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ot(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function _o(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),C(2,ao,2,0,"sup",62),p(3),C(4,lo,2,1,"sh-icon",43),X(5,ro,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,so,1,2,"ng-template",null,4,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),m=f(5);s();let E=q(17);u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),b(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",te(15,oe,de(12,Ee,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function co(n,t){n&1&&P(0,"sh-progress-bar",60)}function uo(n,t){if(n&1&&(le(0),C(1,_o,9,17)(2,co,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=f(2),o=j(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function po(n,t){n&1&&(l(0,"sup",64),p(1,"*"),r())}function mo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Co(n,t){n&1&&ee(0)}function go(n,t){if(n&1){let e=D();l(0,"app-size",63),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,po,2,0,"sup",64),p(3),C(4,mo,2,1,"sh-icon",43),X(5,Co,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);u("inputType",e.Name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(12,oe,de(9,Ee,e.fieldGroup,e.formView)))}}function To(n,t){n&1&&(l(0,"sup",65),p(1,"*"),r())}function So(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Eo(n,t){n&1&&ee(0)}function fo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,To,2,0,"sup",65),p(3),C(4,So,2,1,"sh-icon",43),X(5,Eo,1,0,"ng-container",24),r(),l(6,"input",66),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(11,oe,de(8,Ee,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o)}}function ho(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Fo(n,t){n&1&&ee(0)}function No(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),h("click",function(){T(e);let o=s().$implicit,a=f(2),c=s(2);return S(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),p(2),C(3,ho,2,1,"sh-icon",43),X(4,Fo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(5);s();let c=q(17),d=s();ce("active",d.isTrue(o)),_(),u("for",a),_(),b(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",te(10,oe,de(7,Ee,e.fieldGroup,e.formView)))}}function Do(n,t){n&1&&(l(0,"sup",69),p(1,"*"),r())}function Ao(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Io(n,t){n&1&&ee(0)}function Po(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ot(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Oo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),C(2,Do,2,0,"sup",69),p(3),C(4,Ao,2,1,"sh-icon",43),X(5,Io,1,0,"ng-container",24),r(),l(6,"input",70),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,Po,1,2,"ng-template",null,5,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),m=f(5);s();let E=q(17);u("options",i)("selectMultiple",!0)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),b(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",te(13,oe,de(10,Ee,o.fieldGroup,o.formView))),_(),u("ngModel",c)}}function yo(n,t){if(n&1&&(le(0),C(1,Oo,9,15)),n&2){let e=s().$implicit,i=j(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Mo(n,t){n&1&&(l(0,"sup",71),p(1,"*"),r())}function xo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Ro(n,t){n&1&&ee(0)}function Lo(n,t){if(n&1){let e=D();l(0,"app-timespan",63),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,Mo,2,0,"sup",71),p(3),C(4,xo,2,1,"sh-icon",43),X(5,Ro,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);u("inputType",e.formView.name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(12,oe,de(9,Ee,e.fieldGroup,e.formView)))}}function wo(n,t){n&1&&(l(0,"sup",73),p(1,"*"),r())}function $o(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Go(n,t){n&1&&ee(0)}function vo(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),C(2,wo,2,0,"sup",73),p(3),C(4,$o,2,1,"sh-icon",43),X(5,Go,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(2),o=f(4),a=f(5);s();let c=q(17);u("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),g(e.formView.isMandatory&&o?2:-1),_(),b(" ",e.formView.shortDescription??e.formView.name," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",te(11,oe,de(8,Ee,e.fieldGroup,e.formView)))}}function bo(n,t){n&1&&(P(0,"sh-spinner"),l(1,"span"),O(2,10),r()),n&2&>("--spinner-size","16px")("--spinner-thickness","2px")}function Uo(n,t){n&1&&(l(0,"div",76),O(1,11),r())}function ko(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ot(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Vo(n,t){if(n&1){let e=D();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),p(3,"*"),r(),l(4,"span"),O(5,12),r()(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(4).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,ko,1,2,"ng-template",null,6,be)}if(n&2){s(4);let e=f(2),i=f(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",i),_(5),u("id",i)("ngModel",e)}}function Bo(n,t){if(n&1&&C(0,bo,3,4)(1,Uo,2,0,"div",76)(2,Vo,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Ko(n,t){n&1&&(l(0,"sup",79),p(1,"*"),r())}function Jo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(4).$implicit;u("shTooltip",e.formView.longDescription)}}function Xo(n,t){n&1&&ee(0)}function zo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){T(e),s(4);let o=f(5),a=s(2);return S(a.toggleDisabled(o))}),M(1,13),P(2,"sh-icon"),x(),r()}}function Wo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Ko,2,0,"sup",79),p(3),C(4,Jo,2,1,"sh-icon",43),X(5,Xo,1,0,"ng-container",24),r(),l(6,"input",80),h("ngModelChange",function(o){T(e);let a=s(3).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"textbox"),r()(),C(9,zo,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17),m=s();_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(15,oe,de(12,Ee,e.fieldGroup,e.formView))),_(),u("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),g(m.getIsDisabled(c)?9:-1)}}function Ho(n,t){if(n&1&&(l(0,"div",74),C(1,Bo,3,1)(2,Wo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function jo(n,t){if(n&1){let e=D();l(0,"div",82),M(1,14),P(2,"div")(3,"div"),x(),r(),l(4,"button",81),h("click",function(){T(e);let o=s(5);return S(o.openConsole())}),M(5,15),P(6,"sh-icon"),x(),r()}}function qo(n,t){n&1&&(l(0,"div",82),O(1,16),r(),l(2,"button",83),M(3,17),P(4,"sh-icon"),x(),r()),n&2&&(_(2),u("routerLink",Me(1,Ti)))}function Yo(n,t){if(n&1&&(l(0,"div",75),C(1,jo,7,0)(2,qo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function Qo(n,t){if(n&1&&C(0,Ho,3,1,"div",74)(1,Yo,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function Zo(n,t){n&1&&(l(0,"sup",85),p(1,"*"),r())}function ea(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function ta(n,t){n&1&&ee(0)}function na(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),C(3,Zo,2,0,"sup",85),p(4),C(5,ea,2,1,"sh-icon",43),X(6,ta,1,0,"ng-container",24),r(),l(7,"input",86),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),p(9,"textbox"),r()(),l(10,"button",87),h("click",function(){T(e);let o=s(4);return S(o.authenticateFilen())}),M(11,18),P(12,"sh-icon"),x(),r()()}if(n&2){let e=s(2).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17),m=s();_(2),u("for",c),_(),g(e.formView.isMandatory&&a?3:-1),_(),b(" ",i," "),_(),g(e.formView.longDescription?5:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",te(12,oe,de(9,Ee,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o),_(3),u("disabled",m.isAuthenticatingFilen())}}function ia(n,t){if(n&1&&C(0,na,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function oa(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function aa(n,t){if(n&1&&(l(0,"div",34),le(1)(2)(3)(4)(5),C(6,xi,6,12,"app-file-tree",35)(7,wi,6,9,"app-file-tree",36)(8,Ji,15,18,"sh-form-field")(9,Qi,11,16,"sh-form-field")(10,oo,2,2)(11,uo,3,2)(12,go,6,14,"app-size",37)(13,fo,9,13,"sh-form-field")(14,No,5,12,"sh-toggle",38)(15,yo,2,2)(16,Lo,6,14,"app-timespan",37)(17,vo,6,13,"app-file-drop-textarea",39)(18,Qo,2,1)(19,ia,1,1),C(20,oa,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=f(0),o=s();ce("single-field",e.fieldGroup!=="advanced"),_(),j(e.formView.shortDescription??e.formView.name),_(),j(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=j(o.getFieldValue(e.fieldGroup,e.formView.name));_(),j((a??"").toString().trim()===""),_(),j("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),_(),g(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),_(14),g(e.fieldGroup==="advanced"?20:-1)}}function la(n,t){if(n&1&&(l(0,"sh-icon",88),p(1,"x-circle"),r()),n&2){s();let e=f(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ra(n,t){if(n&1&&(l(0,"sh-icon",89),p(1,"warning"),r()),n&2){s();let e=f(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function sa(n,t){if(n&1&&(le(0),C(1,la,2,1,"sh-icon",88)(2,ra,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=f(0),o=j(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function _a(n,t){if(n&1&&(le(0),C(1,sa,3,2)),n&2){let e=t.$implicit,o=(j(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function ca(n,t){if(n&1&&(le(0),Ae(1,Ei,1,9,"ng-container",null,De),Ae(3,hi,1,9,"ng-container",null,De),l(5,"sh-toggle-card",19),me(6,20)(7),O(8,7),_e(),le(9),C(10,Fi,3,0,"button",21)(11,Di,17,2,"div",22),_e(),C(12,Ai,1,3,"textarea",23)(13,Oi,2,0),r(),X(14,aa,21,9,"ng-template",null,0,be)(16,_a,2,2,"ng-template",null,1,be)),n&2){let e=s(),i=f(1);j(e.destinationForm()),_(),Ie(i.custom),_(2),Ie(i.dynamic),_(2),u("disableToggle",!0),_(4),j(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Xt=class n{#e=R(ye);#t=R(Se);#n=R(wt);#i=R(Ze);#l=R(Fn);#r=R(Nn);#o=R(Le);injector=R(sn);targetUrl=ke.required();useBackupState=B(!1);#a=null;destinationType=L(()=>{let t=this.targetUrl();if(!t)return null;let e=Pe(t);return this.#a=e?.customKey??e?.key,this.#a});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=L(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=L(()=>!this.useBackupState());restoreBackupIdOptions=$e(fn(this.targetUrl).pipe(ct(t=>{if(!t)return{authKey:null,url:null,isRestore:this.isRestoreFlow(),hasKey:this.hasStorageApiKey()};let e=t.indexOf("?"),i=e>=0?t.substring(e+1):"",o=new URLSearchParams(i),a=o.get("duplicati-auth-apiid")??"",c=o.get("duplicati-auth-apikey")??"";return{authKey:`${a}|${c}`,url:t}}),an((t,e)=>t.authKey===e.authKey),ut(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),dt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(Ge(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Be([]))),{initialValue:[]});isConnectedToConsole=L(()=>this.#l.state()==="connected");hasStorageApiKey=L(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=L(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=L(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=Z(()=>{let t=this.targetUrl(),e=Pe(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find(G=>G.Key===i)??{Key:i,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!i)return;let c=e&&e.oauthField?e.oauthField:null,d=e&&e.customFields?e.customFields:{},m=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],A=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],I={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([G,N],K)=>{let J=N.order??K,w=N.validate;!w&&N.type==="Bucketname"&&(w=z=>On(z)?null:{type:"error",message:$localize`Invalid bucket name.`}),w&&N.type==="Hostname"&&(w=z=>yn(z)?null:{type:"error",message:$localize`Invalid hostname.`}),I.custom.push(W({order:900+J,validate:w},N))});for(let G=0;G<a.Options.length;G++){let N=a.Options[G];if(N.Deprecated)continue;let K=m.find(J=>J===N.Name||N.Aliases?.includes(J.name)||J.name===N.Name);if(K){let J=N.Aliases?.indexOf(K.name)??-1,w=N.Aliases&&J>-1?N.Aliases[J]:N.Name,z=K&&typeof K!="string",ue=z?K?.defaultValue??N.DefaultValue:N.DefaultValue,pe=z&&K?.order!==void 0?K.order:G,v={name:w,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+pe},fe=z?W(W({},v),K):v;I.dynamic.push(fe)}else{let J=N.Name;if(A.find(Fe=>Fe===J))continue;let z=E.find(Fe=>Fe===J||Fe.name===J),ue=z&&typeof z!="string",pe=ue&&z?.order!==void 0?z.order:G,v={name:J,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+pe},fe=ue?W(W({},v),z):v;I.advanced.push(fe)}}if(I.custom.sort((G,N)=>G.order-N.order),I.dynamic.sort((G,N)=>G.order-N.order),I.advanced.sort((G,N)=>G.order-N.order),this.destinationFormConfig.set(I),!t)return;let $=Gt(t);$&&this.destinationForm.set({custom:$.custom,dynamic:$.dynamic,advanced:$.advanced})});destinationFormEffect=Z(()=>{let t=this.#a,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=In({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("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(W({},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!1}onKeyDown(t,e,i,o){if(i==="Hostname"||i==="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,i){let o=this.destinationForm();o[t][e]=i,this.destinationForm.set(W({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(W({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let i=t.options;return i?i.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let i=this.mapOptions(t);return i?(e&&e.length>0&&(i.find(a=>a.value===e)||i.push({key:e,value:e})),i):null}#s=F(!1);oauthStartTokenCreation(t,e,i,o){this.#s.set(!0);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),c=this.#n.serverSettings()?.["--oauth-url"];if(c&&c.length>0&&(a=c),this.useBackupState()){let N=this.#e.mapFormsToSettings().find(K=>K.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let d=this.destinationForm().advanced["oauth-url"];d&&d.length>0&&(a=d);let m=`${a}?type=${t}`,E=450,A=600,I=screen.width/2-E/2,$=screen.height/2-A/2,G=window.open(m,"_blank","height="+A+",width="+E+",menubar=0,status=0,titlebar=0,toolbar=0,left="+I+",top="+$);return window.addEventListener("message",N=>{let K=N.data.startsWith("authid:"),J=K?N.data.replace("authid:",""):null;K&&(this.destinationForm.update(w=>(w[e][i]=J,w)),this.#s.set(!1),this.refreshView.set(!this.refreshView()),G?.close())}),!1}settingsAsText=L(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,i])=>{let o=e??"",a="";return typeof i=="boolean"?a=this.isTrue(i)?"True":"False":(typeof i=="number"||i!=null)&&(a=i.toString()),`${o}=${a}`}).join(`
|
|
2
|
-
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Pn(t);this.destinationForm.update(i=>ae(W({},i),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#l.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#r.getFilenApiKey(t,e).pipe(Ge(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:i=>{if(i.length===0){this.#o.open(Q,{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"]=i,o.dynamic["two-factor-code"]=null,o)),this.refreshView.set(!this.refreshView())},error:i=>{console.error("Error authenticating Filen",i),this.#o.open(Q,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${i.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let i=this.destinationForm().advanced["api-key"];if(i&&i.length>0){this.#o.open(Q,{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||n)};static \u0275cmp=H({type:n,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 i;i=$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 c;c=$localize`This field is mandatory`;let d;d=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let m;m=$localize`This field is mandatory`;let E;E=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let $;$=$localize`This field is mandatory`;let G;G=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let J;J=$localize`Loading available backups...`;let w;w=$localize`No backups found from this machine, contact support`;let z;z=$localize`This field is mandatory`;let ue;ue=$localize`Pick the backup to restore from`;let pe;pe=$localize`This field is mandatory`;let v;v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let fe;fe=$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:`,fe=ve(fe);let Fe;Fe=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let et;et=$localize`Connect to the console to use Duplicati storage.`;let tt;tt=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let nt;nt=$localize`This field is mandatory`;let it;return it=$localize` Authenticate now ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,i,J,w,ue,v,fe,Fe,et,tt,it,[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"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[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",c],["shTooltip",d,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",m],["autocomplete","off",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",A],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",I],["shTooltip",$],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",G],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",K],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",z],["shTooltip",pe],["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"],[1,"filen-2fa-setup"],["shTooltip",nt],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["shButton","","type","button",1,"outlined",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,i){if(e&1&&(le(0)(1),C(2,ca,18,5)),e&2){let o=j(i.destinationType());_();let a=j(i.destinationFormConfig());_(),g(o&&a?2:-1)}},dependencies:[He,re,Ft,se,ge,Ce,dn,un,vt,Ut,Mn,Jt,Te,ne,Y,xt,Ot,we,Rt,je,yt,Mt],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}.filen-2fa-setup[_ngcontent-%COMP%], .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}"],changeDetection:0})};var zt=class n{#e=R(Lt);#t=R(Le);#n=R(Se);testDestination(t,e,i,o,a,c,d,m){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a,c,d,m):this.testDestinationv1(t,e,i,o,a,c,d,m)}testDestinationv2(t,e,i,o,a,c,d,m){return new _t(E=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:i??null,BackupId:e=="new"?null:e,AutoCreate:m==="create",Options:null,DestinationType:c,SourcePrefix:e=="new"?null:o}}).subscribe({next:A=>{if(A.Success){this.emitSuccessV2(E,t,a,A);return}this.handleGenericError(E,t,a,A.Error??"Unknown error",d)},error:A=>{let I=A?.error?.body??A?.error?.requestBody;if(I?.Data?.FolderExists===!1||I?.StatusCode==="missing-folder"){this.handleMissingFolder(E,t,e,a,d,m);return}if(I?.Data?.HostCertificate){this.handleMissingCertificate(E,t,a,I.Data?.HostCertificate,d);return}if(I?.Data?.ReportedHostKey){this.handleIncorrectKey(E,t,a,I.Data.ReportedHostKey,I.Data.AcceptedHostKey??null,d);return}this.handleGenericError(E,t,a,A?.message??"Unknown error",d)}})})}testDestinationv1(t,e,i,o,a,c,d,m){return new _t(E=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:i??null,sourcePrefix:e=="new"?null:o},type:c}).subscribe({next:A=>{E.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),E.complete()},error:A=>{this.handleDestinationErrorv1(A.message,t,e,a,d,m).subscribe(I=>{E.next(I)})}})})}handleMissingFolder(t,e,i,o,a,c){function d(){t.next({action:"missing-folder",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete()}if(a||c==="error"){d();return}this.#t.open(Q,{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:m=>{if(!m){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null,BackupId:i=="new"?null:i}}).subscribe({next:E=>{if(E.Success){this.emitSuccessV2(t,e,o,E);return}else this.handleFolderCreateFailure(t,e,o,E.Error??$localize`Unknown error`)},error:E=>{this.handleFolderCreateFailure(t,e,o,E.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:i=="new"?null:i}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:E=>{this.handleFolderCreateFailure(t,e,o,E.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#t.open(Q,{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:!1,destinationIndex:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#t.open(Q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o,a){let c=$localize`The server is using a certificate that is not trusted.
|
|
3
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
4
|
-
The server reported the certificate hash: ${o}`,d=e.includes("?");function m(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${d?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:c,destinationIndex:i}),t.complete()}if(a){m();return}this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:c,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:E=>{if(!E){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let A=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:E,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var d=A;let m=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
5
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
6
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
7
|
-
with the REPORTED host key: ${o}?`,E=e;try{let $=new URL(e);$.searchParams.set("ssh-fingerprint",o),E=$.toString()}catch{let $=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),G=$.includes("?");E=$+`${G?"&":"?"}ssh-fingerprint=${o}`}if(c){A();return}this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:$=>{if(!$){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}A()}})}else{let A=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${E?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var d=A;let m=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,E=e.includes("?");if(c){A();return}this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:I=>{if(!I){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}A()}})}}handleGenericError(t,e,i,o,a){function c(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i,errorMessage:o}),t.complete()}if(a){c();return}this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:d=>c()})}handleDestinationErrorv1(t,e,i,o,a,c){return new _t(d=>{if(t==="missing-folder"){this.handleMissingFolder(d,e,i,o,a,c);return}if(t.startsWith("incorrect-cert:")){let m=t.split("incorrect-cert:")[1];this.handleMissingCertificate(d,e,o,m,a);return}if(t.startsWith("incorrect-host-key:")){let m=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(d,e,o,m,E,a);return}this.handleGenericError(d,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})};function da(n,t){if(n&1){let e=D();l(0,"sh-alert",13),M(1,0),l(2,"button",14),h("click",function(){T(e);let o=s(2);return S(o.testDestinationClick())}),r(),x(),r()}}function ua(n,t){n&1&&(l(0,"sh-alert",13),M(1,1),P(2,"sh-icon"),l(3,"div",15),P(4,"sh-spinner"),r(),x(),r()),n&2&&(_(4),gt("--spinner-size","16px")("--spinner-thickness","2px"))}function pa(n,t){n&1&&(l(0,"sh-alert",17),O(1,2),r())}function ma(n,t){n&1&&(l(0,"sh-alert",16),O(1,3),r())}function Ca(n,t){if(n&1&&C(0,pa,2,0,"sh-alert",17)(1,ma,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:1)}}function ga(n,t){n&1&&(l(0,"sh-alert",18),O(1,4),r())}function Ta(n,t){n&1&&(l(0,"sh-alert",16),O(1,5),r())}function Sa(n,t){n&1&&(l(0,"sh-alert",17),O(1,6),r())}function Ea(n,t){if(n&1&&C(0,ga,2,0,"sh-alert",18)(1,Ta,2,0,"sh-alert",16)(2,Sa,2,0,"sh-alert",17),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function fa(n,t){n&1&&(l(0,"sh-alert",17),O(1,7),r())}function ha(n,t){n&1&&(l(0,"sh-alert",16),O(1,8),r())}function Fa(n,t){if(n&1&&C(0,fa,2,0,"sh-alert",17)(1,ha,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.anyFilesFound?0:1)}}function Na(n,t){n&1&&(l(0,"sh-alert",17),O(1,9),r())}function Da(n,t){n&1&&(l(0,"sh-alert",17),O(1,10),r())}function Aa(n,t){n&1&&(l(0,"sh-alert",17),O(1,11),r())}function Ia(n,t){if(n&1&&C(0,Na,2,0,"sh-alert",17)(1,Da,2,0,"sh-alert",17)(2,Aa,2,0,"sh-alert",17),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function Pa(n,t){if(n&1&&C(0,Ca,2,1)(1,Ea,3,1)(2,Fa,2,1)(3,Ia,3,1),n&2){let e=s(3);g(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function Oa(n,t){if(n&1){let e=D();M(0,12,1),l(1,"button",14),h("click",function(){T(e);let o=s(4);return S(o.createFolder())}),r(),x()}}function ya(n,t){if(n&1&&(l(0,"sh-alert",16),M(1,12),C(2,Oa,2,0,"button",19),x(),r()),n&2){let e=s(3);_(2),g(e.askToCreate()?2:-1)}}function Ma(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),b(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function xa(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),b(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function Ra(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.testDestinationClick())}),p(3,"Test again"),r()()}if(n&2){let e,i=s(3);_(),b(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function La(n,t){if(n&1&&C(0,Pa,4,1)(1,ya,3,1,"sh-alert",16)(2,Ma,4,1,"sh-alert",16)(3,xa,4,1,"sh-alert",16)(4,Ra,4,1,"sh-alert",16),n&2){let e,i=s(2);g(((e=i.testResponse())==null?null:e.action)==="success"?0:((e=i.testResponse())==null?null:e.action)==="missing-folder"?1:((e=i.testResponse())==null?null:e.action)==="trust-cert"?2:((e=i.testResponse())==null?null:e.action)==="approve-host-key"?3:((e=i.testResponse())==null?null:e.action)==="generic-error"?4:-1)}}function wa(n,t){if(n&1&&C(0,da,3,0,"sh-alert",13)(1,ua,5,4,"sh-alert",13)(2,La,5,1),n&2){let e=s();g(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var Wt=class n{#e=R(zt);targetUrl=ke.required();testSignal=ke.required();connectionStringId=B(null);backupId=B.required();sourcePrefix=B.required();suppressErrorDialogs=B.required();askToCreate=B.required();testExpectation=B.required();moduleType=B.required();testResponse=L(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=L(()=>{let t=this.targetUrl();return!(!t||!Gt(t))});prevTargetUrl=null;targetUrlEffect=Z(()=>{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(),i=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return!t||!o||i!==t||(this.targetUrl.set(o),this.testDestinationClick()),!1}createFolder(){return this.testDestination(!0),!1}testDestinationClick(){return this.testDestination(!1),!1}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let i=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(),i)?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let c=a.suggestedUrl;c&&this.targetUrl.set(c),this.testSignal.set("testing"),this.#e.testDestination(c??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),i)?.subscribe({next:d=>{this.testSignal.set(d),o(d)}})}else this.testSignal.set(a),o(a)}})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,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"],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 i;i=$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 c;c=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let d;d=$localize`Success! Test completed, destination is empty.`;let m;m=$localize`Success! Test completed, destination contains files.`;let E;E=$localize`The remote destination is empty.`;let A;A=$localize`Success! Test completed, backup found.`;let I;I=$localize`Success! Test completed, destination contains files.`;let $;$=$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,i,o,a,c,d,m,E,A,I,$,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,i){e&1&&C(0,wa,3,1),e&2&&g(i.isExpectedValidTargetUrl()?0:-1)},dependencies:[It,ne,Y,Mt],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"],changeDetection:0})};function $a(n,t){if(n&1){let e=D();l(0,"app-destination-list",10),h("setDestination",function(o){T(e);let a=s();return S(a.setDestination(o))}),r()}if(n&2){let e=s();u("showAsSources",!0)("moduleType",e.moduleType())}}function Ga(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",11)(1,"button",8),h("click",function(){T(e);let o=s();return S(o.removeDestination())}),O(2,3),r()(),l(3,"app-test-url",12),V("targetUrlChange",function(o){T(e);let a=s();return U(a.targetUrlModel,o)||(a.targetUrlModel=o),S(o)})("testSignalChange",function(o){T(e);let a=s();return U(a.testSignal,o)||(a.testSignal=o),S(o)}),r(),l(4,"app-single-destination",13),V("targetUrlChange",function(o){T(e);let a=s();return U(a.targetUrlModel,o)||(a.targetUrlModel=o),S(o)}),r()}if(n&2){let e=s();u("targetUrl",e.targetUrlModel()),_(3),k("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),u("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("moduleType",e.moduleType()),_(),k("targetUrl",e.targetUrlModel)}}function va(n,t){n&1&&O(0,2,1)}function ba(n,t){n&1&&O(0,2,2)}function Ua(n,t){n&1&&O(0,2,3)}function ka(n,t){n&1&&O(0,2,4)}var rt=class n{data=B();closed=Ue();targetUrlModel=F(null);moduleType=F("Backend");askToCreate=F(!1);expectedResult=F("any");suppressErrorDialogs=F(!1);backupId=F(null);sourcePrefix=F(null);dataEffect=Z(()=>{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=F(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=$t(t??"");if(e){if(e.mapper.default){let i=e.mapper.default("");this.setTargetUrl(i,!0);return}this.setTargetUrl(`${t}://`,!0)}}submit(){this.closed.emit(this.targetUrlModel())}removeDestination(){this.setTargetUrl(null,!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,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 i;i=$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:`,i=ve(i);let o;return o=$localize`Change`,[t,e,i,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","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,i){if(e&1){let o=D();l(0,"header")(1,"h3",4),O(2,0),r()(),l(3,"section",5),C(4,$a,1,2,"app-destination-list",6),C(5,Ga,5,10),r(),l(6,"footer",7)(7,"button",8),h("click",function(){return T(o),S(i.closed.emit(null))}),O(8,1),r(),l(9,"button",9),h("click",function(){return T(o),S(i.submit())}),M(10,2),C(11,va,1,0)(12,ba,1,0)(13,Ua,1,0)(14,ka,1,0),x(),r()()}if(e&2){let o=!!i.targetUrlModel();_(4),g(o?-1:4),_(),g(o?5:-1),_(4),ce("loading",i.testSignal()==="testing"),u("disabled",!o||i.testSignal()===null||i.testSignal()==="testing"),_(2),g(i.moduleType()==="Backend"?11:i.moduleType()==="SourceProvider"?12:i.moduleType()==="RestoreDestinationProvider"?13:14)}},dependencies:[Xt,Kt,Qe,ne,Wt],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}"],changeDetection:0})};var Va=["formRef"],$n=()=>({updateOn:"blur",standalone:!0}),Zt=()=>({standalone:!0});function Ba(n,t){if(n&1){let e=D();l(0,"button",31),h("click",function(){T(e);let o=s();return S(o.openRemoteDestinationDialog())}),M(1,16),P(2,"sh-icon"),x(),r()}}function Ka(n,t){n&1&&O(0,7,1)}function Ja(n,t){n&1&&O(0,7,2)}function Xa(n,t){n&1&&(l(0,"p",41),O(1,17),r())}function za(n,t){n&1&&(l(0,"p",41),O(1,18),r())}function Wa(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",52),V("ngModelChange",function(o){T(e);let a=s();return U(a.bulkPaths,o)||(a.bulkPaths=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.savePathBulkEdit())}),r()()}if(n&2){let e=s();_(),k("ngModel",e.bulkPaths),u("ngModelOptions",Me(2,$n))}}function Ha(n,t){if(n&1){let e=D();l(0,"sh-form-field",56)(1,"input",57),V("ngModelChange",function(o){T(e);let a=s(3);return U(a.editingPath,o)||(a.editingPath=o),S(o)}),r()(),l(2,"button",31),h("click",function(){T(e);let o=s(3);return S(o.updatePath())}),l(3,"sh-icon"),p(4,"floppy-disk"),r()(),l(5,"button",31),h("click",function(){T(e);let o=s(3);return S(o.cancelEditPath())}),l(6,"sh-icon"),p(7,"x-bold"),r()()}if(n&2){let e=s(3);_(),k("ngModel",e.editingPath),u("ngModelOptions",Me(2,Zt))}}function ja(n,t){if(n&1&&(l(0,"sh-chip"),P(1,"img",58),p(2),r()),n&2){let e=s(2).$implicit,i=s(2);_(),u("src",i.getBackendIcon(e),mt),_(),b(" ",i.getRemotePathDisplayName(e)," ")}}function qa(n,t){if(n&1&&(l(0,"sh-form-field",56),P(1,"input",59),r()),n&2){let e=s(2).$implicit;Ct("readonly",!0),_(),u("ngModel",e)("ngModelOptions",Me(3,Zt))}}function Ya(n,t){if(n&1){let e=D();C(0,ja,3,2,"sh-chip")(1,qa,2,4,"sh-form-field",56),l(2,"button",31),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.editPath(o))}),l(3,"sh-icon"),p(4,"pen"),r()(),l(5,"button",31),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.removePath(o))}),l(6,"sh-icon"),p(7,"trash-simple"),r()()}if(n&2){let e=s().$implicit;g(e.startsWith("@")?0:1)}}function Qa(n,t){if(n&1&&(l(0,"div",53),C(1,Ha,8,3)(2,Ya,8,1),r()),n&2){let e=t.$implicit,i=s(2);_(),g(i.oldPath()===e?1:2)}}function Za(n,t){if(n&1){let e=D();Ae(0,Qa,3,1,"div",53,De),l(2,"div",51)(3,"sh-form-field"),P(4,"input",54),r(),l(5,"button",55),h("click",function(){T(e);let o=s();return S(o.addNewPath())}),l(6,"sh-icon"),p(7,"plus"),r()()()}if(n&2){let e=s();Ie(e.nonFilterPaths()),_(4),u("formControl",e.newPathCtrl)}}function el(n,t){if(n&1){let e=D();l(0,"button",60),h("click",function(){T(e);let o=s();return S(o.addFilter())}),M(1,19),P(2,"sh-icon"),x(),r()}}function tl(n,t){n&1&&O(0,9,1)}function nl(n,t){n&1&&O(0,9,2)}function il(n,t){n&1&&(l(0,"p",41),O(1,20),r())}function ol(n,t){n&1&&(l(0,"p",41),O(1,21),r())}function al(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",52),V("ngModelChange",function(o){T(e);let a=s();return U(a.bulkFilters,o)||(a.bulkFilters=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.saveBulkFilterEdit())}),r()()}if(n&2){let e=s();_(),k("ngModel",e.bulkFilters),u("ngModelOptions",Me(2,$n))}}function ll(n,t){if(n&1){let e=D();l(0,"app-new-filter",62),h("pathChange",function(o){let a=T(e).$index,c=s(3);return S(c.patchPathAt(o,a))})("remove",function(){let o=T(e).$index,a=s(3);return S(a.removePathAt(o))}),r()}if(n&2){let e=t.$implicit,i=s(3);u("path",e)("osType",i.osType()??"")}}function rl(n,t){if(n&1&&Ae(0,ll,1,2,"app-new-filter",61,De),n&2){let e=s(2);Ie(e.pathArray())}}function sl(n,t){if(n&1&&(l(0,"div",44),C(1,rl,2,0),r()),n&2){let e,i=s();_(),g((e=i.pathSignal())!=null&&e.length?1:-1)}}function _l(n,t){if(n&1){let e=D();l(0,"div",51)(1,"app-size",63),h("ngModelChange",function(o){T(e);let a=s();return S(a.updateFilesLargerThan(o))}),r()()}if(n&2){let e=s();_(),u("ngModel",e.filesLargerThan())("ngModelOptions",Me(2,Zt))}}var xe=new At,Gn=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>xe.group({path:xe.control(n.path),excludes:xe.group({hidden:xe.control(n.excludes.hidden),system:xe.control(n.excludes.system),temporary:xe.control(n.excludes.temporary),filesLargerThan:xe.group({size:xe.control(null),unit:xe.control(null)})})}),Qt=class n{#e=R(ye);#t=R(Le);#n=R(Re);#i=R(We);#l=R(Se);formRef=ze.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new mn("");filesLargerThan=L(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=$e(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=L(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=F(null);editingPath=F(null);addingNewPath=F(!1);bulkPathEditMode=F(!1);bulkPaths=F("");bulkFilterEditMode=F(!1);bulkFilters=F("");mobileMenuOpen=F(!1);openRemoteDestinationDialog(){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:null,sourcePrefix:null}}).closed.subscribe(e=>{if(!e)return;let i=Math.random().toString(36).substring(2,10),o=e.split("://")[0],c=`@${this.#l.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${i}|${e}`;this.addPath(c)})}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(!1);else{let t=this.nonFilterPaths()?.join(`
|
|
8
|
-
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(!0)}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
9
|
-
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),i=[...t,...e],o=[...new Set(i)].join("\0");this.sourceDataForm.controls.path.setValue(o)}toggleBulkFilterEdit(){if(this.bulkFilterEditMode())this.bulkFilterEditMode.set(!1);else{let t=this.pathArray().filter(e=>e!=="___none___"&&(e.startsWith("-")||e.startsWith("+"))).join(`
|
|
10
|
-
`);this.bulkFilters.set(t),this.bulkFilterEditMode.set(!0)}}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
11
|
-
`).filter(a=>a.trim()!==""&&(a.startsWith("-")||a.startsWith("+")))??[],i=[...this.nonFilterPaths()??[],...t],o=[...new Set(i)].join("\0");this.sourceDataForm.controls.path.setValue(o)}editPath(t){if(t&&t.startsWith("@")){this.#t.open(rt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:t.split("|")[1]??null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:this.#e.backupId(),sourcePrefix:t.split("|")[0]??null}}).closed.subscribe(i=>{if(!i)return;let a=`${t.split("|")[0]}|${i}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,a)??"")});return}this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:i}=bt(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:i})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(i?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let i=(this.sourceDataForm.controls.path.value??"").split("\0"),o=i.indexOf(t);if(o===-1)return;i.splice(o,1);let a=i.filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addPath(t){let i=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}addFilter(t="-*"){let i=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}patchPathAt(t,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),a=this.pathArray().map((d,m)=>m===e?`${t}`:`${d}`).join("\0"),c=[o,a].filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(c)}removePathAt(t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().filter((c,d)=>d!==t).join("\0"),a=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return"";let e=t.split("|")[1];return Pe(e).icon??"database"}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1],i=Pe(e);return i?i.displayName:"Unknown"}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,i=t?.split("\0")||[];e&&!i.includes(e)&&i.push(e);let o=i.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(!0),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&Je(i.formRef,Va,5),e&2&&Xe()},decls:85,vars:20,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let a;a=$localize`Source Data`;let c;c=$localize`Folder path`;let d;d=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let m;m=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let E;E=$localize`Options`;let A;A=$localize`Paths`;let I;I=$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 $;$=$localize`Filters`;let G;G=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*62:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*62:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*63:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*63:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let N;N=$localize`Exclude`;let K;K=$localize`Choose if there’s any files you want to exclude.`;let J;J=$localize` Files with the Hidden attribute ${"\uFFFD#75\uFFFD\uFFFD/#75\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Files with the System attribute ${"\uFFFD#78\uFFFD\uFFFD/#78\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Files with the Temporary attribute ${"\uFFFD#81\uFFFD\uFFFD/#81\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let pe;pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let v;v=$localize`Manually add a path.`;let fe;fe=$localize`Edit paths as text, one per line.`;let Fe;Fe=$localize`Add a direct path`;let et;et=$localize`Edit path`;let tt;tt=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let nt;nt=$localize`Customize your filters.`;let it;return it=$localize`Edit filters as text, one per line.`,[["formRef",""],a,c,d,m,E,A,I,$,G,N,K,J,w,z,ue,pe,v,fe,tt,nt,it,[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"],["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"],["type","button","shButton","",1,"small"],[1,"filters"],["formGroupName","excludes",3,"disableToggle"],[1,"raised","primary"],["type","checkbox","placeholder",e,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"row-inputs"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",Fe,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",et,3,"ngModelChange","ngModel","ngModelOptions"],["alt","",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],["type","button","shButton","",1,"small",3,"click"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,i){if(e&1){let o=D();l(0,"form",22,0),h("submit",function(){return T(o),S(i.next())}),l(2,"div",23)(3,"div",24)(4,"h3",25),O(5,1),r(),l(6,"button",26),h("click",function(){return T(o),S(i.mobileMenuOpen.set(!0))}),l(7,"sh-icon"),p(8,"sliders"),r()()(),l(9,"app-file-tree",27)(10,"label",28),O(11,2),r(),P(12,"input",29),r(),l(13,"div",30)(14,"button",31),h("click",function(){return T(o),S(i.goBack())}),M(15,3),P(16,"sh-icon"),x(),r(),l(17,"button",32),M(18,4),P(19,"sh-icon"),x(),r()()(),l(20,"div",33)(21,"div",34)(22,"span",25),O(23,5),r(),l(24,"button",35),h("click",function(){return T(o),S(i.mobileMenuOpen.set(!1))}),l(25,"sh-icon"),p(26,"x-bold"),r()()(),l(27,"app-toggle-card",36),me(28,37),l(29,"span"),O(30,6),r(),P(31,"div",38),C(32,Ba,3,0,"button",39),l(33,"sh-menu")(34,"button",39)(35,"sh-icon"),p(36,"dots-three-vertical"),r()(),me(37,40),l(38,"button",31),h("click",function(){return T(o),S(i.togglePathBulkEdit())}),M(39,7),P(40,"sh-icon"),C(41,Ka,1,0)(42,Ja,1,0),x(),r(),_e(),r(),_e(),C(43,Xa,2,0,"p",41)(44,za,2,0,"p",41),l(45,"div",42),C(46,Wa,2,3,"sh-form-field")(47,Za,8,1),r()(),l(48,"app-toggle-card",36),me(49,37),l(50,"span"),O(51,8),r(),P(52,"div",38),C(53,el,3,0,"button",43),l(54,"sh-menu")(55,"button",39)(56,"sh-icon"),p(57,"dots-three-vertical"),r()(),me(58,40),l(59,"button",31),h("click",function(){return T(o),S(i.toggleBulkFilterEdit())}),M(60,9),P(61,"sh-icon"),C(62,tl,1,0)(63,nl,1,0),x(),r(),_e(),r(),_e(),C(64,il,2,0,"p",41)(65,ol,2,0,"p",41),C(66,al,2,3,"sh-form-field")(67,sl,2,1,"div",44),r(),l(68,"app-toggle-card",45),me(69,37),O(70,10),_e(),l(71,"p",41),O(72,11),r(),l(73,"sh-toggle",46),M(74,12),P(75,"input",47),x(),r(),l(76,"sh-toggle",46),M(77,13),P(78,"input",48),x(),r(),l(79,"sh-toggle",46),M(80,14),P(81,"input",49),x(),r(),l(82,"sh-toggle",50),h("click",function(){return T(o),S(i.toggleFilesLargerThan())}),O(83,15),r(),C(84,_l,2,3,"div",51),r()()()}e&2&&(u("formGroup",i.sourceDataForm),_(9),u("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),_(11),ce("open",i.mobileMenuOpen()),_(7),u("disableToggle",!0),_(5),g(i.bulkPathEditMode()?-1:32),_(9),g(i.bulkPathEditMode()?41:42),_(2),g(i.bulkPathEditMode()?44:43),_(3),g(i.bulkPathEditMode()?46:47),_(2),u("disableToggle",!0),_(5),g(i.bulkFilterEditMode()?-1:53),_(9),g(i.bulkFilterEditMode()?62:63),_(2),g(i.bulkFilterEditMode()?65:64),_(2),g(i.bulkFilterEditMode()?66:67),_(2),u("disableToggle",!0),_(14),ce("active",i.filesLargerThan()),_(2),g(i.filesLargerThan()?84:-1))},dependencies:[ge,ht,re,St,se,ft,Ce,He,Cn,Dt,Nt,gn,Te,Y,ne,je,Ot,Bt,vt,lt,Ut,Pt],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;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}sh-menu[_ngcontent-%COMP%]{margin-left:.25rem}.paths[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"],changeDetection:0})};var vn="1W:1D,4W:1W,12M:1M",en=!1,ye=class n{#e=R(Re);#t=R(Se);#n=R(Le);#i=R(Lt);#l=R(wt);#r=R(kt);#o=R(qe);generalForm=bn();sourceDataForm=Gn();scheduleFields=Yt();scheduleType=F("daily");settings=F([]);optionsFields={backupRetention:F("all"),backupRetentionTime:F(""),backupRetentionVersions:F(0),backupRetentionCustom:F("")};targetUrls=F([]);targetUrlModel=L(()=>this.targetUrls()[0]?.url??null);connectionStringId=L(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=F(null);backupMetadata=F(null);isDraft=F(!1);backupId=F(null);backupName=L(()=>this.generalFormSignal()?.name??"");isSubmitting=F(!1);finishedLoading=F(!1);backupDefaults=F(null);applicationOptions=F(null);isNew=L(()=>this.backupId()==="new");shouldAutoSave=L(()=>!this.isDraft()&&!this.isNew());osType=L(()=>this.#t.systemInfo()?.OSType);isConnectionStringSaved=L(()=>{let t=this.targetUrlModel();return t?this.#o.destinations().some(e=>e.BaseUrl===t):!1});selectedOptions=F([]);sourceDataFormSignal=$e(this.sourceDataForm.valueChanges);generalFormSignal=$e(this.generalForm.valueChanges);encryptionFieldSignal=$e(this.generalForm.controls.encryption.valueChanges);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#a=F(null);#s=null;testSignal=this.#a.asReadonly();#_=Z(()=>{let t=this.targetUrlModel(),e=this.#a(),i=this.#s;this.#s=t,!(e==="testing"||i===null||i===t)&&this.#a.set(null)});#C=Z(()=>{let t=this.targetUrlModel(),e=this.connectionStringId();if(e){let i=this.#o.destinations();if(i.length===0)return;let o=i.find(a=>a.ID===e);!o||o.BaseUrl}});setTestState(t){this.#a.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=L(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[st,...t]});nonSelectedOptions=L(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0),this.#p().pipe(dt(e=>{let i=this.#c(),o=this.backupId(),a=i;if(a.Backup){e.length>0&&e[0]!==null?i.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(i.Backup.ConnectionStringID=void 0);let d=this.targetUrls().slice(1).map((m,E)=>{let A=e[E+1];return{TargetUrl:m.url,ConnectionStringID:A??void 0,UrlKey:m.urlKey}});d.length>0&&(a.Backup.AdditionalTargetURLs=d)}return this.isDraft()&&i.Backup&&(i.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}):this.#i.putApiV1BackupById({id:o,requestBody:i})}),Ge(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#c(),e=(t.Backup.Name??"").trim()!=="",o=(this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===!1||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!o)return this.#n.open(Q,{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 a=this.targetUrls();if(!(a.length>0&&a.some(m=>m.url.trim()!=="")))return this.#n.open(Q,{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 d=(t.Backup.Sources??[]).filter(m=>m.trim()!=="").length>0;return!d||!this.sourceDataForm.valid?(this.#n.open(Q,{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.#d(),this.#e.navigate(["/"]);return}this.#n.open(Q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#d(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",i=t.Filters?.map(d=>`${d.Include?"+":"-"}${d.Expression}`)??[],o=t.Settings?.find(d=>d.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],a=t.Settings?.find(d=>d.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,c={path:[...e,...i].join("\0"),excludes:{hidden:o.includes("hidden"),system:o.includes("system"),temporary:o.includes("temporary"),filesLargerThan:a===null?void 0:bt(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t,i=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=i?[{url:i,connectionStringId:o,urlKey:null,save:!!o}]:[],c=e.AdditionalTargetURLs?.map(d=>({url:d.TargetUrl,urlKey:d.UrlKey,connectionStringId:d.ConnectionStringID??null,save:!!d.ConnectionStringID}))??[];this.targetUrls.set([...a,...c])}mapGeneralToForm(t){let e=t.Name??"",i=t.Description??"",o=t.Settings?.find(E=>E.Name==="encryption-module"),a=t.Settings?.find(E=>E.Name==="passphrase")?.Value??"",c=o?.Value&&o.Value.length?o.Value:"",d=t.Settings?.find(E=>E.Name==="compression-module")?.Value??"",m={name:t.Name??"",description:t.Description??""};e&&e!==""&&(m.name=e),i&&i!==""&&(m.description=i),c&&c!==""&&(m.encryption=c),a&&a!==""&&(m.password=a,m.repeatPassword=a),d&&d!==""&&(m.compression=d),this.generalForm.patchValue(m)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#r.fromString(t.Repeat)??null,i=this.#m(t.Time);this.scheduleFields.autoRun.set(!0),i.date&&this.scheduleFields.nextTime.date.set(i.date),this.scheduleFields.nextTime.time.set(i.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")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let o=at(this.scheduleFields),a=Vt.find(c=>JSON.stringify(c.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(m=>m);if(e){let m=this.#l.serverSettings()??{};Object.keys(m).filter(E=>E.startsWith("--")).forEach(E=>{o.find(I=>I.Name===E)||o.push({Name:E,Value:m[E],Filter:null})})}let a=o.filter(m=>!i.includes(m.Name)),c=o.filter(m=>i.includes(m.Name));this.settings.set(a??[]),a?.forEach(m=>{if(m.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(m.Value??"")});var d="all";c?.forEach(m=>{if(m.Name==="keep-time"&&(m.Value??"")!=="")return d="time",this.optionsFields.backupRetentionTime.set(m.Value??"");if(m.Name==="keep-versions"&&(m.Value??"")!=="")return d="versions",this.optionsFields.backupRetentionVersions.set(m.Value?parseInt(m.Value):null);if(m.Name==="retention-policy"&&(m.Value??"")!=="")if(m.Value===vn)d="smart";else return d="custom",this.optionsFields.backupRetentionCustom.set(m.Value??"")}),this.optionsFields.backupRetention.set(d)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=at(this.scheduleFields);return wn(t)}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,a=this.targetUrls()[0],c=a?.url??null,d=i.path?.split("\0")??[],m=this.mapFormsToSettings(),E=Object.entries(i.excludes??{}).filter(([I,$])=>$&&I!=="filesLargerThan").map(([I])=>I),A=i.excludes?.filesLargerThan;return E.length&&m.push({Name:"--exclude-files-attributes",Value:E.join(",")}),A&&A.size!==null&&A.unit!==null&&m.push({Name:"--skip-files-larger-than",Value:`${A.size}${A.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:c??null,ConnectionStringID:a?.connectionStringId??null,Sources:d.filter(I=>!(I.startsWith("-")||I.startsWith("+"))),Settings:m,Filters:d.filter(I=>I.startsWith("-")||I.startsWith("+")).map((I,$)=>({Order:$,Include:I.startsWith("+"),Expression:I.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],o=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==st.Key&&(o=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(a=[]);let c=[];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:vn});break}let d=[...t,...i],m=this.settings().filter(E=>!d.includes(E.Name)).map(E=>{let A=E.Value;return typeof E.Value=="number"&&(A=E.Value.toString()),typeof E.Value=="boolean"&&(A=E.Value?"True":"False"),{Name:E.Name?.startsWith("--")?E.Name:`--${E.Name}`,Value:A}});return[...o,...a,...c,...m]}#p(){let t=this.targetUrls();if(t.length===0)return Be([]);let e=t.map(i=>{if(i.connectionStringId)return Be(i.connectionStringId);if(!i.save)return Be(null);let o=i.url,c=Pe(o)?.displayName??"Destination",m=this.#o.destinations().filter(I=>I.Name?.startsWith(c)).length,A={Name:`${c} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#o.save("new",A).pipe(ct(I=>I.Data?.ID??null))});return on(e).pipe(ut(i=>{let o=this.targetUrls();i.forEach((a,c)=>{if(a&&c<o.length&&(this.#o.reload(),o[c].connectionStringId!==a)){let d=o[c].urlKey;this.updateTargetUrl(c,o[c].url,a,d)}})}))}#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.toISOString().split("T")[0]}}setTargetUrl(t,e=!1,i=null,o=null){if(e&&(this.#s=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let c=[...a];return c.length===0?c.push({url:t,urlKey:o,connectionStringId:i,save:i?!0:en}):c[0]={url:t,urlKey:o,connectionStringId:i,save:i?!0:en},c})}addTargetUrl(t,e,i){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:i,save:e?!0:en}])}updateTargetUrl(t,e,i,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let c=[...a],d=c[t].save;return c[t]={url:e,connectionStringId:i,urlKey:o,save:i?!0:d},c})}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let i=[...e];return i[t]=ae(W({},i[t]),{save:!i[t].save}),i})}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((i,o)=>o!==t))}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Yt(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([])}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ne({token:n,factory:n.\u0275fac,providedIn:"root"})};var cl=["formRef"];function dl(n,t){n&1&&(l(0,"sh-alert",17),M(1,5),P(2,"sh-icon",26),x(),r())}function ul(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;b(" ",e.DisplayName," ")}}function pl(n,t){if(n&1&&P(0,"sh-progress-bar",40),n&2){let e=s(3);ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function ml(n,t){n&1&&(l(0,"span",35),O(1,10),r())}function Cl(n,t){n&1&&(M(0,8,1),P(1,"sh-icon"),x())}function gl(n,t){n&1&&(M(0,8,2),P(1,"sh-icon"),x())}function Tl(n,t){n&1&&(M(0,11,1),P(1,"sh-icon",42),x())}function Sl(n,t){n&1&&(M(0,11,2),P(1,"sh-icon"),x())}function El(n,t){if(n&1){let e=D();l(0,"button",41),h("click",function(){T(e);let o=s(3);return S(o.copyPassword())}),M(1,11),C(2,Tl,2,0)(3,Sl,2,0),x(),r()}if(n&2){let e=s(3);_(2),g(e.copiedPassword()?2:3)}}function fl(n,t){n&1&&(l(0,"sh-alert",39),O(1,12),r())}function hl(n,t){if(n&1){let e=D();l(0,"div",30)(1,"sh-form-field")(2,"label",31),M(3,7),P(4,"sup"),x(),r(),P(5,"input",32),r(),C(6,pl,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),P(8,"input",34),C(9,ml,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),h("click",function(){T(e);let o=s(2);return S(o.showPassword.set(!o.showPassword()))}),M(12,8),C(13,Cl,2,0)(14,gl,2,0),x(),r(),l(15,"button",37),h("click",function(){T(e);let o=s(2);return S(o.generatePassword())}),M(16,9),P(17,"sh-icon"),x(),r(),C(18,El,4,1,"button",38),r(),C(19,fl,2,0,"sh-alert",39),r()}if(n&2){let e=s(2);_(5),u("type",e.showPassword()?"text":"password"),_(),g(e.generalForm.value.password?6:-1),_(2),u("type",e.showPassword()?"text":"password"),_(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),g(e.showPassword()?13:14),_(5),g(e.showCopyPassword()?18:-1),_(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Fl(n,t){if(n&1&&(l(0,"sh-select",27)(1,"label",28),O(2,6),r(),P(3,"input",29),X(4,ul,1,1,"ng-template"),r(),C(5,hl,20,7,"div",30)),n&2){let e=s();u("options",e.encryptionOptions())("isClearable",!1),_(5),g(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Nl(n,t){if(n&1&&(l(0,"button",24),M(1,13),P(2,"sh-icon"),x(),r()),n&2){let e=s();u("disabled",e.nameAndDescriptionValid()===!1)}}function Dl(n,t){if(n&1&&(l(0,"button",25),M(1,14),P(2,"sh-icon"),x(),r()),n&2){let e=s();u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ve=new At,bn=(n={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>Ve.group({name:Ve.control(n.name,[Et.required]),description:Ve.control(n.description),encryption:Ve.control(n.encryption,[Rn()]),password:Ve.control(n.password,[jt(t=>t?.value.encryption!=="-",[Et.required])]),repeatPassword:Ve.control(n.repeatPassword,[jt(t=>t?.value.encryption!=="-",[Et.required])]),compression:Ve.control(n.compression)}),st={Key:"-",DisplayName:"None"},tn=class n{#e=R(Re);#t=R(We);#n=R(xn);#i=R(ye);#l=R(Se);formRef=ze.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=F(!1);copiedPassword=F(!1);showCopyPassword=F(!1);noneOptionKey=st.Key;encryptionEffect=Z(()=>{this.encryptionFieldSignal()===st.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=L(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=L(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#r(t??""),this.copiedPassword.set(!0)}async#r(t){try{await navigator.clipboard.writeText(t)}catch{try{let i=document.createElement("textarea");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#n.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.shouldAutoSave()&&this.#i.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&Je(i.formRef,cl,5),e&2&&Xe()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let i;i=$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 c;c=$localize`Backup description`;let d;d=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let E;E=$localize`Encryption`;let A;A=$localize`Encryption`;let I;I=$localize`Password`;let $;$=$localize`Repeat password`;let G;G=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let N;N=$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:`,N=ve(N);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let w;w=$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:`,w=ve(w);let z;z=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let pe;return pe=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,c,d,m,A,G,N,K,J,w,z,ue,pe,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",i,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",E,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",I,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"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,i){if(e&1){let o=D();l(0,"form",15,0),h("submit",function(){return T(o),S(i.next())}),l(2,"h3",16),O(3,1),r(),C(4,dl,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),M(7,2),P(8,"sup"),x(),r(),P(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),O(12,3),r(),P(13,"textarea",21),r(),C(14,Fl,6,3),l(15,"div",22)(16,"button",23),h("click",function(){return T(o),S(i.exit())}),M(17,4),P(18,"sh-icon"),x(),r(),C(19,Nl,3,1,"button",24)(20,Dl,3,1,"button",25),r()()}if(e&2){let o;u("formGroup",i.generalForm),_(4),g(!i.isNew()&&((o=i.generalFormSignal())==null?null:o.encryption)!==""?4:-1),_(10),g(i.isNew()?14:-1),_(5),g(i.encryptionFieldSignal()===i.noneOptionKey||!i.isNew()?19:20)}},dependencies:[He,ht,re,se,ft,Dt,Nt,Te,we,ne,Y,yt,It,Rt],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)}"],changeDetection:0})};export{qe as a,Qe as b,Kt as c,bn as d,st as e,tn as f,Vt as g,wn as h,Yt as i,qt as j,lt as k,Wt as l,rt as m,Gn as n,Qt as o,ye as p,Xt as q};
|
package/chunk-DKPWJYG3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-FJFREVRV.js";import"./chunk-OWBBT5WF.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as RelativeTimePipe};
|
package/chunk-GJGFMZUV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as a,o as b}from"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
package/chunk-HFNC6WUL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as C}from"./chunk-NWNCATHF.js";import"./chunk-ZKGGCQ2N.js";import{a as w}from"./chunk-5MKFV3IB.js";import"./chunk-7MPZ3MRD.js";import"./chunk-CTQKCCGM.js";import{p as k}from"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import"./chunk-ZPIR5QIQ.js";import"./chunk-23UYU3M3.js";import"./chunk-GGW26MAG.js";import"./chunk-FJFREVRV.js";import"./chunk-OWBBT5WF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import"./chunk-3MS6SVET.js";import{b as u}from"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{M as y,R as W}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as R,Bb as _,Bc as p,Cb as o,Db as n,Eb as a,Sa as r,Sb as F,Tb as l,Z as c,_b as O,fb as D,jc as L,oa as f,qa as P,vb as E,wb as g,zc as N}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var x=()=>["/restore-from-files/destination"],b=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),a(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),a(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),a(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),a(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,x)),r(3),_("routerLink",R(5,b)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),a(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),a(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#a=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#a(),e=this.#o()?.id,s=!!this.#n()?.find(d=>d.path==="restore-from-files"),T=!!i?.find(d=>d.path==="progress");this.isProgressPage.set(T),this.#t.init(e,s)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,s){e&2&&L("full-width",s.isProgressPage())},features:[N([C,k])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let d;d=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,s,T,d,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,s){e&1&&(a(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),a(3,"router-outlet"),n()),e&2&&(r(),g(s.isProgressPage()?-1:1))},dependencies:[W,y,w,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
|
package/chunk-I6PR2AV2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-EG3PT3XW.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as BytesPipe};
|
package/chunk-I7MAEY3S.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as M}from"./chunk-5MKFV3IB.js";import"./chunk-7MPZ3MRD.js";import"./chunk-CTQKCCGM.js";import"./chunk-23UYU3M3.js";import"./chunk-GGW26MAG.js";import"./chunk-FJFREVRV.js";import"./chunk-OWBBT5WF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as D,C as N,v as E}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{e as m}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as d,Bb as r,Cb as e,Db as n,Eb as o,Sa as C,Sb as s,Tb as l,Ub as i,fb as T}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let c;c=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let g;g=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,c,g,A,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,c){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(C(11),r("routerLink",d(2,f)),C(9),r("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
package/chunk-ISG53K32.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-NWNCATHF.js";import"./chunk-ZKGGCQ2N.js";import"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as createRestoreOptionsForm,b as default};
|
package/chunk-KICR4V2W.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a,h as b,i as c,j as d}from"./chunk-AWL7E6ZQ.js";import"./chunk-RWDQ3L3C.js";import"./chunk-V5ZJABDA.js";import"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as SCHEDULE_DEFAULT_OPTIONS,c as SCHEDULE_FIELD_DEFAULTS,d as default,b as scheduleOptionToSchedule};
|
package/chunk-KUGAORAS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,Ha as Ra,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as ya,r as z,ra as Ba,s as A,sa as Ca,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-VLMNSWR3.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as za,h as Aa}from"./chunk-VKNFRCHQ.js";import{Ca as b,ha as a}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ka as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Ra as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Qa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,ya as PlatformNavigation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Ha as VERSION,Ia as ViewportScroller,u as WeekDay,Aa as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Fa as isPlatformBrowser,Ga as isPlatformServer,La as provideCloudflareLoader,Ma as provideCloudinaryLoader,Na as provideImageKitLoader,Oa as provideImgixLoader,Pa as provideNetlifyLoader,Ca as registerLocaleData,e as \u0275DomAdapter,Ba as \u0275NavigationAdapterForLocation,Ja as \u0275NullViewportScroller,Da as \u0275PLATFORM_BROWSER_ID,Ea as \u0275PLATFORM_SERVER_ID,xa as \u0275PRECOMMIT_HANDLER_SUPPORTED,c as \u0275getDOM,i as \u0275normalizeQueryParams,za as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
|
package/chunk-KYTPZ3WD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as le}from"./chunk-GGW26MAG.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-EG3PT3XW.js";import{a as _e}from"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import{c as re}from"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as ie,D as ne,b as H,e as Q,i as Y,s as Z,v as ee,z as te}from"./chunk-Y46QCSB5.js";import{d as oe}from"./chunk-JJY6UOEY.js";import{d as j,e as q}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as J,Bb as N,Bc as X,Cb as n,Db as o,E as K,Fc as z,Ic as V,Lb as g,Pc as M,Sa as r,Ub as c,Uc as W,Vb as A,Wb as L,Xb as F,Yb as $,Z as u,_b as C,ca as p,da as P,fb as y,jc as x,l as k,mc as E,oa as T,p as U,rc as S,sc as D,tc as h,uc as G,vb as m,vc as w,wb as f,wc as v,z as I}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,4),o(),n(3,"p"),c(4,5),o(),n(5,"sh-checkbox",11),E(6," Delete local database "),n(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();n(0,"section")(1,"h4"),c(2,6),o(),n(3,"p"),c(4,7),z(5,"bytes"),o(),n(6,"sh-checkbox",11),E(7," Delete remote files "),n(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),i=v(0),e=(i==null||i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#i=u(te);#e=u(le);#n=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#i.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#n.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();G(0),n(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),n(4,"section")(5,"h4"),c(6,1),o(),n(7,"p"),c(8,2),o(),n(9,"button",8),E(10," Export configuration "),n(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),n(14,"div",9)(15,"button",8),c(16,3),o(),n(17,"button",10),$("click",function(){return p(e),P(i.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(i.backup()),a=i.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,i.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loading",i.isDeleting())}},dependencies:[ne,ie,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
|
package/chunk-NGPZXZJJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ye,b as $e}from"./chunk-AGMFKAHM.js";import{a as be}from"./chunk-CTQKCCGM.js";import{a as V}from"./chunk-6COK7FLL.js";import"./chunk-23UYU3M3.js";import{a as Re}from"./chunk-GGW26MAG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import{a as ve}from"./chunk-3QS6DB3O.js";import"./chunk-QY5UGQ3R.js";import{a as Ge}from"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import{a as De}from"./chunk-NGKFJLI2.js";import{c as Se,e as Me}from"./chunk-KUX6NGQU.js";import{B as R,G as Ne,H as fe,J as Pe,Q as Ie,Y as Le,c as ge,d as Ce,e as Te,i as he,r as me,s as Fe,t as Ee,v as M,w as Y,x as Ae,z as Oe}from"./chunk-Y46QCSB5.js";import{d as J}from"./chunk-JJY6UOEY.js";import{c as ue,e as de,f as pe}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ab as ne,Ac as le,Bb as A,Cb as s,Db as o,E as j,Eb as _,Lb as O,Pc as B,Sa as r,Sb as p,Tb as S,Tc as _e,Ub as f,Vc as ce,Xb as y,Yb as T,Yc as K,Z as d,_b as c,ca as m,da as F,fb as D,fc as ie,gc as oe,jc as U,lc as L,mc as u,nc as Q,oa as E,oc as $,qa as q,rc as b,sc as H,tc as w,uc as se,vb as g,vc as ae,wb as C,wc as x,xb as ee,xc as re,zb as te}from"./chunk-QY4Y5NJB.js";import{a as z,b as W}from"./chunk-7CGTOI24.js";var ke=["scroller"];function Ue(i,n){i&1&&(s(0,"sh-icon"),u(1,"bell-ringing"),o())}function Be(i,n){i&1&&(s(0,"sh-icon"),u(1,"bell"),o())}function Ye(i,n){if(i&1&&_(0,"app-notification",8),i&2){c(2);let e=x(6);A("index",0)("notification",e.content)}}function Je(i,n){if(i&1&&(s(0,"div",11),u(1),o()),i&2){c(3);let e=x(6);r(),$(" ",e.content.content," ")}}function Ve(i,n){if(i&1&&(s(0,"sh-alert")(1,"div",10),u(2),o(),g(3,Je,2,1,"div",11),o()),i&2){c(2);let e=x(6);L(e.content.type||"error"),r(2),Q(e.content.title),r(),C(e.content.content?3:-1)}}function Xe(i,n){if(i&1&&(s(0,"div",6),g(1,Ye,1,2,"app-notification",8)(2,Ve,4,4,"sh-alert",9),o()),i&2){c();let e=x(6);r(),C(e.type==="notification"?1:2)}}function ze(i,n){if(i&1){let e=O();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,2),s(4,"button",5),T("click",function(){m(e);let a=c();return F(a.toggleNotifications())}),_(5,"sh-icon"),o(),S(),o(),s(6,"div",14,0)(8,"div",15),_(9,"app-notifications"),o()()()()}}function We(i,n){if(i&1&&(s(0,"div",20),u(1),o()),i&2){let e=c().$implicit;r(),$(" ",e.content," ")}}function je(i,n){if(i&1){let e=O();s(0,"sh-alert",18,1),T("click",function(){let a=m(e).$implicit,l=c(2);return F(l.deleteAlertByIndex(a.id))}),s(2,"div",19),u(3),o(),g(4,We,2,1,"div",20),o()}if(i&2){let e=n.$implicit;L(e.type),A("id",e.id),r(3),Q(e.title),r(),C(e.content?4:-1)}}function qe(i,n){i&1&&(s(0,"p",17),f(1,4),o())}function Qe(i,n){if(i&1){let e=O();s(0,"div",7)(1,"div",12)(2,"h6",13),p(3,3),s(4,"button",5),T("click",function(){m(e);let a=c();return F(a.toggleAlerts())}),_(5,"sh-icon"),o(),S(),o(),s(6,"div",14,0)(8,"div",15),te(9,je,5,5,"sh-alert",16,ee,!1,qe,2,0,"p",17),o()()()()}if(i&2){let e=c();r(9),ne(e.alertHistory())}}var He=new me,k=class i{#e=d(Ae);#t=d(V);isSubmitting=E(!1);messageSent=E(!1);form=He.group({message:He.control("",[Ce.required])});notifications=this.#t.notifications;shownMessage=E(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=B(()=>this.alertHistory().filter(n=>n.isOpen).length);scroller=ce("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=E(null);previousNotificationsCount=E(null);constructor(){q(()=>{let n=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==n.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>W(z({},a),{countDown:a.countDown-1}))},1e3)):n.length&&this.previousHistoryCount()!==n.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:n[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(n.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>W(z({},a),{countDown:a.countDown-1}))},1e3))}),q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(n){this.#e.removeAlert(n)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ie(t.scroller,ke,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let n;n=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],n,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=O();s(0,"button",5),T("click",function(){return m(a),F(t.toggleAlerts())}),s(1,"sh-icon"),u(2,"info"),o()(),s(3,"button",5),T("click",function(){return m(a),F(t.toggleNotifications())}),g(4,Ue,2,0,"sh-icon")(5,Be,2,0,"sh-icon"),o(),se(6),g(7,Xe,3,1,"div",6),g(8,ze,10,0,"div",7),g(9,Qe,12,1,"div",7)}if(e&2){L(t.alertHistory().length?"error":""),r(3),L(t.notifications().length?"error":""),r(),C(t.notifications().length?4:5),r(2);let a=ae(t.shownMessage());r(),C(a?7:-1),r(),C(t.isNotificationsOpen()?8:-1),r(),C(t.isAlertsOpen()?9:-1)}},dependencies:[Ee,Y,M,R,$e,ye],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function Ke(i,n){i&1&&(s(0,"sh-icon",14),u(1,"check"),o())}function Ze(i,n){i&1&&(s(0,"sh-icon",15),u(1,"prohibit"),o())}function et(i,n){if(i&1){let e=O();s(0,"button",20),T("click",function(){m(e);let a=c();return F(a.updatePassphrase())}),f(1,5),o()}if(i&2){let e=c();U("loading",e.isUpdating())}}function tt(i,n){if(i&1){let e=O();s(0,"button",21),T("click",function(){m(e);let a=c();return F(a.updatePassphrase())}),f(1,6),o()}if(i&2){let e=c();U("loading",e.isUpdating()),A("disabled",!0)}}var X=class i{#e=d(J);closed=_e();isUpdating=E(!1);passphrase=E("");repeatPassphrase=E("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(j(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let n;n=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let l;l=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,l=y(l);let G;G=$localize`Passphrase`;let P;P=$localize`Repeat passphrase`;let I;I=$localize`Not now thanks`;let v;v=$localize` Yes, update passphrase now `;let h;return h=$localize` Yes, update passphrase now `,[a,l,G,P,I,v,h,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",n,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),f(2,0),o()(),s(3,"div",8)(4,"sh-alert",9),p(5,1),_(6,"br")(7,"br"),S(),o(),s(8,"sh-form-field")(9,"label",10),f(10,2),o(),s(11,"input",11),w("ngModelChange",function(l){return H(t.passphrase,l)||(t.passphrase=l),l}),o()(),s(12,"sh-form-field")(13,"label",12),f(14,3),o(),s(15,"input",13),w("ngModelChange",function(l){return H(t.repeatPassphrase,l)||(t.repeatPassphrase=l),l}),o(),g(16,Ke,2,0,"sh-icon",14)(17,Ze,2,0,"sh-icon",15),o()(),s(18,"footer",16)(19,"button",17),T("click",function(){return t.cancel()}),f(20,4),o(),g(21,et,2,2,"button",18)(22,tt,2,3,"button",19),o()),e&2&&(r(11),b("ngModel",t.passphrase),r(4),A("disabled",t.passphrase().length===0),b("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),U("loading",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Fe,ge,Te,he,Y,fe,M,Le,R],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var nt=()=>({exact:!0});function it(i,n){i&1&&(s(0,"sh-icon"),u(1,"sun"),o())}function ot(i,n){i&1&&(s(0,"sh-icon"),u(1,"moon"),o())}function st(i,n){if(i&1){let e=O();s(0,"button",26),T("click",function(){m(e);let a=c();return F(a.logout())}),p(1,8),_(2,"sh-icon"),S(),o()}}var Z=class i{#e=d(be);#t=d(J);#i=d(Re);#o=d(Se);#s=d(Oe);#a=d(V);#r=d(Me);#l=d(Ge);#n=d(De);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;machineName=B(()=>{let n=this.#l.serverSettings();if(n&&n["--machine-name"])return n["--machine-name"];if(n&&n["machine-name"])return n["machine-name"];let e=this.#n.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#n.systemInfo()?.MachineName??"Unknown"});ngOnInit(){return this.#a.init(),this.#i.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:n=>{let e=n["autogenerated-passphrase"]==="True",t=n["has-asked-for-password-change"]==="True";e&&!t&&this.#s.open(X,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(n){this.#_(n),window.location.replace(`/${n}`)}logout(){this.#r.logout()}#_(n){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+n+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let n;n=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let l;l=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let G;G=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let P;P=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,P=y(P);let I;I=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,I=y(I);let v;return v=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[n,e,t,a,l,G,P,I,v,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav",9),w("isOpenChange",function(l){return H(t.isNavOpen,l)||(t.isNavOpen=l),l}),s(1,"div",10)(2,"header"),_(3,"app-logo"),s(4,"button",11),T("click",function(){return t.toggleBodyClass()}),g(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),o()(),s(7,"sh-list",12)(8,"button",13),p(9,0),_(10,"sh-icon"),S(),o(),s(11,"button",14),p(12,1),_(13,"sh-icon"),S(),o(),s(14,"button",15),p(15,2),_(16,"sh-icon"),S(),o(),s(17,"button",16),p(18,3),_(19,"sh-icon"),S(),o(),s(20,"button",17),p(21,4),_(22,"sh-icon"),S(),o()(),_(23,"div",18),s(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),u(27,"desktop"),o(),u(28),o(),_(29,"sh-divider"),s(30,"button",21),p(31,5),_(32,"sh-icon"),S(),o(),s(33,"a",22),p(34,6),_(35,"sh-icon")(36,"sh-icon",23),S(),o(),s(37,"a",24),p(38,7),_(39,"sh-icon")(40,"sh-icon",23),S(),o(),g(41,st,3,0,"button",25),o()(),_(42,"router-outlet")(43,"app-service-hub"),o()),e&2&&(L(t.sidenavType()),b("isOpen",t.isNavOpen),A("disableDrag",!0),r(5),C(t.isDarkMode()?5:6),r(3),A("routerLinkActiveOptions",le(10,nt)),r(17),A("title",re(t.machineName())),r(3),$(" ",t.machineName()," "),r(13),C(t.relayIsEnabled()?-1:41))},dependencies:[ue,de,pe,Ie,M,Pe,R,Ne,k,ve],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"],changeDetection:0})};export{Z as default};
|
package/chunk-NWNCATHF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as tt}from"./chunk-ZKGGCQ2N.js";import{k as Ze,m as et}from"./chunk-AWL7E6ZQ.js";import{a as re}from"./chunk-V5ZJABDA.js";import{a as Ke}from"./chunk-EG3PT3XW.js";import{a as y}from"./chunk-7E5J43IH.js";import{b as _e}from"./chunk-4VYR5E5I.js";import{b as Qe}from"./chunk-KLAJGS5T.js";import{a as K}from"./chunk-NGKFJLI2.js";import{B as j,H as Xe,L as Ue,M as Ye,P as He,V as je,W as qe,b as Be,c as W,e as B,f as V,i as Ve,j as z,l as ze,p as J,q as X,r as U,s as Je,t as Y,v as H,z as se}from"./chunk-Y46QCSB5.js";import{d as q}from"./chunk-JJY6UOEY.js";import{b as D,d as L}from"./chunk-2K74TI2N.js";import{fa as ne}from"./chunk-VLMNSWR3.js";import{Ac as ke,Bb as S,C as Q,Cb as r,Db as a,E as I,Eb as c,Fc as le,Gc as we,H as Me,Hc as We,Ib as A,Jb as v,K as De,L as ee,Lb as M,Pc as N,Sa as d,Sb as m,Tb as T,U as Le,Ub as C,Vb as $e,Wb as be,Yb as f,Z as p,_b as O,ca as R,da as h,fb as w,g as Re,jc as Ae,kb as ye,m as he,mc as G,oa as u,oc as ve,pc as Ge,qa as k,rc as te,sc as oe,tc as ie,v as ae,vb as g,w as Pe,wb as E,z as Ie,zc as xe}from"./chunk-QY4Y5NJB.js";function lt(s,t){s&1&&(r(0,"p"),C(1,3),a())}function _t(s,t){s&1&&(r(0,"sh-form-field")(1,"label",11),C(2,4),a(),c(3,"input",12),a())}var ot=new U,st=()=>ot.group({passphrase:ot.control("")}),ue=class s{#e=p(q);#t=p($);#n=p(L);#i=p(D);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=u(!1);settings=u([]);hasEncryptedBackup=N(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=u(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let n=i.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),o.push({Name:n,Value:i.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(I(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let n=i.ID;this.#n.navigate([`/restore-draft/${n}`])},error:i=>{console.error(i)}})}back(){this.#t.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#i.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let n;n=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,i,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",n,"formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"form",5),f("submit",function(){return o.next()}),g(1,lt,2,0,"p"),g(2,_t,4,0,"sh-form-field"),r(3,"sh-toggle-card"),A(4,6),C(5,0),v(),r(6,"app-options-list",7),ie("optionsChange",function(n){return oe(o.settings,n)||(o.settings=n),n}),a()(),r(7,"div",8)(8,"button",9),f("click",function(){return o.back()}),m(9,1),c(10,"sh-icon"),T(),a(),r(11,"button",10),m(12,2),c(13,"sh-icon"),T(),a()()()),e&2&&(S("formGroup",o.encryptionForm),d(),E(o.hasEncryptedBackup()?-1:1),d(),E(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),d(4),te("options",o.settings),S("hasFreeTextSettings",!0))},dependencies:[Y,z,W,B,V,X,J,Xe,H,j,je,tt],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ut=()=>({standalone:!0});function ct(s,t){s&1&&c(0,"sh-progress-bar",8)}function pt(s,t){if(s&1&&(G(0),le(1,"bytes")),s&2){let e=O().$implicit;ve(" (",we(1,1,e.FileSizes),") ")}}function dt(s,t){s&1&&(r(0,"span",16),C(1,4),a())}function mt(s,t){if(s&1&&(r(0,"div",15),G(1),le(2,"date"),g(3,pt,2,3),g(4,dt,2,0,"span",16),a()),s&2){let e=t.$implicit;d(),Ge(" ",e.Version,": ",We(2,4,e.Time,"medium")," "),d(2),E(e.FileSizes?3:-1),d(),E(e.IsFullBackup===!1?4:-1)}}function Tt(s,t){s&1&&c(0,"sh-progress-bar",8)}function Ft(s,t){if(s&1){let e=M();r(0,"app-file-tree",17),f("hasExtendedData",function(i){R(e);let n=O(2);return h(n.extendedDataType.set(i))}),r(1,"label",18),C(2,5),a(),c(3,"input",19),a()}if(s&2){let e=O(2);S("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)}}function St(s,t){if(s&1){let e=M();r(0,"sh-select",12),f("cleared",function(){R(e);let i=O();return h(i.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(i){R(e);let n=O();return oe(n.selectOption,i)||(n.selectOption=i),h(i)}),a(),ye(2,mt,5,7,"ng-template"),a(),g(3,Tt,1,0,"sh-progress-bar",8),g(4,Ft,4,6,"app-file-tree",14)}if(s&2){let e=O();S("options",e.versionOptions())("isClearable",!1),d(),te("ngModel",e.selectOption),S("ngModelOptions",ke(6,ut)),d(2),E(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),E(e.showFileTree()?4:-1)}}var pe=new U,rt=()=>pe.group({filesToRestore:pe.control(""),passphrase:pe.control(null)}),de=class s{#e=p(q);#t=p($);#n=p(Qe);#i=p(K);#o=p(L);#s=p(D);#a=p(ne);#l=null;#_=null;#r=u([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=N(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=u(!1);backupSettings=u(null);rootPaths=u([]);initialNodes=u([]);loadingRootPath=u(!1);isRepairing=N(()=>this.#r().length>0);loadedVersions=u({});loadingEffect=k(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString())}});backupSettingsEffect=k(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),i=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(Z=>Z.Version===parseInt(e))?.Time??null;if(!l)return;let _=`${t}+${l}`,P=i[_];if(this.needsDatabaseRepair()&&(!P||o))return;let b={id:t+"",time:l};this.backupSettings.set(b),this.getRootPath(b)});repairEffect=k(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let i=this.backupId(),n=`${i}+${o.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(l=>[...l,n]),this.#e.postApiV1BackupByIdRepairupdate({id:i,requestBody:{only_paths:!0,time:o.Time}}).pipe(ee(this.abortLoading$),I(()=>{this.#_=null})).subscribe(l=>{let _=l.ID;this.#n.waitForTaskToComplete(_).pipe(Q(1)).subscribe(()=>{this.#r.update(P=>P.filter(b=>b!==n)),this.loadedVersions.update(P=>(P[n]=!0,P))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#i.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:!0}}).pipe(ee(this.abortLoading$),I(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:i=>{let n=(i.Data??[]).find(_=>_.Metadata&&_.Metadata.ExtType&&_.Metadata.ExtType.length>0);n&&this.extendedDataType.set(n.Metadata.ExtType);let l=(i.Data??[]).map(_=>_.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ee(this.abortLoading$),I(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:i=>{let n=i.Files.map(l=>l.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-select-files"]],features:[xe([ne])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`Select an option...`;let n;n=$localize`(partial)`;let l;return l=$localize`Path`,[["formRef",""],t,e,o,n,l,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=M();r(0,"form",6,0),f("submit",function(){return R(i),h(o.next())}),r(2,"h3",7),C(3,1),a(),g(4,ct,1,0,"sh-progress-bar",8)(5,St,5,7),r(6,"div",9)(7,"button",10),f("click",function(){return R(i),h(o.back())}),m(8,2),c(9,"sh-icon"),T(),a(),r(10,"button",11),m(11,3),c(12,"sh-icon"),T(),a()()()}e&2&&(S("formGroup",o.selectFilesForm),d(4),E(o.versionOptionsLoading()?4:5),d(5),$e(o.isFileRestore()?"Back":"Exit"),be(8))},dependencies:[Je,z,W,B,V,Ve,Y,X,J,re,j,H,He,Ue,ne,Ke],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var $=class s{#e=p(L);#t=p(D);#n=p(K);#i=p(se);#o=p(q);backupId=u(null);backup=u(null);destinationTargetUrl=u(null);destinationTestSignal=u(null);selectFilesForm=rt();optionsForm=at();encryptionForm=st();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=u(null);versionOptionsLoading=u(!1);versionOptions=u([]);isSubmitting=u(!1);isFileRestore=u(!1);isFullWidthPage=u(!1);extendedDataType=u(null);alternateRestorePath=u(null);alternateRestorePathSourcePrefix=u(null);init(t,e=!1){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup()}updateTargetUrl(t){this.destinationTargetUrl.set(t)}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#s(o.ID??"")},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#i.open(y,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.selectOption(),n=this.versionOptions()?.find(l=>l.Version===(i&&parseInt(i)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:n?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(I(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#i.open(y,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Ie(o=>{let i=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return i==="EncryptedStorageNoPassphrase"||i==="FolderMissing"||i==="EmptyRemoteFolder"||e===0?he(()=>o):Pe(1e3).pipe(De(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?ae([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Q(1),I(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#i.open(y,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:n=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,i=o==="EncryptedStorageNoPassphrase",n=o==="FolderMissing",l=o==="EmptyRemoteFolder",_=$localize`An error occurred while loading the backup filesets: ${e.message}`;i&&(_=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(_=$localize`The backup storage folder was not found.`),l&&(_=$localize`The backup storage folder does not contain any filesets.`),this.#i.open(y,{data:{title:$localize`Failed to load backup filesets`,message:_,confirmText:$localize`OK`,cancelText:void 0},closed:P=>{this.#e.navigate([i?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ae([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Me(3))]).pipe(Q(1),I(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(i=>({Version:i.Version??-1,IsFullBackup:(i.IsFullBackup??1)==1,Time:i.Time??"<missing>",FileCount:i.FileCount??void 0,FileSizes:i.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Le({token:s,factory:s.\u0275fac,providedIn:"root"})};function gt(s,t){if(s&1){let e=M();r(0,"sh-radio",27),m(1,6),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,7),r(5,"input",32),f("click",function(){R(e);let i=O(2);return h(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Et(s,t){if(s&1){let e=M();r(0,"sh-radio",27),m(1,8),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,9),r(5,"input",32),f("click",function(){R(e);let i=O(2);return h(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Ct(s,t){if(s&1&&(r(0,"app-file-tree",29)(1,"label",33),G(2,"Path"),a(),c(3,"input",34),a()),s&2){let e,o=O(2);S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Ot(s,t){if(s&1&&(r(0,"app-file-tree",30)(1,"label",33),G(2,"Path"),a(),c(3,"input",34),a()),s&2){let e=O(2);S("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl())}}function Nt(s,t){if(s&1&&(g(0,gt,6,0)(1,Et,6,0),r(2,"sh-radio",27),m(3,5),c(4,"input",28),T(),a(),g(5,Ct,4,2,"app-file-tree",29),g(6,Ot,4,4,"app-file-tree",30)),s&2){let e,o=O();E(o.extendedDataType()==="o365"?0:o.extendedDataType()==="gsuite"?1:-1),d(5),E(((e=o.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?5:-1),d(),E(o.showCustomRemoteRestoreTree()?6:-1)}}function ft(s,t){if(s&1&&(r(0,"sh-radio",27),m(1,10),c(2,"input",35),T(),a(),r(3,"sh-radio",27),m(4,11),c(5,"input",28),T(),a(),r(6,"app-file-tree",29)(7,"label",33),G(8,"Path"),a(),c(9,"input",34),a()),s&2){let e,o=O();d(6),S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Rt(s,t){s&1&&(r(0,"app-toggle-card",22),A(1,23),C(2,12),v(),r(3,"sh-toggle",27),m(4,13),c(5,"input",36),T(),a()()),s&2&&S("disableToggle",!0)}function ht(s,t){s&1&&(r(0,"app-toggle-card",22),A(1,23),C(2,14),v(),r(3,"sh-radio",27),m(4,15),c(5,"input",37),T(),a(),r(6,"sh-radio",27),m(7,16),c(8,"input",38),T(),a()(),r(9,"app-toggle-card"),A(10,23),C(11,17),v(),r(12,"sh-toggle",39),m(13,18),c(14,"input",40),T(),a(),r(15,"sh-toggle",39),m(16,19),c(17,"input",41),T(),a()()),s&2&&S("disableToggle",!0)}var x=new U,at=()=>x.group({restoreFrom:x.control("original"),restoreFromPath:x.control(""),handleExisting:x.control("saveTimestamp"),permissions:x.control(!1),includeMetadata:x.control(!0),customRemoteIgnoreExisting:x.control(!1)}),me=class s{#e=p($);#t=p(L);#n=p(D);#i=p(K);#o=p(se);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=u(null);backupId=N(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=N(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=N(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=N(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=N(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=N(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=N(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=N(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(et,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"))}),!1}#s=k(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#i.systemInfo()?.DirectorySeparator){this.#o.open(y,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(y,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Office 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let i=this.optionsFormSignal()?.customRemoteIgnoreExisting,n=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${n}&google-ignore-existing=${i?"true":"false"}`:`@office365://${encodeURIComponent(o)}${n}&office365-ignore-existing=${i?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null,null);this.#e.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let n;n=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Office 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Different Office 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize`Restore settings`;let Se;Se=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`How do you want to handle existing files?`;let Ee;Ee=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ce;Ce=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Oe;Oe=$localize`Metadata settings`;let Ne;Ne=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let fe;return fe=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,i,n,l,_,P,b,Z,Te,Fe,Se,ge,Ee,Ce,Oe,Ne,fe,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){if(e&1){let i=M();r(0,"form",20,0),f("submit",function(){return R(i),h(o.submit())}),r(2,"h3",21),C(3,1),a(),r(4,"app-toggle-card",22),A(5,23),C(6,2),v(),g(7,Nt,7,3)(8,ft,10,2),a(),g(9,Rt,6,1,"app-toggle-card",22)(10,ht,18,1),r(11,"div",24)(12,"button",25),f("click",function(){return R(i),h(o.goBack())}),m(13,3),c(14,"sh-icon"),T(),a(),r(15,"button",26),m(16,4),c(17,"sh-icon"),T(),a()()()}e&2&&(S("formGroup",o.optionsForm),d(4),S("disableToggle",!0),d(3),E(o.extendedDataType()!==null?7:8),d(2),E(o.isCustomRemoteRestore()?9:10),d(6),Ae("loading",o.isSubmitting()))},dependencies:[Y,z,W,Be,ze,B,V,X,J,Ze,re,qe,Ye,j,H],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{at as a,me as b,st as c,ue as d,rt as e,de as f,$ as g};
|
package/chunk-PVWYJV5Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-WLAJ3YIP.js";import"./chunk-OWBBT5WF.js";import"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";export{a as DurationFormatPipe};
|