@duplicati/ngclient 0.0.209 → 0.0.211
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/{chunk-7J6AVYZE.js → chunk-2TGB7FK7.js} +1 -1
- package/{chunk-5ECY4LSP.js → chunk-36J3WTHV.js} +1 -1
- package/{chunk-WZV32HLQ.js → chunk-3DFXRSFL.js} +1 -1
- package/{chunk-5KQZMHFN.js → chunk-5MOLXRIQ.js} +1 -1
- package/{chunk-UGEDZCTM.js → chunk-5N2VOOTZ.js} +1 -1
- package/{chunk-7ZA3Q6TS.js → chunk-64W3VKAP.js} +1 -1
- package/{chunk-EL2UKEXS.js → chunk-6FBNKISB.js} +1 -1
- package/{chunk-ODHFI4PA.js → chunk-7HXPIZN6.js} +1 -1
- package/{chunk-OSAM5F7M.js → chunk-A7BE7GAK.js} +1 -1
- package/{chunk-TYEWJKJU.js → chunk-ANLSBAWJ.js} +1 -1
- package/{chunk-64IX6ISO.js → chunk-AXBVBB2B.js} +1 -1
- package/{chunk-RNTBVXBV.js → chunk-BKEVAAWN.js} +1 -1
- package/{chunk-AZFGZQQK.js → chunk-CCUGG5E4.js} +1 -1
- package/{chunk-JW6W3ER7.js → chunk-COT66FJB.js} +1 -1
- package/chunk-CVTB53TL.js +1 -0
- package/{chunk-3WOW2XM3.js → chunk-DGPSGSEP.js} +1 -1
- package/{chunk-Q5WLMQD4.js → chunk-DV7RWC4G.js} +1 -1
- package/{chunk-6HMNDYMY.js → chunk-EGJL4XXZ.js} +1 -1
- package/chunk-FCVVFGU2.js +1 -0
- package/{chunk-BSYMQ4VF.js → chunk-FXZ3K2FU.js} +1 -1
- package/{chunk-2V75WWT2.js → chunk-GCFBX62M.js} +1 -1
- package/{chunk-I2HYK2BL.js → chunk-GSDHTV3P.js} +1 -1
- package/{chunk-UUQWSINE.js → chunk-HDJL2F2F.js} +1 -1
- package/{chunk-AZJ2P3YU.js → chunk-HUJGWHH6.js} +1 -1
- package/chunk-I7HI454U.js +1 -0
- package/chunk-IHB6NRMQ.js +1 -0
- package/chunk-IV3M3Q6B.js +1 -0
- package/{chunk-2XMYVT7N.js → chunk-JTO22TJU.js} +1 -1
- package/{chunk-2T442RZU.js → chunk-KAZ3YMHR.js} +1 -1
- package/chunk-KEHA3UWS.js +1 -0
- package/chunk-KQZRDX7C.js +1 -0
- package/{chunk-CPI5ZQUF.js → chunk-LIDIFLHF.js} +1 -1
- package/{chunk-HA7XREWO.js → chunk-MI32HHLT.js} +1 -1
- package/{chunk-4QE3MT56.js → chunk-MNK3XRJD.js} +1 -1
- package/{chunk-7YLK4QIL.js → chunk-N35VE3MO.js} +1 -1
- package/{chunk-QEIGUOTC.js → chunk-NQIZGFSO.js} +1 -1
- package/{chunk-LMZN2X5M.js → chunk-PSRISEFO.js} +1 -1
- package/{chunk-FE3ADWR5.js → chunk-SA6PEMWL.js} +1 -1
- package/{chunk-DHOED4DH.js → chunk-SP3KG7FO.js} +1 -1
- package/{chunk-BQEUHLSB.js → chunk-SSUCTZ3H.js} +1 -1
- package/{chunk-3SSB4QCJ.js → chunk-UY2WEUKC.js} +1 -1
- package/{chunk-B35WNLRM.js → chunk-WBTDGQME.js} +1 -1
- package/{chunk-RC3UQLPB.js → chunk-WSFAOFM3.js} +1 -1
- package/chunk-XE42CXGY.js +1 -0
- package/{chunk-4NENQSXM.js → chunk-XRSDTFDU.js} +1 -1
- package/{chunk-47PB4WN3.js → chunk-YIKPWYEP.js} +1 -1
- package/{chunk-JKIZ6U22.js → chunk-YIM56S4M.js} +1 -1
- package/{chunk-MAKVVEKB.js → chunk-Z772CHAB.js} +1 -1
- package/{chunk-CNOKPOR3.js → chunk-ZVWTSTR6.js} +1 -1
- package/{chunk-CNUQWXBC.js → chunk-ZY64T3CX.js} +1 -1
- package/index.html +1 -1
- package/main-4RMOPKNF.js +1 -0
- package/package.json +1 -1
- package/chunk-77ALZWIA.js +0 -1
- package/chunk-FKCZIBN3.js +0 -1
- package/chunk-G7XKFPGX.js +0 -1
- package/chunk-LO5YNFFR.js +0 -1
- package/chunk-O7MDPYFW.js +0 -1
- package/chunk-SEFBKH36.js +0 -1
- package/chunk-XHUMSL6X.js +0 -1
- package/chunk-XQTUBHIK.js +0 -1
- package/main-7RC24G3G.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ln,b as Yt,c as wn}from"./chunk-ITA7DTN3.js";import{a as Qe,b as kt,c as Vt,d as xn}from"./chunk-Q72Y55NB.js";import{a as An,b as In,c as ye,d as bt,e as Pn,f as On,g as Ut,i as yn,j as Mn,k as Rn}from"./chunk-NXF5BMPG.js";import{a as Dn}from"./chunk-HA7XREWO.js";import{a as te}from"./chunk-RFB5A3B7.js";import{a as vt}from"./chunk-3SSB4QCJ.js";import{a as Fn,b as ve,c as Nn}from"./chunk-AYOFR344.js";import{a as Ee}from"./chunk-BEXYTIOL.js";import{B as ee,C as En,E as Mt,F as fn,H as Se,K as Rt,L as xt,O as Lt,P as Ge,V as wt,W as Ye,Y as $t,a as Cn,b as ht,c as oe,d as Ft,e as ae,f as Nt,h as gn,i as ce,j as Dt,k as At,n as Tn,o as Sn,p as It,q as Pt,r as Ot,s as de,t as qe,v as Z,w as yt,z as $e}from"./chunk-YCLTQEU6.js";import{c as hn,d as Gt}from"./chunk-2LSZ2I43.js";import{b as je,d as we,e as mn}from"./chunk-BMWZYMK6.js";import{aa as pn}from"./chunk-OQ6BKP5N.js";import{$b as Fe,Ab as u,Ac as ie,Bb as l,Bc as me,Cb as r,Cc as ft,D as rn,Db as O,E as be,Hb as Te,Ib as ue,Ic as ke,Jb as ne,K as mt,Kb as D,M as Ct,N as sn,O as gt,Oa as Tt,P as _n,Pc as R,Ra as _,Rb as y,Sb as M,Tb as A,U as Ae,Uc as xe,Vc as k,Wb as Ue,Wc as He,Xb as E,Z as x,Zb as s,Zc as Ve,_b as Xe,a as an,ca as f,da as h,eb as z,ec as ze,f as ut,fc as We,ga as cn,gc as Y,hc as Et,ic as pe,jb as W,l as Je,lc as p,mb as dn,mc as qt,nc as B,oa as F,oc as lt,p as pt,qa as Q,qc as b,rc as v,sc as U,tb as St,tc as _e,ub as C,uc as q,v as ln,vb as g,vc as S,wb as Ie,yb as Pe,yc as un,zb as Oe,zc as Re}from"./chunk-ERITO7WM.js";import{a as j,b as se}from"./chunk-7CGTOI24.js";var Bt=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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function rt(n){if(dn(n))return n();if(Array.isArray(n))return n.map(t=>rt(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=rt(n[e]));return t}return n}var Vn=n=>n;function $n(n,t){let e=sn(n,Vn,t?.equal),i=e[an],o=e;return o.set=a=>{let c=e();return gt(i,a),()=>{gt(i,c)}},o.update=a=>{let c=e();return _n(i,a),()=>{gt(i,c)}},e}var Ze=class n{#e=x(hn);isSaving=F(!1);resourceDestinations=Nn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=$n(()=>{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(be(()=>{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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function Bn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),A(3,7),r(),l(4,"input",28,0),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),h(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),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),h(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),A(18,8),r(),l(19,"input",34),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),h(o)}),r()(),l(20,"sh-select",35)(21,"input",36),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),h(o)}),r()()(),l(22,"sh-toggle-card",37),Te(23,38),A(24,9),ue(),l(25,"div",39)(26,"sh-toggle",24),y(27,10),l(28,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),h(o)}),r(),M(),r(),l(29,"sh-toggle",24),y(30,11),l(31,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),h(o)}),r(),M(),r(),l(32,"sh-toggle",24),y(33,12),l(34,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),h(o)}),r(),M(),r(),l(35,"sh-toggle",24),y(36,13),l(37,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),h(o)}),r(),M(),r(),l(38,"sh-toggle",24),y(39,14),l(40,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),h(o)}),r(),M(),r(),l(41,"sh-toggle",24),y(42,15),l(43,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),h(o)}),r(),M(),r(),l(44,"sh-toggle",24),y(45,16),l(46,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),h(o)}),r(),M(),r()()()}if(n&2){let e=s(2);_(4),b("ngModel",e.scheduleFields.nextTime.time),_(7),b("ngModel",e.scheduleFields.nextTime.date),_(8),b("ngModel",e.scheduleFields.runAgain.repeatValue),_(),u("options",e.unitOptions)("isClearable",!1),_(),b("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),u("disableToggle",!0),_(6),b("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Kn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),y(2,5),l(3,"input",25),U("ngModelChange",function(o){f(e);let a=s();return v(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),h(o)}),r(),M(),r(),l(4,"p"),A(5,6),r()(),C(6,Bn,47,14)}if(n&2){let e=s();_(3),b("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var Jn=[{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`}],Kt=[{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:Xn().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 Gn(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 Xn(){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 Zt=()=>({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=x(Me);#t=x(we);#n=x(je);unitOptions=Jn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Kt;updateScheduleType(t){let e=Kt.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=z({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 T;T=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$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,T,I,P,w,$,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),A(1,2),r(),l(2,"sh-select",18)(3,"input",19),E("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),C(4,Kn,7,2),l(5,"div",20)(6,"button",21),E("click",function(){return i.goBack()}),y(7,3),O(8,"sh-icon"),M(),r(),l(9,"button",22),E("click",function(){return i.next()}),y(10,4),O(11,"sh-icon"),M(),r()()),e&2&&(_(2),u("isClearable",!1)("options",i.scheduleOptions),_(),u("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[de,oe,At,ht,ae,ce,Se,Ye,Z,ee,Ge,wt,fn],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 zn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Wn=["[title]","[description]","[action]","*"];function Hn(n,t){n&1&&p(0,"Title")}function jn(n,t){n&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var st=class n{isActive=Ve(!1);disableToggle=k(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&pe("active",i.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Xe(zn),l(0,"header")(1,"div",0)(2,"h3",1),E("click",function(){return i.disableToggle()||i.toggle()}),Fe(3,0,null,Hn,1,0),C(5,jn,2,0,"sh-icon"),r(),Fe(6,1),r(),l(7,"div",2),Fe(8,2),r()(),l(9,"div",3),Fe(10,3),r()),e&2&&(_(5),g(i.disableToggle()?-1:5))},dependencies:[Z],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 qn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r()()}if(n&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),b("ngModel",e.internalPath)}}function Yn(n,t){if(n&1&&(l(0,"div",7),p(1),r()),n&2){let e,i=s(2);_(),qt((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);_(),qt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function Zn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r(),C(2,Yn,2,1,"div",7),C(3,Qn,2,1,"div",8),r()}if(n&2){let e,i,o=s();_(),b("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 ei=[{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"}],ti=[{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"}],Jt=class n{path=k.required();osType=k();pathChange=xe();remove=xe();internalPath=F("");pathType=F("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(ei);expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return ti.map(i=>i.value==="-Folder"||i.value==="+Folder"?se(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?se(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?se(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?se(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?se(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?se(j({},i),{startsWith:"*.",endsWith:""}):se(j({},i),{startsWith:"",endsWith:""}))});pathEffect=Q(()=>{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=z({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),U("ngModelChange",function(a){return v(i.pathType,a)||(i.pathType=a),a}),E("ngModelChange",function(){return i.updateFilter()}),r()(),C(2,qn,2,4,"sh-select",2)(3,Zn,4,3,"sh-form-field",3),l(4,"div",4),E("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),_(),b("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[de,oe,ae,ce,Ge,Se,Z],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 _t=class n{data=k();closed=xe();path=F("");isValid=R(()=>this.path().length>0);dataEffect=Q(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:13,vars:3,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Local disk source`;let i;i=$localize`Folder path`;let o;o=$localize`Cancel`;let a;return a=$localize` Use this source `,[e,i,o,a,[1,"title-30"],["content",""],[3,"customRemoteMode"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5)(4,"app-file-tree",6)(5,"label",7),A(6,1),r(),l(7,"input",8),U("ngModelChange",function(a){return v(i.path,a)||(i.path=a),a}),r()()(),l(8,"footer",9)(9,"button",10),E("click",function(){return i.closed.emit(null)}),A(10,2),r(),l(11,"button",11),E("click",function(){return i.submit()}),A(12,3),r()()),e&2&&(_(4),u("customRemoteMode","diskimage"),_(3),b("ngModel",i.path),_(4),u("disabled",!i.isValid()))},dependencies:[ee,Qe,de,oe,ae,ce],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 ni=[[["","displayName",""]],[["","description",""]],"*"],ii=["[displayName]","[description]","*"];function oi(n,t){if(n&1&&p(0),n&2){s(2);let e=S(1);B(" ",e.Name," ")}}function ai(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.displayName," ")}}function li(n,t){n&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function ri(n,t){n&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function si(n,t){if(n&1&&p(0),n&2){s();let e=S(15);B(" ",e," ")}}function _i(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.description," ")}}function ci(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),O(2,"img",2),r(),l(3,"div",3)(4,"div",4),Fe(5),r(),l(6,"div",5),C(7,oi,1,1)(8,ai,1,1),r(),C(9,li,2,0,"sh-chip",6)(10,ri,2,0,"sh-chip",7),r(),l(11,"div",8)(12,"div",4),Fe(13,1),r(),l(14,"div",5),_e(15),C(16,si,1,1)(17,_i,1,1),r()(),l(18,"div",9),Fe(19,2),r()()),n&2){let e=s(),i=S(0),o=S(1);u("variant",e.variant()),_(2),u("src",i.icon,Tt),St("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=q(e.getSimplePath(o==null?null:o.BaseUrl));_(),g(a&&a.length>0?16:17)}}var et=class n{destination=k();targetUrl=k();variant=k("type-b");connectionStringId=k();#e=x(Ze);connectionString=R(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=R(()=>{let t=this.targetUrl();return t?ye(t)??null:null});destinationFromTargetUrl=R(()=>{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=R(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?In(t):""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:ii,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&&(Xe(ni),_e(0)(1),C(2,ci,20,7,"sh-card",0)),e&2){let o=q(i.destinationItem());_(),q(i.connectionString()),_(),g(o?2:-1)}},dependencies:[En,Mt],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 tt=class n{#e=x(Ee);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=Pn(e.Key);if(i.length<=1){let o=bt(e.Key);return o.isDefaultEntry===!0?[se(j({},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=R(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=R(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=R(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=R(()=>[...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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function di(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),E("click",function(){let o=f(e).$implicit,a=s();return h(a.setDestination.emit(o.customKey??o.key))}),y(2,0),O(3,"sh-icon"),M(),r()()}if(n&2){let e=t.$implicit;u("destination",e)}}var Xt=class n{#e=x(tt);showAsSources=k(!1);moduleType=k("Backend");setDestination=xe();destinationSearchTerm=F("");destinationTypeOptions=R(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=R(()=>{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=z({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),U("ngModelChange",function(a){return v(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),Pe(3,di,4,1,"app-destination-list-item",3,Ie),r()),e&2&&(_(),b("ngModel",i.destinationSearchTerm),_(2),Oe(i.destinationTypeOptionsFocused()))},dependencies:[et,de,oe,ae,ce,Se,ee,Z],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 ui=["fileInput"],pi=[[["label"]]],mi=["label"],zt=class n{customId=k();content=F("");readonly=F(!1);placeholder=k($localize`Drop a file here or use the browse button`);fileInputRef=He("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=Q(()=>{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=z({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,ui,5),e&2&&We()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[un([{provide:Cn,useExisting:n,multi:!0}])],ngContentSelectors:mi,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();Xe(pi),Fe(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),E("click",function(){return i.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),E("drop",function(c){return i.onFileDrop(c)})("dragover",function(c){return i.onDragOver(c)}),l(6,"textarea",4),U("ngModelChange",function(c){return f(o),v(i.content,c)||(i.content=c),h(c)}),r()(),l(7,"input",5,0),E("change",function(c){return i.onFileSelected(c)}),r()}e&2&&(_(6),u("placeholder",i.placeholder()),b("ngModel",i.content),u("disabled",i.readonly()))},dependencies:[de,oe,ae,ce,Z,ee],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 Ci=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),re=n=>({$implicit:n}),gi=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Ti=()=>({updateOn:"blur"}),Si=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),Ei=()=>["/connect/logon"];function fi(n,t){n&1&&ne(0)}function hi(n,t){if(n&1&&W(0,fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Ci,i,e,a,c.oauthField)))}}function Fi(n,t){n&1&&ne(0)}function Ni(n,t){if(n&1&&W(0,Fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,gi,i,e,a,c.oauthField)))}}function Di(n,t){if(n&1){let e=D();l(0,"button",25),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!1))}),y(1,8),O(2,"sh-icon"),M(),r()}}function Ai(n,t){if(n&1){let e=D();l(0,"button",32,2),E("click",function(){let o=f(e).$implicit,a=s(3);return h(a.addAdvancedOption(o))}),p(2),r()}if(n&2){let e=t.$implicit;_(2),B(" ",e.name," ")}}function Ii(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),y(3,9),O(4,"sh-icon"),M(),r(),Te(5,28),Pe(6,Ai,3,1,"button",29,Ie),ue(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),Te(12,28),l(13,"button",31),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),ue(),r()()}if(n&2){s();let e=S(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Oe(e)}}function Pi(n,t){if(n&1){let e=D();l(0,"textarea",33),E("ngModelChange",function(o){f(e);let a=s(2);return h(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Re(2,Ti))}}function Oi(n,t){n&1&&ne(0)}function yi(n,t){if(n&1&&W(0,Oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=Y(15),a=s(),c=S(0),d=S(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Si,i,m,c,d.oauthField)))}}function Mi(n,t){if(n&1&&Pe(0,yi,1,9,"ng-container",null,Ie),n&2){let e=s(2);Oe(e.advancedFormFieldNames())}}function Ri(n,t){n&1&&(l(0,"sup",42),p(1,"*"),r())}function xi(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 Li(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),C(2,Ri,2,0,"sup",42),p(3),C(4,xi,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(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 wi(n,t){n&1&&(l(0,"sup",45),p(1,"*"),r())}function $i(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 Gi(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),C(2,wi,2,0,"sup",45),p(3),C(4,$i,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(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 vi(n,t){n&1&&(l(0,"sup",46),p(1,"*"),r())}function bi(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 Ui(n,t){n&1&&(l(0,"sh-icon",47),p(1," warning "),r())}function ki(n,t){n&1&&ne(0)}function Vi(n,t){if(n&1&&(l(0,"sh-icon",51),p(1," link "),r()),n&2){s();let e=S(8),i=S(9);pe("error",e&&i==="error")("warn",e&&i==="warning"),u("shTooltip",e)}}function Bi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"envelope"),r())}function Ki(n,t){n&1&&(l(0,"sh-icon",50),p(1,"hard-drives"),r())}function Ji(n,t){n&1&&(l(0,"sh-icon",50),p(1,"jar"),r())}function Xi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"textbox"),r())}function zi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,vi,2,0,"sup",46),p(3),C(4,bi,2,1,"sh-icon",43),C(5,Ui,2,0,"sh-icon",47),W(6,ki,1,0,"ng-container",24),r(),l(7,"input",48),E("keydown",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),_e(8)(9),C(10,Vi,2,5,"sh-icon",49)(11,Bi,2,0,"sh-icon",50)(12,Ki,2,0,"sh-icon",50)(13,Ji,2,0,"sh-icon",50)(14,Xi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(5);s();let m=Y(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",ie(16,re,me(13,fe,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let T=a,I=s().hasLeadingSlash(T??"");_(),q(I&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),q(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 Wi(n,t){n&1&&(l(0,"sup",52),p(1,"*"),r())}function Hi(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 ji(n,t){n&1&&ne(0)}function qi(n,t){if(n&1){let e=D();l(0,"span",56),E("click",function(){f(e);let o=s(2).$implicit,a=s(2);return h(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function Yi(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),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function Zi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function eo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Wi,2,0,"sup",52),p(3),C(4,Hi,2,1,"sh-icon",43),W(5,ji,1,0,"ng-container",24),r(),l(6,"input",53),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),C(7,qi,2,0,"span",54)(8,Yi,2,0,"sh-icon",50),C(9,Qi,2,0,"sh-icon",55)(10,Zi,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(14,re,me(11,fe,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 to(n,t){n&1&&(l(0,"sup",59),p(1,"*"),r())}function no(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&&ne(0)}function oo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function ao(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),C(2,to,2,0,"sup",59),p(3),C(4,no,2,1,"sh-icon",43),W(5,io,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,oo,1,2,"ng-template",null,3,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(14,re,me(11,fe,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function lo(n,t){if(n&1&&(_e(0),C(1,ao,9,16)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function ro(n,t){n&1&&(l(0,"sup",62),p(1,"*"),r())}function so(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 _o(n,t){n&1&&ne(0)}function co(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),C(2,ro,2,0,"sup",62),p(3),C(4,so,2,1,"sh-icon",43),W(5,_o,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,co,1,2,"ng-template",null,4,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(15,re,me(12,fe,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function po(n,t){n&1&&O(0,"sh-progress-bar",60)}function mo(n,t){if(n&1&&(_e(0),C(1,uo,9,17)(2,po,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=S(2),o=q(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function Co(n,t){n&1&&(l(0,"sup",64),p(1,"*"),r())}function go(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 To(n,t){n&1&&ne(0)}function So(n,t){if(n&1){let e=D();l(0,"app-size",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,Co,2,0,"sup",64),p(3),C(4,go,2,1,"sh-icon",43),W(5,To,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView)))}}function Eo(n,t){n&1&&(l(0,"sup",65),p(1,"*"),r())}function fo(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 ho(n,t){n&1&&ne(0)}function Fo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Eo,2,0,"sup",65),p(3),C(4,fo,2,1,"sh-icon",43),W(5,ho,1,0,"ng-container",24),r(),l(6,"input",66),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(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=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(11,re,me(8,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o)}}function No(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 Do(n,t){n&1&&ne(0)}function Ao(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),E("click",function(){f(e);let o=s().$implicit,a=S(2),c=s(2);return h(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),p(2),C(3,No,2,1,"sh-icon",43),W(4,Do,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(5);s();let c=Y(17),d=s();pe("active",d.isTrue(o)),_(),u("for",a),_(),B(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ie(10,re,me(7,fe,e.fieldGroup,e.formView)))}}function Io(n,t){n&1&&(l(0,"sup",69),p(1,"*"),r())}function Po(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 Oo(n,t){n&1&&ne(0)}function yo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Mo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),C(2,Io,2,0,"sup",69),p(3),C(4,Po,2,1,"sh-icon",43),W(5,Oo,1,0,"ng-container",24),r(),l(6,"input",70),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,yo,1,2,"ng-template",null,5,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(13,re,me(10,fe,o.fieldGroup,o.formView))),_(),u("ngModel",c)}}function Ro(n,t){if(n&1&&(_e(0),C(1,Mo,9,15)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function xo(n,t){n&1&&(l(0,"sup",71),p(1,"*"),r())}function Lo(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 wo(n,t){n&1&&ne(0)}function $o(n,t){if(n&1){let e=D();l(0,"app-timespan",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,xo,2,0,"sup",71),p(3),C(4,Lo,2,1,"sh-icon",43),W(5,wo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView)))}}function Go(n,t){n&1&&(l(0,"sup",73),p(1,"*"),r())}function vo(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 bo(n,t){n&1&&ne(0)}function Uo(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),C(2,Go,2,0,"sup",73),p(3),C(4,vo,2,1,"sh-icon",43),W(5,bo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(2),o=S(4),a=S(5);s();let c=Y(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",ie(11,re,me(8,fe,e.fieldGroup,e.formView)))}}function ko(n,t){n&1&&(O(0,"sh-spinner"),l(1,"span"),A(2,10),r()),n&2&&Et("--spinner-size","16px")("--spinner-thickness","2px")}function Vo(n,t){n&1&&(l(0,"div",76),A(1,11),r())}function Bo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ko(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"),A(5,12),r()(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(4).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Bo,1,2,"ng-template",null,6,ke)}if(n&2){s(4);let e=S(2),i=S(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",i),_(5),u("id",i)("ngModel",e)}}function Jo(n,t){if(n&1&&C(0,ko,3,4)(1,Vo,2,0,"div",76)(2,Ko,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Xo(n,t){n&1&&(l(0,"sup",79),p(1,"*"),r())}function zo(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 Wo(n,t){n&1&&ne(0)}function Ho(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e),s(4);let o=S(5),a=s(2);return h(a.toggleDisabled(o))}),y(1,13),O(2,"sh-icon"),M(),r()}}function jo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Xo,2,0,"sup",79),p(3),C(4,zo,2,1,"sh-icon",43),W(5,Wo,1,0,"ng-container",24),r(),l(6,"input",80),E("ngModelChange",function(o){f(e);let a=s(3).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"textbox"),r()(),C(9,Ho,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(15,re,me(12,fe,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 qo(n,t){if(n&1&&(l(0,"div",74),C(1,Jo,3,1)(2,jo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Yo(n,t){if(n&1){let e=D();l(0,"div",82),y(1,14),O(2,"div")(3,"div"),M(),r(),l(4,"button",81),E("click",function(){f(e);let o=s(5);return h(o.openConsole())}),y(5,15),O(6,"sh-icon"),M(),r()}}function Qo(n,t){n&1&&(l(0,"div",82),A(1,16),r(),l(2,"button",83),y(3,17),O(4,"sh-icon"),M(),r()),n&2&&(_(2),u("routerLink",Re(1,Ei)))}function Zo(n,t){if(n&1&&(l(0,"div",75),C(1,Yo,7,0)(2,Qo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function ea(n,t){if(n&1&&C(0,qo,3,1,"div",74)(1,Zo,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function ta(n,t){n&1&&(l(0,"sup",85),p(1,"*"),r())}function na(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 ia(n,t){n&1&&ne(0)}function oa(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),C(3,ta,2,0,"sup",85),p(4),C(5,na,2,1,"sh-icon",43),W(6,ia,1,0,"ng-container",24),r(),l(7,"input",86),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),p(9,"textbox"),r()(),l(10,"button",87),E("click",function(){f(e);let o=s(4);return h(o.authenticateFilen())}),y(11,18),O(12,"sh-icon"),M(),r()()}if(n&2){let e=s(2).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o),_(3),u("disabled",m.isAuthenticatingFilen())}}function aa(n,t){if(n&1&&C(0,oa,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function la(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e);let o=s().$implicit,a=s(2);return h(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function ra(n,t){if(n&1&&(l(0,"div",34),_e(1)(2)(3)(4)(5),C(6,Li,6,12,"app-file-tree",35)(7,Gi,6,9,"app-file-tree",36)(8,zi,15,18,"sh-form-field")(9,eo,11,16,"sh-form-field")(10,lo,2,2)(11,mo,3,2)(12,So,6,14,"app-size",37)(13,Fo,9,13,"sh-form-field")(14,Ao,5,12,"sh-toggle",38)(15,Ro,2,2)(16,$o,6,14,"app-timespan",37)(17,Uo,6,13,"app-file-drop-textarea",39)(18,ea,2,1)(19,aa,1,1),C(20,la,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=S(0),o=s();pe("single-field",e.fieldGroup!=="advanced"),_(),q(e.formView.shortDescription??e.formView.name),_(),q(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=q(o.getFieldValue(e.fieldGroup,e.formView.name));_(),q((a??"").toString().trim()===""),_(),q("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 sa(n,t){if(n&1&&(l(0,"sh-icon",88),p(1,"x-circle"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function _a(n,t){if(n&1&&(l(0,"sh-icon",89),p(1,"warning"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ca(n,t){if(n&1&&(_e(0),C(1,sa,2,1,"sh-icon",88)(2,_a,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=S(0),o=q(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function da(n,t){if(n&1&&(_e(0),C(1,ca,3,2)),n&2){let e=t.$implicit,o=(q(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function ua(n,t){if(n&1&&(_e(0),Pe(1,hi,1,9,"ng-container",null,Ie),Pe(3,Ni,1,9,"ng-container",null,Ie),l(5,"sh-toggle-card",19),Te(6,20)(7),A(8,7),ue(),_e(9),C(10,Di,3,0,"button",21)(11,Ii,17,2,"div",22),ue(),C(12,Pi,1,3,"textarea",23)(13,Mi,2,0),r(),W(14,ra,21,9,"ng-template",null,0,ke)(16,da,2,2,"ng-template",null,1,ke)),n&2){let e=s(),i=S(1);q(e.destinationForm()),_(),Oe(i.custom),_(2),Oe(i.dynamic),_(2),u("disableToggle",!0),_(4),q(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Wt=class n{#e=x(Me);#t=x(Ee);#n=x(vt);#i=x(tt);#o=x(Dn);#r=x(An);#a=x($e);injector=x(cn);targetUrl=Ve.required();useBackupState=k(!1);#l=null;destinationType=R(()=>{let t=this.targetUrl();if(!t)return null;let e=ye(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=R(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=R(()=>!this.useBackupState());restoreBackupIdOptions=ve(Fn(this.targetUrl).pipe(pt(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}}),rn((t,e)=>t.authKey===e.authKey),Ct(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),mt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Je([]))),{initialValue:[]});isConnectedToConsole=R(()=>this.#o.state()==="connected");hasStorageApiKey=R(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=R(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=R(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=Q(()=>{let t=this.targetUrl(),e=ye(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find($=>$.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:[],T=e&&e.advancedFields?e.advancedFields:[],I=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],P={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([$,N],K)=>{let J=N.order??K,L=N.validate;!L&&N.type==="Bucketname"&&(L=H=>Mn(H)?null:{type:"error",message:$localize`Invalid bucket name.`}),L&&N.type==="Hostname"&&(L=H=>Rn(H)?null:{type:"error",message:$localize`Invalid hostname.`}),P.custom.push(j({order:900+J,validate:L},N))});for(let $=0;$<a.Options.length;$++){let N=a.Options[$];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,L=N.Aliases&&J>-1?N.Aliases[J]:N.Name,H=K&&typeof K!="string",Ce=H?K?.defaultValue??N.DefaultValue:N.DefaultValue,ge=H&&K?.order!==void 0?K.order:$,G={name:L,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+ge},he=H?j(j({},G),K):G;P.dynamic.push(he)}else{let J=N.Name;if(I.find(De=>De===J))continue;let H=T.find(De=>De===J||De.name===J),Ce=H&&typeof H!="string",ge=Ce&&H?.order!==void 0?H.order:$,G={name:J,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+ge},he=Ce?j(j({},G),H):G;P.advanced.push(he)}}if(P.custom.sort(($,N)=>$.order-N.order),P.dynamic.sort(($,N)=>$.order-N.order),P.advanced.sort(($,N)=>$.order-N.order),this.destinationFormConfig.set(P),!t)return;let w=Ut(t);w&&this.destinationForm.set({custom:w.custom,dynamic:w.dynamic,advanced:w.advanced})});destinationFormEffect=Q(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=On({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(j({},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(j({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(j({},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}`,T=450,I=600,P=screen.width/2-T/2,w=screen.height/2-I/2,$=window.open(m,"_blank","height="+I+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+P+",top="+w);return window.addEventListener("message",N=>{let K=N.data.startsWith("authid:"),J=K?N.data.replace("authid:",""):null;K&&(this.destinationForm.update(L=>(L[e][i]=J,L)),this.#s.set(!1),this.refreshView.set(!this.refreshView()),$?.close())}),!1}settingsAsText=R(()=>{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(`
|
|
1
|
+
import{a as Ln,b as Yt,c as wn}from"./chunk-ITA7DTN3.js";import{a as Qe,b as kt,c as Vt,d as xn}from"./chunk-Q72Y55NB.js";import{a as An,b as In,c as ye,d as bt,e as Pn,f as On,g as Ut,i as yn,j as Mn,k as Rn}from"./chunk-NXF5BMPG.js";import{a as Dn}from"./chunk-MI32HHLT.js";import{a as te}from"./chunk-RFB5A3B7.js";import{a as vt}from"./chunk-UY2WEUKC.js";import{a as Fn,b as ve,c as Nn}from"./chunk-AYOFR344.js";import{a as Ee}from"./chunk-BEXYTIOL.js";import{B as ee,C as En,E as Mt,F as fn,H as Se,K as Rt,L as xt,O as Lt,P as Ge,V as wt,W as Ye,Y as $t,a as Cn,b as ht,c as oe,d as Ft,e as ae,f as Nt,h as gn,i as ce,j as Dt,k as At,n as Tn,o as Sn,p as It,q as Pt,r as Ot,s as de,t as qe,v as Z,w as yt,z as $e}from"./chunk-YCLTQEU6.js";import{c as hn,d as Gt}from"./chunk-2LSZ2I43.js";import{b as je,d as we,e as mn}from"./chunk-BMWZYMK6.js";import{aa as pn}from"./chunk-OQ6BKP5N.js";import{$b as Fe,Ab as u,Ac as ie,Bb as l,Bc as me,Cb as r,Cc as ft,D as rn,Db as O,E as be,Hb as Te,Ib as ue,Ic as ke,Jb as ne,K as mt,Kb as D,M as Ct,N as sn,O as gt,Oa as Tt,P as _n,Pc as R,Ra as _,Rb as y,Sb as M,Tb as A,U as Ae,Uc as xe,Vc as k,Wb as Ue,Wc as He,Xb as E,Z as x,Zb as s,Zc as Ve,_b as Xe,a as an,ca as f,da as h,eb as z,ec as ze,f as ut,fc as We,ga as cn,gc as Y,hc as Et,ic as pe,jb as W,l as Je,lc as p,mb as dn,mc as qt,nc as B,oa as F,oc as lt,p as pt,qa as Q,qc as b,rc as v,sc as U,tb as St,tc as _e,ub as C,uc as q,v as ln,vb as g,vc as S,wb as Ie,yb as Pe,yc as un,zb as Oe,zc as Re}from"./chunk-ERITO7WM.js";import{a as j,b as se}from"./chunk-7CGTOI24.js";var Bt=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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function rt(n){if(dn(n))return n();if(Array.isArray(n))return n.map(t=>rt(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=rt(n[e]));return t}return n}var Vn=n=>n;function $n(n,t){let e=sn(n,Vn,t?.equal),i=e[an],o=e;return o.set=a=>{let c=e();return gt(i,a),()=>{gt(i,c)}},o.update=a=>{let c=e();return _n(i,a),()=>{gt(i,c)}},e}var Ze=class n{#e=x(hn);isSaving=F(!1);resourceDestinations=Nn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=$n(()=>{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(be(()=>{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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function Bn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),A(3,7),r(),l(4,"input",28,0),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),h(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),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),h(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),A(18,8),r(),l(19,"input",34),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),h(o)}),r()(),l(20,"sh-select",35)(21,"input",36),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),h(o)}),r()()(),l(22,"sh-toggle-card",37),Te(23,38),A(24,9),ue(),l(25,"div",39)(26,"sh-toggle",24),y(27,10),l(28,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),h(o)}),r(),M(),r(),l(29,"sh-toggle",24),y(30,11),l(31,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),h(o)}),r(),M(),r(),l(32,"sh-toggle",24),y(33,12),l(34,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),h(o)}),r(),M(),r(),l(35,"sh-toggle",24),y(36,13),l(37,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),h(o)}),r(),M(),r(),l(38,"sh-toggle",24),y(39,14),l(40,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),h(o)}),r(),M(),r(),l(41,"sh-toggle",24),y(42,15),l(43,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),h(o)}),r(),M(),r(),l(44,"sh-toggle",24),y(45,16),l(46,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),h(o)}),r(),M(),r()()()}if(n&2){let e=s(2);_(4),b("ngModel",e.scheduleFields.nextTime.time),_(7),b("ngModel",e.scheduleFields.nextTime.date),_(8),b("ngModel",e.scheduleFields.runAgain.repeatValue),_(),u("options",e.unitOptions)("isClearable",!1),_(),b("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),u("disableToggle",!0),_(6),b("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Kn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),y(2,5),l(3,"input",25),U("ngModelChange",function(o){f(e);let a=s();return v(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),h(o)}),r(),M(),r(),l(4,"p"),A(5,6),r()(),C(6,Bn,47,14)}if(n&2){let e=s();_(3),b("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var Jn=[{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`}],Kt=[{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:Xn().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 Gn(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 Xn(){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 Zt=()=>({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=x(Me);#t=x(we);#n=x(je);unitOptions=Jn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Kt;updateScheduleType(t){let e=Kt.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=z({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 T;T=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$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,T,I,P,w,$,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),A(1,2),r(),l(2,"sh-select",18)(3,"input",19),E("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),C(4,Kn,7,2),l(5,"div",20)(6,"button",21),E("click",function(){return i.goBack()}),y(7,3),O(8,"sh-icon"),M(),r(),l(9,"button",22),E("click",function(){return i.next()}),y(10,4),O(11,"sh-icon"),M(),r()()),e&2&&(_(2),u("isClearable",!1)("options",i.scheduleOptions),_(),u("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[de,oe,At,ht,ae,ce,Se,Ye,Z,ee,Ge,wt,fn],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 zn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Wn=["[title]","[description]","[action]","*"];function Hn(n,t){n&1&&p(0,"Title")}function jn(n,t){n&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var st=class n{isActive=Ve(!1);disableToggle=k(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&pe("active",i.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Xe(zn),l(0,"header")(1,"div",0)(2,"h3",1),E("click",function(){return i.disableToggle()||i.toggle()}),Fe(3,0,null,Hn,1,0),C(5,jn,2,0,"sh-icon"),r(),Fe(6,1),r(),l(7,"div",2),Fe(8,2),r()(),l(9,"div",3),Fe(10,3),r()),e&2&&(_(5),g(i.disableToggle()?-1:5))},dependencies:[Z],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 qn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r()()}if(n&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),b("ngModel",e.internalPath)}}function Yn(n,t){if(n&1&&(l(0,"div",7),p(1),r()),n&2){let e,i=s(2);_(),qt((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);_(),qt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function Zn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r(),C(2,Yn,2,1,"div",7),C(3,Qn,2,1,"div",8),r()}if(n&2){let e,i,o=s();_(),b("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 ei=[{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"}],ti=[{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"}],Jt=class n{path=k.required();osType=k();pathChange=xe();remove=xe();internalPath=F("");pathType=F("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(ei);expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return ti.map(i=>i.value==="-Folder"||i.value==="+Folder"?se(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?se(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?se(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?se(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?se(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?se(j({},i),{startsWith:"*.",endsWith:""}):se(j({},i),{startsWith:"",endsWith:""}))});pathEffect=Q(()=>{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=z({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),U("ngModelChange",function(a){return v(i.pathType,a)||(i.pathType=a),a}),E("ngModelChange",function(){return i.updateFilter()}),r()(),C(2,qn,2,4,"sh-select",2)(3,Zn,4,3,"sh-form-field",3),l(4,"div",4),E("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),_(),b("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[de,oe,ae,ce,Ge,Se,Z],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 _t=class n{data=k();closed=xe();path=F("");isValid=R(()=>this.path().length>0);dataEffect=Q(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:13,vars:3,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Local disk source`;let i;i=$localize`Folder path`;let o;o=$localize`Cancel`;let a;return a=$localize` Use this source `,[e,i,o,a,[1,"title-30"],["content",""],[3,"customRemoteMode"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5)(4,"app-file-tree",6)(5,"label",7),A(6,1),r(),l(7,"input",8),U("ngModelChange",function(a){return v(i.path,a)||(i.path=a),a}),r()()(),l(8,"footer",9)(9,"button",10),E("click",function(){return i.closed.emit(null)}),A(10,2),r(),l(11,"button",11),E("click",function(){return i.submit()}),A(12,3),r()()),e&2&&(_(4),u("customRemoteMode","diskimage"),_(3),b("ngModel",i.path),_(4),u("disabled",!i.isValid()))},dependencies:[ee,Qe,de,oe,ae,ce],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 ni=[[["","displayName",""]],[["","description",""]],"*"],ii=["[displayName]","[description]","*"];function oi(n,t){if(n&1&&p(0),n&2){s(2);let e=S(1);B(" ",e.Name," ")}}function ai(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.displayName," ")}}function li(n,t){n&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function ri(n,t){n&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function si(n,t){if(n&1&&p(0),n&2){s();let e=S(15);B(" ",e," ")}}function _i(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.description," ")}}function ci(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),O(2,"img",2),r(),l(3,"div",3)(4,"div",4),Fe(5),r(),l(6,"div",5),C(7,oi,1,1)(8,ai,1,1),r(),C(9,li,2,0,"sh-chip",6)(10,ri,2,0,"sh-chip",7),r(),l(11,"div",8)(12,"div",4),Fe(13,1),r(),l(14,"div",5),_e(15),C(16,si,1,1)(17,_i,1,1),r()(),l(18,"div",9),Fe(19,2),r()()),n&2){let e=s(),i=S(0),o=S(1);u("variant",e.variant()),_(2),u("src",i.icon,Tt),St("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=q(e.getSimplePath(o==null?null:o.BaseUrl));_(),g(a&&a.length>0?16:17)}}var et=class n{destination=k();targetUrl=k();variant=k("type-b");connectionStringId=k();#e=x(Ze);connectionString=R(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=R(()=>{let t=this.targetUrl();return t?ye(t)??null:null});destinationFromTargetUrl=R(()=>{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=R(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?In(t):""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:ii,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&&(Xe(ni),_e(0)(1),C(2,ci,20,7,"sh-card",0)),e&2){let o=q(i.destinationItem());_(),q(i.connectionString()),_(),g(o?2:-1)}},dependencies:[En,Mt],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 tt=class n{#e=x(Ee);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=Pn(e.Key);if(i.length<=1){let o=bt(e.Key);return o.isDefaultEntry===!0?[se(j({},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=R(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=R(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=R(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=R(()=>[...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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function di(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),E("click",function(){let o=f(e).$implicit,a=s();return h(a.setDestination.emit(o.customKey??o.key))}),y(2,0),O(3,"sh-icon"),M(),r()()}if(n&2){let e=t.$implicit;u("destination",e)}}var Xt=class n{#e=x(tt);showAsSources=k(!1);moduleType=k("Backend");setDestination=xe();destinationSearchTerm=F("");destinationTypeOptions=R(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=R(()=>{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=z({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),U("ngModelChange",function(a){return v(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),Pe(3,di,4,1,"app-destination-list-item",3,Ie),r()),e&2&&(_(),b("ngModel",i.destinationSearchTerm),_(2),Oe(i.destinationTypeOptionsFocused()))},dependencies:[et,de,oe,ae,ce,Se,ee,Z],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 ui=["fileInput"],pi=[[["label"]]],mi=["label"],zt=class n{customId=k();content=F("");readonly=F(!1);placeholder=k($localize`Drop a file here or use the browse button`);fileInputRef=He("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=Q(()=>{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=z({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,ui,5),e&2&&We()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[un([{provide:Cn,useExisting:n,multi:!0}])],ngContentSelectors:mi,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();Xe(pi),Fe(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),E("click",function(){return i.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),E("drop",function(c){return i.onFileDrop(c)})("dragover",function(c){return i.onDragOver(c)}),l(6,"textarea",4),U("ngModelChange",function(c){return f(o),v(i.content,c)||(i.content=c),h(c)}),r()(),l(7,"input",5,0),E("change",function(c){return i.onFileSelected(c)}),r()}e&2&&(_(6),u("placeholder",i.placeholder()),b("ngModel",i.content),u("disabled",i.readonly()))},dependencies:[de,oe,ae,ce,Z,ee],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 Ci=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),re=n=>({$implicit:n}),gi=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Ti=()=>({updateOn:"blur"}),Si=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),Ei=()=>["/connect/logon"];function fi(n,t){n&1&&ne(0)}function hi(n,t){if(n&1&&W(0,fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Ci,i,e,a,c.oauthField)))}}function Fi(n,t){n&1&&ne(0)}function Ni(n,t){if(n&1&&W(0,Fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,gi,i,e,a,c.oauthField)))}}function Di(n,t){if(n&1){let e=D();l(0,"button",25),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!1))}),y(1,8),O(2,"sh-icon"),M(),r()}}function Ai(n,t){if(n&1){let e=D();l(0,"button",32,2),E("click",function(){let o=f(e).$implicit,a=s(3);return h(a.addAdvancedOption(o))}),p(2),r()}if(n&2){let e=t.$implicit;_(2),B(" ",e.name," ")}}function Ii(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),y(3,9),O(4,"sh-icon"),M(),r(),Te(5,28),Pe(6,Ai,3,1,"button",29,Ie),ue(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),Te(12,28),l(13,"button",31),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),ue(),r()()}if(n&2){s();let e=S(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Oe(e)}}function Pi(n,t){if(n&1){let e=D();l(0,"textarea",33),E("ngModelChange",function(o){f(e);let a=s(2);return h(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Re(2,Ti))}}function Oi(n,t){n&1&&ne(0)}function yi(n,t){if(n&1&&W(0,Oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=Y(15),a=s(),c=S(0),d=S(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Si,i,m,c,d.oauthField)))}}function Mi(n,t){if(n&1&&Pe(0,yi,1,9,"ng-container",null,Ie),n&2){let e=s(2);Oe(e.advancedFormFieldNames())}}function Ri(n,t){n&1&&(l(0,"sup",42),p(1,"*"),r())}function xi(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 Li(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),C(2,Ri,2,0,"sup",42),p(3),C(4,xi,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(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 wi(n,t){n&1&&(l(0,"sup",45),p(1,"*"),r())}function $i(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 Gi(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),C(2,wi,2,0,"sup",45),p(3),C(4,$i,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(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 vi(n,t){n&1&&(l(0,"sup",46),p(1,"*"),r())}function bi(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 Ui(n,t){n&1&&(l(0,"sh-icon",47),p(1," warning "),r())}function ki(n,t){n&1&&ne(0)}function Vi(n,t){if(n&1&&(l(0,"sh-icon",51),p(1," link "),r()),n&2){s();let e=S(8),i=S(9);pe("error",e&&i==="error")("warn",e&&i==="warning"),u("shTooltip",e)}}function Bi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"envelope"),r())}function Ki(n,t){n&1&&(l(0,"sh-icon",50),p(1,"hard-drives"),r())}function Ji(n,t){n&1&&(l(0,"sh-icon",50),p(1,"jar"),r())}function Xi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"textbox"),r())}function zi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,vi,2,0,"sup",46),p(3),C(4,bi,2,1,"sh-icon",43),C(5,Ui,2,0,"sh-icon",47),W(6,ki,1,0,"ng-container",24),r(),l(7,"input",48),E("keydown",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),_e(8)(9),C(10,Vi,2,5,"sh-icon",49)(11,Bi,2,0,"sh-icon",50)(12,Ki,2,0,"sh-icon",50)(13,Ji,2,0,"sh-icon",50)(14,Xi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(5);s();let m=Y(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",ie(16,re,me(13,fe,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let T=a,I=s().hasLeadingSlash(T??"");_(),q(I&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),q(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 Wi(n,t){n&1&&(l(0,"sup",52),p(1,"*"),r())}function Hi(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 ji(n,t){n&1&&ne(0)}function qi(n,t){if(n&1){let e=D();l(0,"span",56),E("click",function(){f(e);let o=s(2).$implicit,a=s(2);return h(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function Yi(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),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function Zi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function eo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Wi,2,0,"sup",52),p(3),C(4,Hi,2,1,"sh-icon",43),W(5,ji,1,0,"ng-container",24),r(),l(6,"input",53),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),C(7,qi,2,0,"span",54)(8,Yi,2,0,"sh-icon",50),C(9,Qi,2,0,"sh-icon",55)(10,Zi,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(14,re,me(11,fe,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 to(n,t){n&1&&(l(0,"sup",59),p(1,"*"),r())}function no(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&&ne(0)}function oo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function ao(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),C(2,to,2,0,"sup",59),p(3),C(4,no,2,1,"sh-icon",43),W(5,io,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,oo,1,2,"ng-template",null,3,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(14,re,me(11,fe,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function lo(n,t){if(n&1&&(_e(0),C(1,ao,9,16)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function ro(n,t){n&1&&(l(0,"sup",62),p(1,"*"),r())}function so(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 _o(n,t){n&1&&ne(0)}function co(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),C(2,ro,2,0,"sup",62),p(3),C(4,so,2,1,"sh-icon",43),W(5,_o,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,co,1,2,"ng-template",null,4,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(15,re,me(12,fe,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function po(n,t){n&1&&O(0,"sh-progress-bar",60)}function mo(n,t){if(n&1&&(_e(0),C(1,uo,9,17)(2,po,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=S(2),o=q(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function Co(n,t){n&1&&(l(0,"sup",64),p(1,"*"),r())}function go(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 To(n,t){n&1&&ne(0)}function So(n,t){if(n&1){let e=D();l(0,"app-size",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,Co,2,0,"sup",64),p(3),C(4,go,2,1,"sh-icon",43),W(5,To,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView)))}}function Eo(n,t){n&1&&(l(0,"sup",65),p(1,"*"),r())}function fo(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 ho(n,t){n&1&&ne(0)}function Fo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Eo,2,0,"sup",65),p(3),C(4,fo,2,1,"sh-icon",43),W(5,ho,1,0,"ng-container",24),r(),l(6,"input",66),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(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=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(11,re,me(8,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o)}}function No(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 Do(n,t){n&1&&ne(0)}function Ao(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),E("click",function(){f(e);let o=s().$implicit,a=S(2),c=s(2);return h(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),p(2),C(3,No,2,1,"sh-icon",43),W(4,Do,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(5);s();let c=Y(17),d=s();pe("active",d.isTrue(o)),_(),u("for",a),_(),B(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ie(10,re,me(7,fe,e.fieldGroup,e.formView)))}}function Io(n,t){n&1&&(l(0,"sup",69),p(1,"*"),r())}function Po(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 Oo(n,t){n&1&&ne(0)}function yo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Mo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),C(2,Io,2,0,"sup",69),p(3),C(4,Po,2,1,"sh-icon",43),W(5,Oo,1,0,"ng-container",24),r(),l(6,"input",70),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,yo,1,2,"ng-template",null,5,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(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",T)("ngTemplateOutletContext",ie(13,re,me(10,fe,o.fieldGroup,o.formView))),_(),u("ngModel",c)}}function Ro(n,t){if(n&1&&(_e(0),C(1,Mo,9,15)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function xo(n,t){n&1&&(l(0,"sup",71),p(1,"*"),r())}function Lo(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 wo(n,t){n&1&&ne(0)}function $o(n,t){if(n&1){let e=D();l(0,"app-timespan",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,xo,2,0,"sup",71),p(3),C(4,Lo,2,1,"sh-icon",43),W(5,wo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView)))}}function Go(n,t){n&1&&(l(0,"sup",73),p(1,"*"),r())}function vo(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 bo(n,t){n&1&&ne(0)}function Uo(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),C(2,Go,2,0,"sup",73),p(3),C(4,vo,2,1,"sh-icon",43),W(5,bo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(2),o=S(4),a=S(5);s();let c=Y(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",ie(11,re,me(8,fe,e.fieldGroup,e.formView)))}}function ko(n,t){n&1&&(O(0,"sh-spinner"),l(1,"span"),A(2,10),r()),n&2&&Et("--spinner-size","16px")("--spinner-thickness","2px")}function Vo(n,t){n&1&&(l(0,"div",76),A(1,11),r())}function Bo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ko(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"),A(5,12),r()(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(4).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Bo,1,2,"ng-template",null,6,ke)}if(n&2){s(4);let e=S(2),i=S(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",i),_(5),u("id",i)("ngModel",e)}}function Jo(n,t){if(n&1&&C(0,ko,3,4)(1,Vo,2,0,"div",76)(2,Ko,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Xo(n,t){n&1&&(l(0,"sup",79),p(1,"*"),r())}function zo(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 Wo(n,t){n&1&&ne(0)}function Ho(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e),s(4);let o=S(5),a=s(2);return h(a.toggleDisabled(o))}),y(1,13),O(2,"sh-icon"),M(),r()}}function jo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Xo,2,0,"sup",79),p(3),C(4,zo,2,1,"sh-icon",43),W(5,Wo,1,0,"ng-container",24),r(),l(6,"input",80),E("ngModelChange",function(o){f(e);let a=s(3).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"textbox"),r()(),C(9,Ho,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(15,re,me(12,fe,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 qo(n,t){if(n&1&&(l(0,"div",74),C(1,Jo,3,1)(2,jo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Yo(n,t){if(n&1){let e=D();l(0,"div",82),y(1,14),O(2,"div")(3,"div"),M(),r(),l(4,"button",81),E("click",function(){f(e);let o=s(5);return h(o.openConsole())}),y(5,15),O(6,"sh-icon"),M(),r()}}function Qo(n,t){n&1&&(l(0,"div",82),A(1,16),r(),l(2,"button",83),y(3,17),O(4,"sh-icon"),M(),r()),n&2&&(_(2),u("routerLink",Re(1,Ei)))}function Zo(n,t){if(n&1&&(l(0,"div",75),C(1,Yo,7,0)(2,Qo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function ea(n,t){if(n&1&&C(0,qo,3,1,"div",74)(1,Zo,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function ta(n,t){n&1&&(l(0,"sup",85),p(1,"*"),r())}function na(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 ia(n,t){n&1&&ne(0)}function oa(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),C(3,ta,2,0,"sup",85),p(4),C(5,na,2,1,"sh-icon",43),W(6,ia,1,0,"ng-container",24),r(),l(7,"input",86),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),p(9,"textbox"),r()(),l(10,"button",87),E("click",function(){f(e);let o=s(4);return h(o.authenticateFilen())}),y(11,18),O(12,"sh-icon"),M(),r()()}if(n&2){let e=s(2).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(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",ie(12,re,me(9,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o),_(3),u("disabled",m.isAuthenticatingFilen())}}function aa(n,t){if(n&1&&C(0,oa,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function la(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e);let o=s().$implicit,a=s(2);return h(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function ra(n,t){if(n&1&&(l(0,"div",34),_e(1)(2)(3)(4)(5),C(6,Li,6,12,"app-file-tree",35)(7,Gi,6,9,"app-file-tree",36)(8,zi,15,18,"sh-form-field")(9,eo,11,16,"sh-form-field")(10,lo,2,2)(11,mo,3,2)(12,So,6,14,"app-size",37)(13,Fo,9,13,"sh-form-field")(14,Ao,5,12,"sh-toggle",38)(15,Ro,2,2)(16,$o,6,14,"app-timespan",37)(17,Uo,6,13,"app-file-drop-textarea",39)(18,ea,2,1)(19,aa,1,1),C(20,la,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=S(0),o=s();pe("single-field",e.fieldGroup!=="advanced"),_(),q(e.formView.shortDescription??e.formView.name),_(),q(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=q(o.getFieldValue(e.fieldGroup,e.formView.name));_(),q((a??"").toString().trim()===""),_(),q("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 sa(n,t){if(n&1&&(l(0,"sh-icon",88),p(1,"x-circle"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function _a(n,t){if(n&1&&(l(0,"sh-icon",89),p(1,"warning"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ca(n,t){if(n&1&&(_e(0),C(1,sa,2,1,"sh-icon",88)(2,_a,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=S(0),o=q(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function da(n,t){if(n&1&&(_e(0),C(1,ca,3,2)),n&2){let e=t.$implicit,o=(q(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function ua(n,t){if(n&1&&(_e(0),Pe(1,hi,1,9,"ng-container",null,Ie),Pe(3,Ni,1,9,"ng-container",null,Ie),l(5,"sh-toggle-card",19),Te(6,20)(7),A(8,7),ue(),_e(9),C(10,Di,3,0,"button",21)(11,Ii,17,2,"div",22),ue(),C(12,Pi,1,3,"textarea",23)(13,Mi,2,0),r(),W(14,ra,21,9,"ng-template",null,0,ke)(16,da,2,2,"ng-template",null,1,ke)),n&2){let e=s(),i=S(1);q(e.destinationForm()),_(),Oe(i.custom),_(2),Oe(i.dynamic),_(2),u("disableToggle",!0),_(4),q(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Wt=class n{#e=x(Me);#t=x(Ee);#n=x(vt);#i=x(tt);#o=x(Dn);#r=x(An);#a=x($e);injector=x(cn);targetUrl=Ve.required();useBackupState=k(!1);#l=null;destinationType=R(()=>{let t=this.targetUrl();if(!t)return null;let e=ye(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=R(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=R(()=>!this.useBackupState());restoreBackupIdOptions=ve(Fn(this.targetUrl).pipe(pt(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}}),rn((t,e)=>t.authKey===e.authKey),Ct(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),mt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Je([]))),{initialValue:[]});isConnectedToConsole=R(()=>this.#o.state()==="connected");hasStorageApiKey=R(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=R(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=R(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=Q(()=>{let t=this.targetUrl(),e=ye(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find($=>$.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:[],T=e&&e.advancedFields?e.advancedFields:[],I=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],P={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([$,N],K)=>{let J=N.order??K,L=N.validate;!L&&N.type==="Bucketname"&&(L=H=>Mn(H)?null:{type:"error",message:$localize`Invalid bucket name.`}),L&&N.type==="Hostname"&&(L=H=>Rn(H)?null:{type:"error",message:$localize`Invalid hostname.`}),P.custom.push(j({order:900+J,validate:L},N))});for(let $=0;$<a.Options.length;$++){let N=a.Options[$];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,L=N.Aliases&&J>-1?N.Aliases[J]:N.Name,H=K&&typeof K!="string",Ce=H?K?.defaultValue??N.DefaultValue:N.DefaultValue,ge=H&&K?.order!==void 0?K.order:$,G={name:L,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+ge},he=H?j(j({},G),K):G;P.dynamic.push(he)}else{let J=N.Name;if(I.find(De=>De===J))continue;let H=T.find(De=>De===J||De.name===J),Ce=H&&typeof H!="string",ge=Ce&&H?.order!==void 0?H.order:$,G={name:J,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+ge},he=Ce?j(j({},G),H):G;P.advanced.push(he)}}if(P.custom.sort(($,N)=>$.order-N.order),P.dynamic.sort(($,N)=>$.order-N.order),P.advanced.sort(($,N)=>$.order-N.order),this.destinationFormConfig.set(P),!t)return;let w=Ut(t);w&&this.destinationForm.set({custom:w.custom,dynamic:w.dynamic,advanced:w.advanced})});destinationFormEffect=Q(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=On({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(j({},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(j({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(j({},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}`,T=450,I=600,P=screen.width/2-T/2,w=screen.height/2-I/2,$=window.open(m,"_blank","height="+I+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+P+",top="+w);return window.addEventListener("message",N=>{let K=N.data.startsWith("authid:"),J=K?N.data.replace("authid:",""):null;K&&(this.destinationForm.update(L=>(L[e][i]=J,L)),this.#s.set(!1),this.refreshView.set(!this.refreshView()),$?.close())}),!1}settingsAsText=R(()=>{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
2
|
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=yn(t);this.destinationForm.update(i=>se(j({},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.#o.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#r.getFilenApiKey(t,e).pipe(be(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:i=>{if(i.length===0){this.#a.open(te,{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.#a.open(te,{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.#a.open(te,{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=z({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 T;T=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let P;P=$localize`This field is mandatory`;let w;w=$localize`This field is mandatory`;let $;$=$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 L;L=$localize`No backups found from this machine, contact support`;let H;H=$localize`This field is mandatory`;let Ce;Ce=$localize`Pick the backup to restore from`;let ge;ge=$localize`This field is mandatory`;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let he;he=$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:`,he=Ue(he);let De;De=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let nt;nt=$localize`Connect to the console to use Duplicati storage.`;let it;it=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ot;ot=$localize`This field is mandatory`;let at;return at=$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,L,Ce,G,he,De,nt,it,at,[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",T],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",I],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",P],["shTooltip",w],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",$],["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",H],["shTooltip",ge],["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",ot],["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&&(_e(0)(1),C(2,ua,18,5)),e&2){let o=q(i.destinationType());_();let a=q(i.destinationFormConfig());_(),g(o&&a?2:-1)}},dependencies:[qe,oe,At,ae,de,ce,pn,mn,Qe,Vt,xn,zt,Se,ee,Z,wt,Rt,Ge,$t,Ye,xt,Lt],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 Ht=class n{#e=x(Gt);#t=x($e);#n=x(Ee);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 ut(T=>{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:I=>{if(I.Success){this.emitSuccessV2(T,t,a,I);return}this.handleGenericError(T,t,a,I.Error??"Unknown error",d)},error:I=>{let P=I?.error?.body??I?.error?.requestBody;if(P?.Data?.FolderExists===!1||P?.StatusCode==="missing-folder"){this.handleMissingFolder(T,t,e,a,d,m);return}if(P?.Data?.HostCertificate){this.handleMissingCertificate(T,t,a,P.Data?.HostCertificate,d);return}if(P?.Data?.ReportedHostKey){this.handleIncorrectKey(T,t,a,P.Data.ReportedHostKey,P.Data.AcceptedHostKey??null,d);return}this.handleGenericError(T,t,a,I?.message??"Unknown error",d)}})})}testDestinationv1(t,e,i,o,a,c,d,m){return new ut(T=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:i??null,sourcePrefix:e=="new"?null:o},type:c}).subscribe({next:I=>{T.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),T.complete()},error:I=>{this.handleDestinationErrorv1(I.message,t,e,a,d,m).subscribe(P=>{T.next(P)})}})})}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(te,{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:T=>{if(T.Success){this.emitSuccessV2(t,e,o,T);return}else this.handleFolderCreateFailure(t,e,o,T.Error??$localize`Unknown error`)},error:T=>{this.handleFolderCreateFailure(t,e,o,T.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:i=="new"?null:i}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:T=>{this.handleFolderCreateFailure(t,e,o,T.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#t.open(te,{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(te,{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
3
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
4
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(te,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:c,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:T=>{if(!T){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let I=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:T,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var d=I;let m=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-WBTDGQME.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,v as k,x as L,z as w}from"./chunk-YCLTQEU6.js";import{d as J}from"./chunk-2LSZ2I43.js";import{d as O,e as M}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as p,Bb as a,Cb as i,Db as u,E as T,Ra as l,Rb as D,Sb as h,Tb as _,Wb as I,Xb as d,Z as s,eb as f,ic as P,oa as c,ub as C,vb as S,zc as N}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,g=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loading",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as pe}from"./chunk-2XMYVT7N.js";import"./chunk-NBPZDFGF.js";import{b as de,c as Se,l as ue,p as Ee,q as Ce}from"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{c as Te,d as ge}from"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as M}from"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as j,d as q}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as D,Bb as r,Cb as a,Db as O,Hb as V,Ib as W,Kb as u,Pc as $,Ra as T,Rb as E,Sb as C,Tb as I,Wb as z,Wc as w,Xb as d,Z as m,Zb as l,ca as _,da as c,eb as B,ec as J,fc as X,ga as v,lc as P,oa as N,qc as f,rc as R,sc as h,tc as A,ub as p,uc as y,vb as F,vc as L,yc as H,zc as K}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
|
|
1
|
+
import{g as pe}from"./chunk-JTO22TJU.js";import"./chunk-NBPZDFGF.js";import{b as de,c as Se,l as ue,p as Ee,q as Ce}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{c as Te,d as ge}from"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import{a as M}from"./chunk-RFB5A3B7.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as j,d as q}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as D,Bb as r,Cb as a,Db as O,Hb as V,Ib as W,Kb as u,Pc as $,Ra as T,Rb as E,Sb as C,Tb as I,Wb as z,Wc as w,Xb as d,Z as m,Zb as l,ca as _,da as c,eb as B,ec as J,fc as X,ga as v,lc as P,oa as N,qc as f,rc as R,sc as h,tc as A,ub as p,uc as y,vb as F,vc as L,yc as H,zc as K}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk-
|
|
1
|
+
import{a as $}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import{b as f}from"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as b,v as h}from"./chunk-YCLTQEU6.js";import{d as P}from"./chunk-2LSZ2I43.js";import{b as B,e as A}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Ac as R,Bb as a,Cb as F,Db as _,Pc as D,Ra as i,Rb as c,Sb as d,Tb as r,Wb as N,Xb as L,Z as C,eb as S,lc as M,nc as O,oa as l,ub as s,vb as u,wb as T,yb as p,zb as I}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var k=e=>({state:e});function v(e,t){e&1&&r(0,2,1)}function y(e,t){e&1&&r(0,2,2)}function U(e,t){e&1&&r(0,2,3)}function G(e,t){e&1&&r(0,2,4)}function K(e,t){if(e&1&&(M(0),_(1,"br")),e&2){let o=t.$implicit;O(" ",o," ")}}var g=class e{#t=C(P);#e=C(B);#n=f(this.#e.params);#o=f(this.#e.queryParams);runId=D(()=>this.#n()?.runId);stateId=D(()=>this.#o()?.state);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(o=>[...o,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=S({type:e,selectors:[["app-commandline-result"]],decls:18,vars:7,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,n=N(n),[t,o,n,[1,"back"],["type","button","shButton","","routerLink","../",1,"small",3,"queryParams"],["type","button","shButton","",1,"small",3,"click"],[1,"status"]]},template:function(o,n){o&1&&(_(0,"app-status-bar"),a(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"sh-icon"),d(),F()(),a(6,"h3"),c(7,1),a(8,"button",5),L("click",function(){return n.abort()}),F(),d(),F(),a(9,"div",6),c(10,2),s(11,v,1,0),s(12,y,1,0),s(13,U,1,0),s(14,G,1,0),d(),F(),a(15,"code"),p(16,K,2,1,null,null,T),F()()),o&2&&(i(3),E("queryParams",R(5,k,n.stateId())),i(8),u(n.status()==="starting"?11:-1),i(),u(n.status()==="started"?12:-1),i(),u(n.status()==="finished"?13:-1),i(),u(n.status()==="aborted"?14:-1),i(2),I(n.messageLog()))},dependencies:[$,h,b,A],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a,e as b,f as c}from"./chunk-
|
|
1
|
+
import{d as a,e as b,f as c}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-JTO22TJU.js";import"./chunk-NBPZDFGF.js";import{a as w}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import{p as k}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import{b as u}from"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{M as y,R as W}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as _,Ac as p,Bb as o,Cb as n,Db as a,Ra as r,Rb as F,Sb as l,Z as c,Zb as O,eb as D,ic as L,oa as f,qa as P,ub as E,vb as g,yc as N,zc as R}from"./chunk-ERITO7WM.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};
|