@duplicati/ngclient 0.0.204 → 0.0.205

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/assets/dest-icons/selectel.png +0 -0
  2. package/{chunk-IFP4WWLK.js → chunk-37CUOEGJ.js} +1 -1
  3. package/chunk-4GXIF5HF.js +1 -0
  4. package/{chunk-ZORSGUCK.js → chunk-4RYK5OOO.js} +1 -1
  5. package/{chunk-NG3P67UR.js → chunk-5MHYH7GK.js} +1 -1
  6. package/{chunk-PXULEZKF.js → chunk-5QWAH3QX.js} +1 -1
  7. package/{chunk-IMHM7ISI.js → chunk-AT64P6E5.js} +1 -1
  8. package/{chunk-TX7JDBPD.js → chunk-BT2VIZXE.js} +1 -1
  9. package/{chunk-5I4CGX7S.js → chunk-COPBOHWE.js} +1 -1
  10. package/chunk-DESKT7LH.js +1 -0
  11. package/{chunk-RNYUAYNZ.js → chunk-F3JL4GJQ.js} +1 -1
  12. package/{chunk-QLENTLZJ.js → chunk-G2FJM62F.js} +1 -1
  13. package/chunk-GJKZESBX.js +1 -0
  14. package/{chunk-F6H5V7OU.js → chunk-H4LQO7G2.js} +1 -1
  15. package/{chunk-A2O2XHOB.js → chunk-I3IIG2AK.js} +1 -1
  16. package/{chunk-YN3R7XGF.js → chunk-JN4WCRAH.js} +1 -1
  17. package/{chunk-UNZWYG3U.js → chunk-KV5UORE3.js} +1 -1
  18. package/{chunk-MO72YRC7.js → chunk-LT3AVRVP.js} +1 -1
  19. package/{chunk-TN6HBIUN.js → chunk-LXSHDO5C.js} +1 -1
  20. package/{chunk-RJOLHDBR.js → chunk-M7Y3VPRV.js} +1 -1
  21. package/{chunk-5FCREC3N.js → chunk-MIMGEZMT.js} +1 -1
  22. package/{chunk-TXFTUL4R.js → chunk-MLNK7NFW.js} +1 -1
  23. package/{chunk-OINQP25T.js → chunk-OIYIWMS7.js} +1 -1
  24. package/{chunk-77VFSONV.js → chunk-OPLWAKSM.js} +1 -1
  25. package/{chunk-CB6NK5B2.js → chunk-YLQF5ATT.js} +1 -1
  26. package/index.html +1 -1
  27. package/{main-T6UJTPG4.js → main-HMCIC27B.js} +1 -1
  28. package/package.json +1 -1
  29. package/chunk-2PCEVKZ4.js +0 -1
  30. package/chunk-4I55TVYE.js +0 -1
  31. package/chunk-B5GHHS3A.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as xt,c as Rt,d as Lt,e as Nn}from"./chunk-K34VOGDF.js";import{a as mn,b as Ge,c as yt,d as gn,e as Tn,f as Mt,h as Sn,i as En,j as fn}from"./chunk-IMHM7ISI.js";import{a as hn,b as Kt,c as Fn}from"./chunk-6LAXPU22.js";import{a as Cn}from"./chunk-TL4WOQKT.js";import{a as Z}from"./chunk-HSHF5HR7.js";import{a as Ot}from"./chunk-D6IP567E.js";import{a as pn,b as $e}from"./chunk-VDSX2M4H.js";import{a as Ee}from"./chunk-HUZXJWCG.js";import{B as ie,C as dn,E as ht,F as un,H as Se,K as Ft,L as Nt,O as Dt,P as we,V as At,W as je,Y as It,a as rn,b as ut,c as re,d as pt,e as se,f as Ct,h as sn,i as ge,j as mt,k as gt,n as _n,o as cn,p as Tt,q as St,r as Et,s as Te,t as He,u as Q,w as ft,z as Le}from"./chunk-UNMDSCAN.js";import{c as Pt}from"./chunk-CFNARBNK.js";import{b as We,d as Re,e as ln}from"./chunk-I27PVH6D.js";import{_ as an}from"./chunk-7AVOHYTE.js";import{$ as S,Ab as r,Ac as dt,Bb as A,D as Yt,E as Be,Fb as ae,Gb as ee,Gc as be,Hb as te,Ib as D,K as Qt,M as Zt,Ma as _t,Mc as x,Pa as _,Pb as P,Qb as O,Qc as Ue,R as xe,Rb as I,Rc as J,Sc as Xe,Ub as ve,Uc as ke,Vb as h,W as M,Xb as s,Yb as Ke,Zb as Oe,aa as E,cb as H,cc as ze,da as en,dc as Je,ec as q,f as st,fc as ct,gc as me,hb as X,jc as C,kb as tn,kc as nt,l as jt,la as F,lc as z,mc as it,na as oe,oc as U,p as qt,pc as G,qc as k,rb as nn,rc as ce,sb as m,sc as Y,tb as g,tc as f,ub as Ne,uc as Bt,wb as De,wc as on,xb as Ae,xc as ye,yb as d,yc as ne,zb as l,zc as de}from"./chunk-26Z7TPJB.js";import{a as j,b as Ce}from"./chunk-7CGTOI24.js";var wt=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=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function ot(n){if(tn(n))return n();if(Array.isArray(n))return n.map(t=>ot(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=ot(n[e]));return t}return n}function yn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),I(3,7),r(),l(4,"input",28,0),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),E(o)}),r(),l(6,"sh-icon",29),C(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),C(10,"\xA0"),r(),l(11,"input",32,1),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),E(o)}),r(),l(13,"sh-icon",29),C(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),I(18,8),r(),l(19,"input",34),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),E(o)}),r()(),l(20,"sh-select",35)(21,"input",36),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),E(o)}),r()()(),l(22,"sh-toggle-card",37),ae(23,38),I(24,9),ee(),l(25,"div",39)(26,"sh-toggle",24),P(27,10),l(28,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),E(o)}),r(),O(),r(),l(29,"sh-toggle",24),P(30,11),l(31,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),E(o)}),r(),O(),r(),l(32,"sh-toggle",24),P(33,12),l(34,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),E(o)}),r(),O(),r(),l(35,"sh-toggle",24),P(36,13),l(37,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),E(o)}),r(),O(),r(),l(38,"sh-toggle",24),P(39,14),l(40,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),E(o)}),r(),O(),r(),l(41,"sh-toggle",24),P(42,15),l(43,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),E(o)}),r(),O(),r(),l(44,"sh-toggle",24),P(45,16),l(46,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),E(o)}),r(),O(),r()()()}if(n&2){let e=s(2);_(4),U("ngModel",e.scheduleFields.nextTime.time),_(7),U("ngModel",e.scheduleFields.nextTime.date),_(8),U("ngModel",e.scheduleFields.runAgain.repeatValue),_(),d("options",e.unitOptions)("isClearable",!1),_(),U("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),d("disallowToggle",!0),_(6),U("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Mn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),P(2,5),l(3,"input",25),k("ngModelChange",function(o){S(e);let a=s();return G(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),E(o)}),r(),O(),r(),l(4,"p"),I(5,6),r()(),m(6,yn,47,14)}if(n&2){let e=s();_(3),U("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var xn=[{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`}],$t=[{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:Rn().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 Dn(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 Rn(){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 Jt=()=>({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)}}}),zt=class n{#e=M(Pe);#t=M(Re);#n=M(We);unitOptions=xn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=$t;updateScheduleType(t){let e=$t.find(i=>i.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let i=e.data;this.scheduleFields.autoRun.set(i.autoRun??!1),this.scheduleFields.nextTime.time.set(i.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(i.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(i.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(i.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(i.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(i.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(i.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(i.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(i.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(i.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(i.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let i;i=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let c;c=$localize`If a date was missed, the job will run as soon as possible.`;let u;u=$localize`Next time`;let p;p=$localize`Run again every`;let T;T=$localize`Allowed days`;let y;y=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let B;return B=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,u,p,T,y,v,$,L,N,V,B,[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,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,i){e&1&&(l(0,"h3",17),I(1,2),r(),l(2,"sh-select",18)(3,"input",19),h("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),m(4,Mn,7,2),l(5,"div",20)(6,"button",21),h("click",function(){return i.goBack()}),P(7,3),A(8,"sh-icon"),O(),r(),l(9,"button",22),h("click",function(){return i.next()}),P(10,4),A(11,"sh-icon"),O(),r()()),e&2&&(_(2),d("isClearable",!1)("options",i.scheduleOptions),_(),d("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[Te,re,gt,ut,se,ge,Se,je,Q,ie,we,At,un],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 Ln=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],wn=["[title]","[description]","[action]","*"];function $n(n,t){n&1&&C(0,"Title")}function Gn(n,t){n&1&&(l(0,"sh-icon"),C(1,"caret-down"),r())}var at=class n{isActive=ke(!1);disallowToggle=J(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&me("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Ke(Ln),l(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),Oe(3,0,null,$n,1,0),m(5,Gn,2,0,"sh-icon"),r(),Oe(6,1),r(),l(7,"div",2),Oe(8,2),r()(),l(9,"div",3),Oe(10,3),r()),e&2&&(_(5),g(i.disallowToggle()?-1:5))},dependencies:[Q],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 vn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),k("ngModelChange",function(o){S(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),h("ngModelChange",function(){S(e);let o=s();return E(o.updateFilter())}),r()()}if(n&2){let e=s();d("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),U("ngModel",e.internalPath)}}function bn(n,t){if(n&1&&(ae(0,7),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Un(n,t){if(n&1&&(ae(0,8),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function kn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),k("ngModelChange",function(o){S(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),h("ngModelChange",function(){S(e);let o=s();return E(o.updateFilter())}),r(),m(2,bn,2,1,"ng-container",7),m(3,Un,2,1,"ng-container",8),r()}if(n&2){let e,i,o=s();_(),U("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 Vn=[{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"}],Bn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Gt=class n{path=J.required();osType=J();pathChange=Ue();remove=Ue();internalPath=F("");pathType=F("-Expression");currentExpressionOption=x(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(Vn);expressionOptions=x(()=>{let e=this.osType()==="Windows"?"\\":"/";return Bn.map(i=>i.value==="-Folder"||i.value==="+Folder"?Ce(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?Ce(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?Ce(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?Ce(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?Ce(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?Ce(j({},i),{startsWith:"*.",endsWith:""}):Ce(j({},i),{startsWith:"",endsWith:""}))});pathEffect=oe(()=>{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!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,i){if(e&1&&(l(0,"sh-select",0)(1,"input",1),k("ngModelChange",function(a){return G(i.pathType,a)||(i.pathType=a),a}),h("ngModelChange",function(){return i.updateFilter()}),r()(),m(2,vn,2,4,"sh-select",2)(3,kn,4,3,"sh-form-field",3),l(4,"div",4),h("click",function(){return i.removeFilter()}),l(5,"sh-icon",5),C(6,"x-circle"),r()()),e&2){let o;d("options",i.expressionOptions())("isClearable",!1),_(),U("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[Te,re,se,ge,we,Se,Q],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 Kn=["*"];function zn(n,t){n&1&&(l(0,"sh-chip",4),C(1,"Special"),r())}function Jn(n,t){n&1&&(l(0,"sh-chip",5),C(1,"Deprecated"),r())}function Xn(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),A(2,"img",2),r(),l(3,"div",3),C(4),m(5,zn,2,0,"sh-chip",4)(6,Jn,2,0,"sh-chip",5),r(),l(7,"div",6),C(8),r(),l(9,"div",7),Oe(10),r()()),n&2){s();let e=f(0);_(2),d("src",Bt(e.icon),_t)("alt",Bt(e.displayName)),_(2),z(" ",e.displayName," "),_(),g((e.sortOrder??0)==-2?5:(e.sortOrder??0)<0?6:-1),_(3),nt(e.description)}}var Ye=class n{destination=J();targetUrl=J();selectedDestinationType=x(()=>{let t=this.targetUrl();return t?Ge(t)??null:null});destinationFromTargetUrl=x(()=>{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=x(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"]},ngContentSelectors:Kn,decls:2,vars:2,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,i){if(e&1&&(Ke(),ce(0),m(1,Xn,11,7,"sh-card",0)),e&2){let o=Y(i.destinationItem());_(),g(o?1:-1)}},dependencies:[dn,ht],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%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var Qe=class n{#e=M(Ee);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=gn(e.Key);if(i.length<=1){let o=yt(e.Key);return o.isDefaultEntry===!0?[Ce(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=x(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=x(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=x(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=x(()=>[...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=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function Wn(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let o=S(e).$implicit,a=s();return E(a.setDestination.emit(o.customKey??o.key))}),P(2,0),A(3,"sh-icon"),O(),r()()}if(n&2){let e=t.$implicit;d("destination",e)}}var vt=class n{#e=M(Qe);showAsSources=J(!1);moduleType=J("Backend");setDestination=Ue();destinationSearchTerm=F("");destinationTypeOptions=x(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=x(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((o,a)=>{let c=o.sortOrder??0,u=a.sortOrder??0;return c!==u?u-c:o.displayName.localeCompare(a.displayName)}).filter(o=>{let a=o.sortOrder??0;return a<0&&e?.length&&(o.key.toLocaleLowerCase()===e.toLocaleLowerCase()||o.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?i.filter(o=>o.searchTerms.toLowerCase().includes(e)):i});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),k("ngModelChange",function(a){return G(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),De(3,Wn,4,1,"app-destination-list-item",3,Ne),r()),e&2&&(_(),U("ngModel",i.destinationSearchTerm),_(2),Ae(i.destinationTypeOptionsFocused()))},dependencies:[Ye,Te,re,se,ge,Se,ie,Q],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 Hn=["fileInput"],jn=[[["label"]]],qn=["label"],bt=class n{customId=J();content=F("");readonly=F(!1);placeholder=J($localize`Drop a file here or use the browse button`);fileInputRef=Xe("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=oe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,Hn,5),e&2&&Je()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[on([{provide:rn,useExisting:n,multi:!0}])],ngContentSelectors:qn,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,i){if(e&1){let o=D();Ke(jn),Oe(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),h("click",function(){return S(o),E(i.triggerBrowse())}),l(3,"sh-icon"),C(4,"upload"),r()()(),l(5,"div",3),h("drop",function(c){return S(o),E(i.onFileDrop(c))})("dragover",function(c){return S(o),E(i.onDragOver(c))}),l(6,"textarea",4),k("ngModelChange",function(c){return S(o),G(i.content,c)||(i.content=c),E(c)}),r()(),l(7,"input",5,0),h("change",function(c){return S(o),E(i.onFileSelected(c))}),r()}e&2&&(_(6),d("placeholder",i.placeholder()),U("ngModel",i.content),d("disabled",i.readonly()))},dependencies:[Te,re,se,ge,Q,ie],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 Yn=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),le=n=>({$implicit:n}),Qn=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Zn=()=>({updateOn:"blur"}),ei=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),ti=()=>["/connect/logon"];function ni(n,t){n&1&&te(0)}function ii(n,t){if(n&1&&X(0,ni,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Yn,i,e,a,c.oauthField)))}}function oi(n,t){n&1&&te(0)}function ai(n,t){if(n&1&&X(0,oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Qn,i,e,a,c.oauthField)))}}function li(n,t){if(n&1){let e=D();l(0,"button",25),h("click",function(){S(e);let o=s(2);return E(o.showTextArea.set(!1))}),P(1,8),A(2,"sh-icon"),O(),r()}}function ri(n,t){if(n&1){let e=D();l(0,"button",32,2),h("click",function(){let o=S(e).$implicit,a=s(3);return E(a.addAdvancedOption(o))}),C(2),r()}if(n&2){let e=t.$implicit;_(2),z(" ",e.name," ")}}function si(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),P(3,9),A(4,"sh-icon"),O(),r(),ae(5,28),De(6,ri,3,1,"button",29,Ne),ee(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),C(11,"dots-three-vertical"),r()(),ae(12,28),l(13,"button",31),h("click",function(){S(e);let o=s(2);return E(o.showTextArea.set(!0))}),l(14,"sh-icon"),C(15,"link"),r(),C(16," Edit contents as text "),r(),ee(),r()()}if(n&2){s();let e=f(9);_(),d("searchable",!0),_(),d("disabled",e.length===0),_(4),Ae(e)}}function _i(n,t){if(n&1){let e=D();l(0,"textarea",33),h("ngModelChange",function(o){S(e);let a=s(2);return E(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);d("ngModel",e.settingsAsText())("ngModelOptions",ye(2,Zn))}}function ci(n,t){n&1&&te(0)}function di(n,t){if(n&1&&X(0,ci,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=q(15),a=s(),c=f(0),u=f(1),p=a.getFormView("advanced",e)??a.getDefaultFormView(e);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,ei,i,p,c,u.oauthField)))}}function ui(n,t){if(n&1&&De(0,di,1,9,"ng-container",null,Ne),n&2){let e=s(2);Ae(e.advancedFormFieldNames())}}function pi(n,t){n&1&&(l(0,"sup",42),C(1,"*"),r())}function Ci(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function mi(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),m(2,pi,2,0,"sup",42),C(3),m(4,Ci,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);d("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function gi(n,t){n&1&&(l(0,"sup",45),C(1,"*"),r())}function Ti(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Si(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),m(2,gi,2,0,"sup",45),C(3),m(4,Ti,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);d("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function Ei(n,t){n&1&&(l(0,"sup",46),C(1,"*"),r())}function fi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function hi(n,t){n&1&&(l(0,"sh-icon",47),C(1," warning "),r())}function Fi(n,t){n&1&&te(0)}function Ni(n,t){if(n&1&&(l(0,"sh-icon",51),C(1," link "),r()),n&2){s();let e=f(8),i=f(9);me("error",e&&i==="error")("warn",e&&i==="warning"),d("shTooltip",e)}}function Di(n,t){n&1&&(l(0,"sh-icon",50),C(1,"envelope"),r())}function Ai(n,t){n&1&&(l(0,"sh-icon",50),C(1,"hard-drives"),r())}function Ii(n,t){n&1&&(l(0,"sh-icon",50),C(1,"jar"),r())}function Pi(n,t){n&1&&(l(0,"sh-icon",50),C(1,"textbox"),r())}function Oi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Ei,2,0,"sup",46),C(3),m(4,fi,2,1,"sh-icon",43),m(5,hi,2,0,"sh-icon",47),X(6,Fi,1,0,"ng-container",24),r(),l(7,"input",48),h("keydown",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),ce(8)(9),m(10,Ni,2,5,"sh-icon",49)(11,Di,2,0,"sh-icon",50)(12,Ai,2,0,"sh-icon",50)(13,Ii,2,0,"sh-icon",50)(14,Pi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);s();let p=q(17);_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),g(c&&e.formView.type==="Path"?5:-1),_(),d("ngTemplateOutlet",p)("ngTemplateOutletContext",ne(16,le,de(13,fe,e.fieldGroup,e.formView))),_(),d("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",o);let T=a,y=s().hasLeadingSlash(T??"");_(),Y(y&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),Y(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 yi(n,t){n&1&&(l(0,"sup",52),C(1,"*"),r())}function Mi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function xi(n,t){n&1&&te(0)}function Ri(n,t){if(n&1){let e=D();l(0,"span",56),h("click",function(){S(e);let o=s(2).$implicit,a=s(2);return E(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),C(1," AuthID "),r()}}function Li(n,t){n&1&&(l(0,"sh-icon",50),C(1,"password"),r())}function wi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){S(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye "),r()}}function $i(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){S(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye-slash "),r()}}function Gi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,yi,2,0,"sup",52),C(3),m(4,Mi,2,1,"sh-icon",43),X(5,xi,1,0,"ng-container",24),r(),l(6,"input",53),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),m(7,Ri,2,0,"span",54)(8,Li,2,0,"sh-icon",50),m(9,wi,2,0,"sh-icon",55)(10,$i,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(14,le,de(11,fe,e.fieldGroup,e.formView))),_(),d("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 vi(n,t){n&1&&(l(0,"sup",59),C(1,"*"),r())}function bi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Ui(n,t){n&1&&te(0)}function ki(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Vi(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),m(2,vi,2,0,"sup",59),C(3),m(4,bi,2,1,"sh-icon",43),X(5,Ui,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,ki,1,2,"ng-template",null,3,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("isClearable",!1)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(14,le,de(11,fe,o.fieldGroup,o.formView))),_(),d("id",p)("ngModel",c)}}function Bi(n,t){if(n&1&&(ce(0),m(1,Vi,9,16)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Ki(n,t){n&1&&(l(0,"sup",62),C(1,"*"),r())}function zi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Ji(n,t){n&1&&te(0)}function Xi(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Wi(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),m(2,Ki,2,0,"sup",62),C(3),m(4,zi,2,1,"sh-icon",43),X(5,Ji,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,Xi,1,2,"ng-template",null,4,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(15,le,de(12,fe,o.fieldGroup,o.formView))),_(),d("id",p)("ngModel",c)}}function Hi(n,t){n&1&&A(0,"sh-progress-bar",60)}function ji(n,t){if(n&1&&(ce(0),m(1,Wi,9,17)(2,Hi,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=f(2),o=Y(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function qi(n,t){n&1&&(l(0,"sup",64),C(1,"*"),r())}function Yi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Qi(n,t){n&1&&te(0)}function Zi(n,t){if(n&1){let e=D();l(0,"app-size",63),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,qi,2,0,"sup",64),C(3),m(4,Yi,2,1,"sh-icon",43),X(5,Qi,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);d("inputType",e.Name)("ngModel",o)("customId",c),_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function eo(n,t){n&1&&(l(0,"sup",65),C(1,"*"),r())}function to(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function no(n,t){n&1&&te(0)}function io(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,eo,2,0,"sup",65),C(3),m(4,to,2,1,"sh-icon",43),X(5,no,1,0,"ng-container",24),r(),l(6,"input",66),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o)}}function oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function ao(n,t){n&1&&te(0)}function lo(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),h("click",function(){S(e);let o=s().$implicit,a=f(2),c=s(2);return E(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),C(2),m(3,oo,2,1,"sh-icon",43),X(4,ao,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(5);s();let c=q(17),u=s();me("active",u.isTrue(o)),_(),d("for",a),_(),z(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(10,le,de(7,fe,e.fieldGroup,e.formView)))}}function ro(n,t){n&1&&(l(0,"sup",69),C(1,"*"),r())}function so(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function _o(n,t){n&1&&te(0)}function co(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),m(2,ro,2,0,"sup",69),C(3),m(4,so,2,1,"sh-icon",43),X(5,_o,1,0,"ng-container",24),r(),l(6,"input",70),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,co,1,2,"ng-template",null,5,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("selectMultiple",!0)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(13,le,de(10,fe,o.fieldGroup,o.formView))),_(),d("ngModel",c)}}function po(n,t){if(n&1&&(ce(0),m(1,uo,9,15)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Co(n,t){n&1&&(l(0,"sup",71),C(1,"*"),r())}function mo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function go(n,t){n&1&&te(0)}function To(n,t){if(n&1){let e=D();l(0,"app-timespan",63),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,Co,2,0,"sup",71),C(3),m(4,mo,2,1,"sh-icon",43),X(5,go,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);d("inputType",e.formView.name)("ngModel",o)("customId",c),_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function So(n,t){n&1&&(l(0,"sup",73),C(1,"*"),r())}function Eo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function fo(n,t){n&1&&te(0)}function ho(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),m(2,So,2,0,"sup",73),C(3),m(4,Eo,2,1,"sh-icon",43),X(5,fo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(2),o=f(4),a=f(5);s();let c=q(17);d("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),g(e.formView.isMandatory&&o?2:-1),_(),z(" ",e.formView.shortDescription??e.formView.name," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView)))}}function Fo(n,t){n&1&&(A(0,"sh-spinner"),l(1,"span"),I(2,10),r()),n&2&&ct("--spinner-size","16px")("--spinner-thickness","2px")}function No(n,t){n&1&&(l(0,"div",76),I(1,11),r())}function Do(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ao(n,t){if(n&1){let e=D();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),C(3,"*"),r(),l(4,"span"),I(5,12),r()(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(4).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,Do,1,2,"ng-template",null,6,be)}if(n&2){s(4);let e=f(2),i=f(5),o=s(2);d("options",o.restoreBackupIdOptions())("isClearable",!1),_(),d("for",i),_(5),d("id",i)("ngModel",e)}}function Io(n,t){if(n&1&&m(0,Fo,3,4)(1,No,2,0,"div",76)(2,Ao,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Po(n,t){n&1&&(l(0,"sup",79),C(1,"*"),r())}function Oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(4).$implicit;d("shTooltip",e.formView.longDescription)}}function yo(n,t){n&1&&te(0)}function Mo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){S(e),s(4);let o=f(5),a=s(2);return E(a.toggleDisabled(o))}),P(1,13),A(2,"sh-icon"),O(),r()}}function xo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Po,2,0,"sup",79),C(3),m(4,Oo,2,1,"sh-icon",43),X(5,yo,1,0,"ng-container",24),r(),l(6,"input",80),h("ngModelChange",function(o){S(e);let a=s(3).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"textbox"),r()(),m(9,Mo,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17),p=s();_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(15,le,de(12,fe,e.fieldGroup,e.formView))),_(),d("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),g(p.getIsDisabled(c)?9:-1)}}function Ro(n,t){if(n&1&&(l(0,"div",74),m(1,Io,3,1)(2,xo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Lo(n,t){if(n&1){let e=D();l(0,"div",82),P(1,14),A(2,"div")(3,"div"),O(),r(),l(4,"button",81),h("click",function(){S(e);let o=s(5);return E(o.openConsole())}),P(5,15),A(6,"sh-icon"),O(),r()}}function wo(n,t){n&1&&(l(0,"div",82),I(1,16),r(),l(2,"button",83),P(3,17),A(4,"sh-icon"),O(),r()),n&2&&(_(2),d("routerLink",ye(1,ti)))}function $o(n,t){if(n&1&&(l(0,"div",75),m(1,Lo,7,0)(2,wo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function Go(n,t){if(n&1&&m(0,Ro,3,1,"div",74)(1,$o,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function vo(n,t){n&1&&(l(0,"sup",85),C(1,"*"),r())}function bo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Uo(n,t){n&1&&te(0)}function ko(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),m(3,vo,2,0,"sup",85),C(4),m(5,bo,2,1,"sh-icon",43),X(6,Uo,1,0,"ng-container",24),r(),l(7,"input",86),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),C(9,"textbox"),r()(),l(10,"button",87),h("click",function(){S(e);let o=s(4);return E(o.authenticateFilen())}),P(11,18),A(12,"sh-icon"),O(),r()()}if(n&2){let e=s(2).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17),p=s();_(2),d("for",c),_(),g(e.formView.isMandatory&&a?3:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?5:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o),_(3),d("disabled",p.isAuthenticatingFilen())}}function Vo(n,t){if(n&1&&m(0,ko,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function Bo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){S(e);let o=s().$implicit,a=s(2);return E(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),C(2,"x-circle"),r()()}}function Ko(n,t){if(n&1&&(l(0,"div",34),ce(1)(2)(3)(4)(5),m(6,mi,6,12,"app-file-tree",35)(7,Si,6,9,"app-file-tree",36)(8,Oi,15,18,"sh-form-field")(9,Gi,11,16,"sh-form-field")(10,Bi,2,2)(11,ji,3,2)(12,Zi,6,14,"app-size",37)(13,io,9,13,"sh-form-field")(14,lo,5,12,"sh-toggle",38)(15,po,2,2)(16,To,6,14,"app-timespan",37)(17,ho,6,13,"app-file-drop-textarea",39)(18,Go,2,1)(19,Vo,1,1),m(20,Bo,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=f(0),o=s();me("single-field",e.fieldGroup!=="advanced"),_(),Y(e.formView.shortDescription??e.formView.name),_(),Y(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=Y(o.getFieldValue(e.fieldGroup,e.formView.name));_(),Y((a??"").toString().trim()===""),_(),Y("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 zo(n,t){if(n&1&&(l(0,"sh-icon",88),C(1,"x-circle"),r()),n&2){s();let e=f(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Jo(n,t){if(n&1&&(l(0,"sh-icon",89),C(1,"warning"),r()),n&2){s();let e=f(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Xo(n,t){if(n&1&&(ce(0),m(1,zo,2,1,"sh-icon",88)(2,Jo,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=f(0),o=Y(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Wo(n,t){if(n&1&&(ce(0),m(1,Xo,3,2)),n&2){let e=t.$implicit,o=(Y(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function Ho(n,t){if(n&1&&(ce(0),De(1,ii,1,9,"ng-container",null,Ne),De(3,ai,1,9,"ng-container",null,Ne),l(5,"sh-toggle-card",19),ae(6,20)(7),I(8,7),ee(),ce(9),m(10,li,3,0,"button",21)(11,si,17,2,"div",22),ee(),m(12,_i,1,3,"textarea",23)(13,ui,2,0),r(),X(14,Ko,21,9,"ng-template",null,0,be)(16,Wo,2,2,"ng-template",null,1,be)),n&2){let e=s(),i=f(1);Y(e.destinationForm()),_(),Ae(i.custom),_(2),Ae(i.dynamic),_(2),d("disallowToggle",!0),_(4),Y(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Ut=class n{#e=M(Pe);#t=M(Ee);#n=M(Ot);#i=M(Qe);#a=M(Cn);#r=M(mn);#o=M(Le);injector=M(en);targetUrl=ke.required();useBackupState=J(!1);#l=null;destinationType=x(()=>{let t=this.targetUrl();if(!t)return null;let e=Ge(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=x(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=x(()=>!this.useBackupState());restoreBackupIdOptions=$e(pn(this.targetUrl).pipe(qt(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}}),Yt((t,e)=>t.authKey===e.authKey),Zt(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),Qt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(Be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):jt([]))),{initialValue:[]});isConnectedToConsole=x(()=>this.#a.state()==="connected");hasStorageApiKey=x(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=x(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=x(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=oe(()=>{let t=this.targetUrl(),e=Ge(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find(L=>L.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,u=e&&e.customFields?e.customFields:{},p=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],y=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};u&&Object.entries(u).forEach(([L,N],V)=>{let B=N.order??V,R=N.validate;!R&&N.type==="Bucketname"&&(R=W=>En(W)?null:{type:"error",message:$localize`Invalid bucket name.`}),R&&N.type==="Hostname"&&(R=W=>fn(W)?null:{type:"error",message:$localize`Invalid hostname.`}),v.custom.push(j({order:900+B,validate:R},N))});for(let L=0;L<a.Options.length;L++){let N=a.Options[L];if(N.Deprecated)continue;let V=p.find(B=>B===N.Name||N.Aliases?.includes(B.name)||B.name===N.Name);if(V){let B=N.Aliases?.indexOf(V.name)??-1,R=N.Aliases&&B>-1?N.Aliases[B]:N.Name,W=V&&typeof V!="string",ue=W?V?.defaultValue??N.DefaultValue:N.DefaultValue,pe=W&&V?.order!==void 0?V.order:L,w={name:R,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+pe},he=W?j(j({},w),V):w;v.dynamic.push(he)}else{let B=N.Name;if(y.find(Fe=>Fe===B))continue;let W=T.find(Fe=>Fe===B||Fe.name===B),ue=W&&typeof W!="string",pe=ue&&W?.order!==void 0?W.order:L,w={name:B,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+pe},he=ue?j(j({},w),W):w;v.advanced.push(he)}}if(v.custom.sort((L,N)=>L.order-N.order),v.dynamic.sort((L,N)=>L.order-N.order),v.advanced.sort((L,N)=>L.order-N.order),this.destinationFormConfig.set(v),!t)return;let $=Mt(t);$&&this.destinationForm.set({custom:$.custom,dynamic:$.dynamic,advanced:$.advanced})});destinationFormEffect=oe(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=Tn({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}#_=F(!1);oauthStartTokenCreation(t,e,i,o){this.#_.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(V=>V.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let p=`${a}?type=${t}`,T=450,y=600,v=screen.width/2-T/2,$=screen.height/2-y/2,L=window.open(p,"_blank","height="+y+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+v+",top="+$);return window.addEventListener("message",N=>{let V=N.data.startsWith("authid:"),B=V?N.data.replace("authid:",""):null;V&&(this.destinationForm.update(R=>(R[e][i]=B,R)),this.#_.set(!1),this.refreshView.set(!this.refreshView()),L?.close())}),!1}settingsAsText=x(()=>{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{b as xt,c as Rt,d as Lt,e as Nn}from"./chunk-K34VOGDF.js";import{a as mn,b as Ge,c as yt,d as gn,e as Tn,f as Mt,h as Sn,i as En,j as fn}from"./chunk-AT64P6E5.js";import{a as hn,b as Kt,c as Fn}from"./chunk-6LAXPU22.js";import{a as Cn}from"./chunk-TL4WOQKT.js";import{a as Z}from"./chunk-HSHF5HR7.js";import{a as Ot}from"./chunk-D6IP567E.js";import{a as pn,b as $e}from"./chunk-VDSX2M4H.js";import{a as Ee}from"./chunk-HUZXJWCG.js";import{B as ie,C as dn,E as ht,F as un,H as Se,K as Ft,L as Nt,O as Dt,P as we,V as At,W as je,Y as It,a as rn,b as ut,c as re,d as pt,e as se,f as Ct,h as sn,i as ge,j as mt,k as gt,n as _n,o as cn,p as Tt,q as St,r as Et,s as Te,t as He,u as Q,w as ft,z as Le}from"./chunk-UNMDSCAN.js";import{c as Pt}from"./chunk-CFNARBNK.js";import{b as We,d as Re,e as ln}from"./chunk-I27PVH6D.js";import{_ as an}from"./chunk-7AVOHYTE.js";import{$ as S,Ab as r,Ac as dt,Bb as A,D as Yt,E as Be,Fb as ae,Gb as ee,Gc as be,Hb as te,Ib as D,K as Qt,M as Zt,Ma as _t,Mc as x,Pa as _,Pb as P,Qb as O,Qc as Ue,R as xe,Rb as I,Rc as J,Sc as Xe,Ub as ve,Uc as ke,Vb as h,W as M,Xb as s,Yb as Ke,Zb as Oe,aa as E,cb as H,cc as ze,da as en,dc as Je,ec as q,f as st,fc as ct,gc as me,hb as X,jc as C,kb as tn,kc as nt,l as jt,la as F,lc as z,mc as it,na as oe,oc as U,p as qt,pc as G,qc as k,rb as nn,rc as ce,sb as m,sc as Y,tb as g,tc as f,ub as Ne,uc as Bt,wb as De,wc as on,xb as Ae,xc as ye,yb as d,yc as ne,zb as l,zc as de}from"./chunk-26Z7TPJB.js";import{a as j,b as Ce}from"./chunk-7CGTOI24.js";var wt=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=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function ot(n){if(tn(n))return n();if(Array.isArray(n))return n.map(t=>ot(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=ot(n[e]));return t}return n}function yn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),I(3,7),r(),l(4,"input",28,0),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),E(o)}),r(),l(6,"sh-icon",29),C(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),C(10,"\xA0"),r(),l(11,"input",32,1),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),E(o)}),r(),l(13,"sh-icon",29),C(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),I(18,8),r(),l(19,"input",34),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),E(o)}),r()(),l(20,"sh-select",35)(21,"input",36),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),E(o)}),r()()(),l(22,"sh-toggle-card",37),ae(23,38),I(24,9),ee(),l(25,"div",39)(26,"sh-toggle",24),P(27,10),l(28,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),E(o)}),r(),O(),r(),l(29,"sh-toggle",24),P(30,11),l(31,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),E(o)}),r(),O(),r(),l(32,"sh-toggle",24),P(33,12),l(34,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),E(o)}),r(),O(),r(),l(35,"sh-toggle",24),P(36,13),l(37,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),E(o)}),r(),O(),r(),l(38,"sh-toggle",24),P(39,14),l(40,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),E(o)}),r(),O(),r(),l(41,"sh-toggle",24),P(42,15),l(43,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),E(o)}),r(),O(),r(),l(44,"sh-toggle",24),P(45,16),l(46,"input",25),k("ngModelChange",function(o){S(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),E(o)}),r(),O(),r()()()}if(n&2){let e=s(2);_(4),U("ngModel",e.scheduleFields.nextTime.time),_(7),U("ngModel",e.scheduleFields.nextTime.date),_(8),U("ngModel",e.scheduleFields.runAgain.repeatValue),_(),d("options",e.unitOptions)("isClearable",!1),_(),U("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),d("disallowToggle",!0),_(6),U("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),U("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Mn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),P(2,5),l(3,"input",25),k("ngModelChange",function(o){S(e);let a=s();return G(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),E(o)}),r(),O(),r(),l(4,"p"),I(5,6),r()(),m(6,yn,47,14)}if(n&2){let e=s();_(3),U("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var xn=[{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`}],$t=[{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:Rn().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 Dn(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 Rn(){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 Jt=()=>({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)}}}),zt=class n{#e=M(Pe);#t=M(Re);#n=M(We);unitOptions=xn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=$t;updateScheduleType(t){let e=$t.find(i=>i.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let i=e.data;this.scheduleFields.autoRun.set(i.autoRun??!1),this.scheduleFields.nextTime.time.set(i.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(i.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(i.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(i.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(i.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(i.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(i.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(i.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(i.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(i.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(i.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let i;i=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let c;c=$localize`If a date was missed, the job will run as soon as possible.`;let u;u=$localize`Next time`;let p;p=$localize`Run again every`;let T;T=$localize`Allowed days`;let y;y=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let B;return B=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,u,p,T,y,v,$,L,N,V,B,[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,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,i){e&1&&(l(0,"h3",17),I(1,2),r(),l(2,"sh-select",18)(3,"input",19),h("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),m(4,Mn,7,2),l(5,"div",20)(6,"button",21),h("click",function(){return i.goBack()}),P(7,3),A(8,"sh-icon"),O(),r(),l(9,"button",22),h("click",function(){return i.next()}),P(10,4),A(11,"sh-icon"),O(),r()()),e&2&&(_(2),d("isClearable",!1)("options",i.scheduleOptions),_(),d("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[Te,re,gt,ut,se,ge,Se,je,Q,ie,we,At,un],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 Ln=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],wn=["[title]","[description]","[action]","*"];function $n(n,t){n&1&&C(0,"Title")}function Gn(n,t){n&1&&(l(0,"sh-icon"),C(1,"caret-down"),r())}var at=class n{isActive=ke(!1);disallowToggle=J(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&me("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Ke(Ln),l(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),Oe(3,0,null,$n,1,0),m(5,Gn,2,0,"sh-icon"),r(),Oe(6,1),r(),l(7,"div",2),Oe(8,2),r()(),l(9,"div",3),Oe(10,3),r()),e&2&&(_(5),g(i.disallowToggle()?-1:5))},dependencies:[Q],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 vn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),k("ngModelChange",function(o){S(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),h("ngModelChange",function(){S(e);let o=s();return E(o.updateFilter())}),r()()}if(n&2){let e=s();d("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),U("ngModel",e.internalPath)}}function bn(n,t){if(n&1&&(ae(0,7),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Un(n,t){if(n&1&&(ae(0,8),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function kn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),k("ngModelChange",function(o){S(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),E(o)}),h("ngModelChange",function(){S(e);let o=s();return E(o.updateFilter())}),r(),m(2,bn,2,1,"ng-container",7),m(3,Un,2,1,"ng-container",8),r()}if(n&2){let e,i,o=s();_(),U("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 Vn=[{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"}],Bn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Gt=class n{path=J.required();osType=J();pathChange=Ue();remove=Ue();internalPath=F("");pathType=F("-Expression");currentExpressionOption=x(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(Vn);expressionOptions=x(()=>{let e=this.osType()==="Windows"?"\\":"/";return Bn.map(i=>i.value==="-Folder"||i.value==="+Folder"?Ce(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?Ce(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?Ce(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?Ce(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?Ce(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?Ce(j({},i),{startsWith:"*.",endsWith:""}):Ce(j({},i),{startsWith:"",endsWith:""}))});pathEffect=oe(()=>{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!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,i){if(e&1&&(l(0,"sh-select",0)(1,"input",1),k("ngModelChange",function(a){return G(i.pathType,a)||(i.pathType=a),a}),h("ngModelChange",function(){return i.updateFilter()}),r()(),m(2,vn,2,4,"sh-select",2)(3,kn,4,3,"sh-form-field",3),l(4,"div",4),h("click",function(){return i.removeFilter()}),l(5,"sh-icon",5),C(6,"x-circle"),r()()),e&2){let o;d("options",i.expressionOptions())("isClearable",!1),_(),U("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[Te,re,se,ge,we,Se,Q],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 Kn=["*"];function zn(n,t){n&1&&(l(0,"sh-chip",4),C(1,"Special"),r())}function Jn(n,t){n&1&&(l(0,"sh-chip",5),C(1,"Deprecated"),r())}function Xn(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),A(2,"img",2),r(),l(3,"div",3),C(4),m(5,zn,2,0,"sh-chip",4)(6,Jn,2,0,"sh-chip",5),r(),l(7,"div",6),C(8),r(),l(9,"div",7),Oe(10),r()()),n&2){s();let e=f(0);_(2),d("src",Bt(e.icon),_t)("alt",Bt(e.displayName)),_(2),z(" ",e.displayName," "),_(),g((e.sortOrder??0)==-2?5:(e.sortOrder??0)<0?6:-1),_(3),nt(e.description)}}var Ye=class n{destination=J();targetUrl=J();selectedDestinationType=x(()=>{let t=this.targetUrl();return t?Ge(t)??null:null});destinationFromTargetUrl=x(()=>{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=x(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"]},ngContentSelectors:Kn,decls:2,vars:2,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,i){if(e&1&&(Ke(),ce(0),m(1,Xn,11,7,"sh-card",0)),e&2){let o=Y(i.destinationItem());_(),g(o?1:-1)}},dependencies:[dn,ht],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%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var Qe=class n{#e=M(Ee);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=gn(e.Key);if(i.length<=1){let o=yt(e.Key);return o.isDefaultEntry===!0?[Ce(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=x(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=x(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=x(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=x(()=>[...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=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function Wn(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let o=S(e).$implicit,a=s();return E(a.setDestination.emit(o.customKey??o.key))}),P(2,0),A(3,"sh-icon"),O(),r()()}if(n&2){let e=t.$implicit;d("destination",e)}}var vt=class n{#e=M(Qe);showAsSources=J(!1);moduleType=J("Backend");setDestination=Ue();destinationSearchTerm=F("");destinationTypeOptions=x(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=x(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((o,a)=>{let c=o.sortOrder??0,u=a.sortOrder??0;return c!==u?u-c:o.displayName.localeCompare(a.displayName)}).filter(o=>{let a=o.sortOrder??0;return a<0&&e?.length&&(o.key.toLocaleLowerCase()===e.toLocaleLowerCase()||o.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?i.filter(o=>o.searchTerms.toLowerCase().includes(e)):i});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),k("ngModelChange",function(a){return G(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),De(3,Wn,4,1,"app-destination-list-item",3,Ne),r()),e&2&&(_(),U("ngModel",i.destinationSearchTerm),_(2),Ae(i.destinationTypeOptionsFocused()))},dependencies:[Ye,Te,re,se,ge,Se,ie,Q],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 Hn=["fileInput"],jn=[[["label"]]],qn=["label"],bt=class n{customId=J();content=F("");readonly=F(!1);placeholder=J($localize`Drop a file here or use the browse button`);fileInputRef=Xe("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=oe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,Hn,5),e&2&&Je()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[on([{provide:rn,useExisting:n,multi:!0}])],ngContentSelectors:qn,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,i){if(e&1){let o=D();Ke(jn),Oe(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),h("click",function(){return S(o),E(i.triggerBrowse())}),l(3,"sh-icon"),C(4,"upload"),r()()(),l(5,"div",3),h("drop",function(c){return S(o),E(i.onFileDrop(c))})("dragover",function(c){return S(o),E(i.onDragOver(c))}),l(6,"textarea",4),k("ngModelChange",function(c){return S(o),G(i.content,c)||(i.content=c),E(c)}),r()(),l(7,"input",5,0),h("change",function(c){return S(o),E(i.onFileSelected(c))}),r()}e&2&&(_(6),d("placeholder",i.placeholder()),U("ngModel",i.content),d("disabled",i.readonly()))},dependencies:[Te,re,se,ge,Q,ie],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 Yn=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),le=n=>({$implicit:n}),Qn=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Zn=()=>({updateOn:"blur"}),ei=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),ti=()=>["/connect/logon"];function ni(n,t){n&1&&te(0)}function ii(n,t){if(n&1&&X(0,ni,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Yn,i,e,a,c.oauthField)))}}function oi(n,t){n&1&&te(0)}function ai(n,t){if(n&1&&X(0,oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Qn,i,e,a,c.oauthField)))}}function li(n,t){if(n&1){let e=D();l(0,"button",25),h("click",function(){S(e);let o=s(2);return E(o.showTextArea.set(!1))}),P(1,8),A(2,"sh-icon"),O(),r()}}function ri(n,t){if(n&1){let e=D();l(0,"button",32,2),h("click",function(){let o=S(e).$implicit,a=s(3);return E(a.addAdvancedOption(o))}),C(2),r()}if(n&2){let e=t.$implicit;_(2),z(" ",e.name," ")}}function si(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),P(3,9),A(4,"sh-icon"),O(),r(),ae(5,28),De(6,ri,3,1,"button",29,Ne),ee(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),C(11,"dots-three-vertical"),r()(),ae(12,28),l(13,"button",31),h("click",function(){S(e);let o=s(2);return E(o.showTextArea.set(!0))}),l(14,"sh-icon"),C(15,"link"),r(),C(16," Edit contents as text "),r(),ee(),r()()}if(n&2){s();let e=f(9);_(),d("searchable",!0),_(),d("disabled",e.length===0),_(4),Ae(e)}}function _i(n,t){if(n&1){let e=D();l(0,"textarea",33),h("ngModelChange",function(o){S(e);let a=s(2);return E(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);d("ngModel",e.settingsAsText())("ngModelOptions",ye(2,Zn))}}function ci(n,t){n&1&&te(0)}function di(n,t){if(n&1&&X(0,ci,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=q(15),a=s(),c=f(0),u=f(1),p=a.getFormView("advanced",e)??a.getDefaultFormView(e);d("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,ei,i,p,c,u.oauthField)))}}function ui(n,t){if(n&1&&De(0,di,1,9,"ng-container",null,Ne),n&2){let e=s(2);Ae(e.advancedFormFieldNames())}}function pi(n,t){n&1&&(l(0,"sup",42),C(1,"*"),r())}function Ci(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function mi(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),m(2,pi,2,0,"sup",42),C(3),m(4,Ci,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);d("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function gi(n,t){n&1&&(l(0,"sup",45),C(1,"*"),r())}function Ti(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Si(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),m(2,gi,2,0,"sup",45),C(3),m(4,Ti,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);d("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("id",u)("ngModel",o)}}function Ei(n,t){n&1&&(l(0,"sup",46),C(1,"*"),r())}function fi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function hi(n,t){n&1&&(l(0,"sh-icon",47),C(1," warning "),r())}function Fi(n,t){n&1&&te(0)}function Ni(n,t){if(n&1&&(l(0,"sh-icon",51),C(1," link "),r()),n&2){s();let e=f(8),i=f(9);me("error",e&&i==="error")("warn",e&&i==="warning"),d("shTooltip",e)}}function Di(n,t){n&1&&(l(0,"sh-icon",50),C(1,"envelope"),r())}function Ai(n,t){n&1&&(l(0,"sh-icon",50),C(1,"hard-drives"),r())}function Ii(n,t){n&1&&(l(0,"sh-icon",50),C(1,"jar"),r())}function Pi(n,t){n&1&&(l(0,"sh-icon",50),C(1,"textbox"),r())}function Oi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Ei,2,0,"sup",46),C(3),m(4,fi,2,1,"sh-icon",43),m(5,hi,2,0,"sh-icon",47),X(6,Fi,1,0,"ng-container",24),r(),l(7,"input",48),h("keydown",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),ce(8)(9),m(10,Ni,2,5,"sh-icon",49)(11,Di,2,0,"sh-icon",50)(12,Ai,2,0,"sh-icon",50)(13,Ii,2,0,"sh-icon",50)(14,Pi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),u=f(5);s();let p=q(17);_(),d("for",u),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),g(c&&e.formView.type==="Path"?5:-1),_(),d("ngTemplateOutlet",p)("ngTemplateOutletContext",ne(16,le,de(13,fe,e.fieldGroup,e.formView))),_(),d("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",o);let T=a,y=s().hasLeadingSlash(T??"");_(),Y(y&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),Y(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 yi(n,t){n&1&&(l(0,"sup",52),C(1,"*"),r())}function Mi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function xi(n,t){n&1&&te(0)}function Ri(n,t){if(n&1){let e=D();l(0,"span",56),h("click",function(){S(e);let o=s(2).$implicit,a=s(2);return E(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),C(1," AuthID "),r()}}function Li(n,t){n&1&&(l(0,"sh-icon",50),C(1,"password"),r())}function wi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){S(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye "),r()}}function $i(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){S(e);let o=s(2).$implicit;return E(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye-slash "),r()}}function Gi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,yi,2,0,"sup",52),C(3),m(4,Mi,2,1,"sh-icon",43),X(5,xi,1,0,"ng-container",24),r(),l(6,"input",53),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),m(7,Ri,2,0,"span",54)(8,Li,2,0,"sh-icon",50),m(9,wi,2,0,"sh-icon",55)(10,$i,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(14,le,de(11,fe,e.fieldGroup,e.formView))),_(),d("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 vi(n,t){n&1&&(l(0,"sup",59),C(1,"*"),r())}function bi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Ui(n,t){n&1&&te(0)}function ki(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Vi(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),m(2,vi,2,0,"sup",59),C(3),m(4,bi,2,1,"sh-icon",43),X(5,Ui,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,ki,1,2,"ng-template",null,3,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("isClearable",!1)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(14,le,de(11,fe,o.fieldGroup,o.formView))),_(),d("id",p)("ngModel",c)}}function Bi(n,t){if(n&1&&(ce(0),m(1,Vi,9,16)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Ki(n,t){n&1&&(l(0,"sup",62),C(1,"*"),r())}function zi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Ji(n,t){n&1&&te(0)}function Xi(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Wi(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),m(2,Ki,2,0,"sup",62),C(3),m(4,zi,2,1,"sh-icon",43),X(5,Ji,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,Xi,1,2,"ng-template",null,4,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(15,le,de(12,fe,o.fieldGroup,o.formView))),_(),d("id",p)("ngModel",c)}}function Hi(n,t){n&1&&A(0,"sh-progress-bar",60)}function ji(n,t){if(n&1&&(ce(0),m(1,Wi,9,17)(2,Hi,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=f(2),o=Y(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function qi(n,t){n&1&&(l(0,"sup",64),C(1,"*"),r())}function Yi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function Qi(n,t){n&1&&te(0)}function Zi(n,t){if(n&1){let e=D();l(0,"app-size",63),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,qi,2,0,"sup",64),C(3),m(4,Yi,2,1,"sh-icon",43),X(5,Qi,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);d("inputType",e.Name)("ngModel",o)("customId",c),_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function eo(n,t){n&1&&(l(0,"sup",65),C(1,"*"),r())}function to(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function no(n,t){n&1&&te(0)}function io(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,eo,2,0,"sup",65),C(3),m(4,to,2,1,"sh-icon",43),X(5,no,1,0,"ng-container",24),r(),l(6,"input",66),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o)}}function oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function ao(n,t){n&1&&te(0)}function lo(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),h("click",function(){S(e);let o=s().$implicit,a=f(2),c=s(2);return E(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),C(2),m(3,oo,2,1,"sh-icon",43),X(4,ao,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(5);s();let c=q(17),u=s();me("active",u.isTrue(o)),_(),d("for",a),_(),z(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(10,le,de(7,fe,e.fieldGroup,e.formView)))}}function ro(n,t){n&1&&(l(0,"sup",69),C(1,"*"),r())}function so(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function _o(n,t){n&1&&te(0)}function co(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),m(2,ro,2,0,"sup",69),C(3),m(4,so,2,1,"sh-icon",43),X(5,_o,1,0,"ng-container",24),r(),l(6,"input",70),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,co,1,2,"ng-template",null,5,be)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),u=f(4),p=f(5);s();let T=q(17);d("options",i)("selectMultiple",!0)("optionTemplate",e),_(),d("for",p),_(),g(o.formView.isMandatory&&u?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",T)("ngTemplateOutletContext",ne(13,le,de(10,fe,o.fieldGroup,o.formView))),_(),d("ngModel",c)}}function po(n,t){if(n&1&&(ce(0),m(1,uo,9,15)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Co(n,t){n&1&&(l(0,"sup",71),C(1,"*"),r())}function mo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function go(n,t){n&1&&te(0)}function To(n,t){if(n&1){let e=D();l(0,"app-timespan",63),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,Co,2,0,"sup",71),C(3),m(4,mo,2,1,"sh-icon",43),X(5,go,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17);d("inputType",e.formView.name)("ngModel",o)("customId",c),_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function So(n,t){n&1&&(l(0,"sup",73),C(1,"*"),r())}function Eo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;d("shTooltip",e.formView.longDescription)}}function fo(n,t){n&1&&te(0)}function ho(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),h("ngModelChange",function(o){S(e);let a=s().$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),m(2,So,2,0,"sup",73),C(3),m(4,Eo,2,1,"sh-icon",43),X(5,fo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(2),o=f(4),a=f(5);s();let c=q(17);d("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),g(e.formView.isMandatory&&o?2:-1),_(),z(" ",e.formView.shortDescription??e.formView.name," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView)))}}function Fo(n,t){n&1&&(A(0,"sh-spinner"),l(1,"span"),I(2,10),r()),n&2&&ct("--spinner-size","16px")("--spinner-thickness","2px")}function No(n,t){n&1&&(l(0,"div",76),I(1,11),r())}function Do(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ao(n,t){if(n&1){let e=D();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),C(3,"*"),r(),l(4,"span"),I(5,12),r()(),l(6,"input",44),h("ngModelChange",function(o){S(e);let a=s(4).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),X(7,Do,1,2,"ng-template",null,6,be)}if(n&2){s(4);let e=f(2),i=f(5),o=s(2);d("options",o.restoreBackupIdOptions())("isClearable",!1),_(),d("for",i),_(5),d("id",i)("ngModel",e)}}function Io(n,t){if(n&1&&m(0,Fo,3,4)(1,No,2,0,"div",76)(2,Ao,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Po(n,t){n&1&&(l(0,"sup",79),C(1,"*"),r())}function Oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(4).$implicit;d("shTooltip",e.formView.longDescription)}}function yo(n,t){n&1&&te(0)}function Mo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){S(e),s(4);let o=f(5),a=s(2);return E(a.toggleDisabled(o))}),P(1,13),A(2,"sh-icon"),O(),r()}}function xo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Po,2,0,"sup",79),C(3),m(4,Oo,2,1,"sh-icon",43),X(5,yo,1,0,"ng-container",24),r(),l(6,"input",80),h("ngModelChange",function(o){S(e);let a=s(3).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"textbox"),r()(),m(9,Mo,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17),p=s();_(),d("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(15,le,de(12,fe,e.fieldGroup,e.formView))),_(),d("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),g(p.getIsDisabled(c)?9:-1)}}function Ro(n,t){if(n&1&&(l(0,"div",74),m(1,Io,3,1)(2,xo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Lo(n,t){if(n&1){let e=D();l(0,"div",82),P(1,14),A(2,"div")(3,"div"),O(),r(),l(4,"button",81),h("click",function(){S(e);let o=s(5);return E(o.openConsole())}),P(5,15),A(6,"sh-icon"),O(),r()}}function wo(n,t){n&1&&(l(0,"div",82),I(1,16),r(),l(2,"button",83),P(3,17),A(4,"sh-icon"),O(),r()),n&2&&(_(2),d("routerLink",ye(1,ti)))}function $o(n,t){if(n&1&&(l(0,"div",75),m(1,Lo,7,0)(2,wo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function Go(n,t){if(n&1&&m(0,Ro,3,1,"div",74)(1,$o,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function vo(n,t){n&1&&(l(0,"sup",85),C(1,"*"),r())}function bo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;d("shTooltip",e.formView.longDescription)}}function Uo(n,t){n&1&&te(0)}function ko(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),m(3,vo,2,0,"sup",85),C(4),m(5,bo,2,1,"sh-icon",43),X(6,Uo,1,0,"ng-container",24),r(),l(7,"input",86),h("ngModelChange",function(o){S(e);let a=s(2).$implicit,c=s(2);return E(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),C(9,"textbox"),r()(),l(10,"button",87),h("click",function(){S(e);let o=s(4);return E(o.authenticateFilen())}),P(11,18),A(12,"sh-icon"),O(),r()()}if(n&2){let e=s(2).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let u=q(17),p=s();_(2),d("for",c),_(),g(e.formView.isMandatory&&a?3:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?5:-1),_(),d("ngTemplateOutlet",u)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView))),_(),d("id",c)("ngModel",o),_(3),d("disabled",p.isAuthenticatingFilen())}}function Vo(n,t){if(n&1&&m(0,ko,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function Bo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){S(e);let o=s().$implicit,a=s(2);return E(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),C(2,"x-circle"),r()()}}function Ko(n,t){if(n&1&&(l(0,"div",34),ce(1)(2)(3)(4)(5),m(6,mi,6,12,"app-file-tree",35)(7,Si,6,9,"app-file-tree",36)(8,Oi,15,18,"sh-form-field")(9,Gi,11,16,"sh-form-field")(10,Bi,2,2)(11,ji,3,2)(12,Zi,6,14,"app-size",37)(13,io,9,13,"sh-form-field")(14,lo,5,12,"sh-toggle",38)(15,po,2,2)(16,To,6,14,"app-timespan",37)(17,ho,6,13,"app-file-drop-textarea",39)(18,Go,2,1)(19,Vo,1,1),m(20,Bo,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=f(0),o=s();me("single-field",e.fieldGroup!=="advanced"),_(),Y(e.formView.shortDescription??e.formView.name),_(),Y(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=Y(o.getFieldValue(e.fieldGroup,e.formView.name));_(),Y((a??"").toString().trim()===""),_(),Y("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 zo(n,t){if(n&1&&(l(0,"sh-icon",88),C(1,"x-circle"),r()),n&2){s();let e=f(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Jo(n,t){if(n&1&&(l(0,"sh-icon",89),C(1,"warning"),r()),n&2){s();let e=f(0);d("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Xo(n,t){if(n&1&&(ce(0),m(1,zo,2,1,"sh-icon",88)(2,Jo,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=f(0),o=Y(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Wo(n,t){if(n&1&&(ce(0),m(1,Xo,3,2)),n&2){let e=t.$implicit,o=(Y(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function Ho(n,t){if(n&1&&(ce(0),De(1,ii,1,9,"ng-container",null,Ne),De(3,ai,1,9,"ng-container",null,Ne),l(5,"sh-toggle-card",19),ae(6,20)(7),I(8,7),ee(),ce(9),m(10,li,3,0,"button",21)(11,si,17,2,"div",22),ee(),m(12,_i,1,3,"textarea",23)(13,ui,2,0),r(),X(14,Ko,21,9,"ng-template",null,0,be)(16,Wo,2,2,"ng-template",null,1,be)),n&2){let e=s(),i=f(1);Y(e.destinationForm()),_(),Ae(i.custom),_(2),Ae(i.dynamic),_(2),d("disallowToggle",!0),_(4),Y(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Ut=class n{#e=M(Pe);#t=M(Ee);#n=M(Ot);#i=M(Qe);#a=M(Cn);#r=M(mn);#o=M(Le);injector=M(en);targetUrl=ke.required();useBackupState=J(!1);#l=null;destinationType=x(()=>{let t=this.targetUrl();if(!t)return null;let e=Ge(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=x(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=x(()=>!this.useBackupState());restoreBackupIdOptions=$e(pn(this.targetUrl).pipe(qt(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}}),Yt((t,e)=>t.authKey===e.authKey),Zt(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),Qt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(Be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):jt([]))),{initialValue:[]});isConnectedToConsole=x(()=>this.#a.state()==="connected");hasStorageApiKey=x(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=x(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=x(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=oe(()=>{let t=this.targetUrl(),e=Ge(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find(L=>L.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,u=e&&e.customFields?e.customFields:{},p=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],y=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};u&&Object.entries(u).forEach(([L,N],V)=>{let B=N.order??V,R=N.validate;!R&&N.type==="Bucketname"&&(R=W=>En(W)?null:{type:"error",message:$localize`Invalid bucket name.`}),R&&N.type==="Hostname"&&(R=W=>fn(W)?null:{type:"error",message:$localize`Invalid hostname.`}),v.custom.push(j({order:900+B,validate:R},N))});for(let L=0;L<a.Options.length;L++){let N=a.Options[L];if(N.Deprecated)continue;let V=p.find(B=>B===N.Name||N.Aliases?.includes(B.name)||B.name===N.Name);if(V){let B=N.Aliases?.indexOf(V.name)??-1,R=N.Aliases&&B>-1?N.Aliases[B]:N.Name,W=V&&typeof V!="string",ue=W?V?.defaultValue??N.DefaultValue:N.DefaultValue,pe=W&&V?.order!==void 0?V.order:L,w={name:R,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+pe},he=W?j(j({},w),V):w;v.dynamic.push(he)}else{let B=N.Name;if(y.find(Fe=>Fe===B))continue;let W=T.find(Fe=>Fe===B||Fe.name===B),ue=W&&typeof W!="string",pe=ue&&W?.order!==void 0?W.order:L,w={name:B,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+pe},he=ue?j(j({},w),W):w;v.advanced.push(he)}}if(v.custom.sort((L,N)=>L.order-N.order),v.dynamic.sort((L,N)=>L.order-N.order),v.advanced.sort((L,N)=>L.order-N.order),this.destinationFormConfig.set(v),!t)return;let $=Mt(t);$&&this.destinationForm.set({custom:$.custom,dynamic:$.dynamic,advanced:$.advanced})});destinationFormEffect=oe(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=Tn({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}#_=F(!1);oauthStartTokenCreation(t,e,i,o){this.#_.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(V=>V.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let p=`${a}?type=${t}`,T=450,y=600,v=screen.width/2-T/2,$=screen.height/2-y/2,L=window.open(p,"_blank","height="+y+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+v+",top="+$);return window.addEventListener("message",N=>{let V=N.data.startsWith("authid:"),B=V?N.data.replace("authid:",""):null;V&&(this.destinationForm.update(R=>(R[e][i]=B,R)),this.#_.set(!1),this.refreshView.set(!this.refreshView()),L?.close())}),!1}settingsAsText=x(()=>{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=Sn(t);this.destinationForm.update(i=>Ce(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.#a.openConsole()}#s(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.#o.open(Z,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=i,o.dynamic["two-factor-code"]=null,o)),this.refreshView.set(!this.refreshView())},error:i=>{console.error("Error authenticating Filen",i),this.#o.open(Z,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${i.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let i=this.destinationForm().advanced["api-key"];if(i&&i.length>0){this.#o.open(Z,{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.#s(a.toString())}}});return}this.#s(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let c;c=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let p;p=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let $;$=$localize`This field is mandatory`;let L;L=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let V;V=$localize`This field is mandatory`;let B;B=$localize`Loading available backups...`;let R;R=$localize`No backups found from this machine, contact support`;let W;W=$localize`This field is mandatory`;let ue;ue=$localize`Pick the backup to restore from`;let pe;pe=$localize`This field is mandatory`;let w;w=$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=ve(he);let Fe;Fe=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ze;Ze=$localize`Connect to the console to use Duplicati storage.`;let et;et=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let tt;tt=$localize`This field is mandatory`;let b;return b=$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,B,R,ue,w,he,Fe,Ze,et,b,[1,"advanced-options",3,"disallowToggle"],["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",u,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",p],["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",y],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",v],["shTooltip",$],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",L],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",V],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",W],["shTooltip",pe],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],[1,"filen-2fa-setup"],["shTooltip",tt],["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&&(ce(0)(1),m(2,Ho,18,5)),e&2){let o=Y(i.destinationType());_();let a=Y(i.destinationFormConfig());_(),g(o&&a?2:-1)}},dependencies:[He,re,gt,se,Te,ge,an,ln,Lt,Rt,Nn,bt,Se,ie,Q,At,Ft,we,It,je,Nt,Dt],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 kt=class n{#e=M(Pt);#t=M(Le);#n=M(Ee);testDestination(t,e,i,o,a,c,u){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a,c,u):this.testDestinationv1(t,e,i,o,a,c,u)}testDestinationv2(t,e,i,o,a,c,u){return new st(p=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:u==="create",Options:null,DestinationType:a,SourcePrefix:e=="new"?null:i}}).subscribe({next:T=>{if(T.Success){this.emitSuccessV2(p,t,o,T);return}this.handleGenericError(p,t,o,T.Error??"Unknown error",c)},error:T=>{let y=T?.error?.body??T?.error?.requestBody;if(y?.Data?.FolderExists===!1||y?.StatusCode==="missing-folder"){this.handleMissingFolder(p,t,e,o,c,u);return}if(y?.Data?.HostCertificate){this.handleMissingCertificate(p,t,o,y.Data?.HostCertificate,c);return}if(y?.Data?.ReportedHostKey){this.handleIncorrectKey(p,t,o,y.Data.ReportedHostKey,y.Data.AcceptedHostKey??null,c);return}this.handleGenericError(p,t,o,T?.message??"Unknown error",c)}})})}testDestinationv1(t,e,i,o,a,c,u){return new st(p=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,sourcePrefix:e=="new"?null:i},type:a}).subscribe({next:T=>{p.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:o}),p.complete()},error:T=>{this.handleDestinationErrorv1(T.message,t,e,o,c,u).subscribe(y=>{p.next(y)})}})})}handleMissingFolder(t,e,i,o,a,c){function u(){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"){u();return}this.#t.open(Z,{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:p=>{if(!p){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(Z,{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(Z,{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}`,u=e.includes("?");function p(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${u?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:c,destinationIndex:i}),t.complete()}if(a){p();return}this.#t.open(Z,{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}p()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let y=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:T,testAgain:!0,reportedHostKey:o,errorMessage:p,destinationIndex:i}),t.complete()};var u=y;let p=$localize`The host key has changed, please check with the server administrator if this is correct,
@@ -1 +1 @@
1
- import{a as v}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as C}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as G}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as h}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{L as M,M as $,R as I}from"./chunk-UNMDSCAN.js";import{c as L}from"./chunk-CFNARBNK.js";import{b as N,c as O,e as B,f as b}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
1
+ import{a as v}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as C}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as G}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as h}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{L as M,M as $,R as I}from"./chunk-UNMDSCAN.js";import{c as L}from"./chunk-CFNARBNK.js";import{b as N,c as O,e as B,f as b}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{e as a,f as b}from"./chunk-4I55TVYE.js";import"./chunk-TXFTUL4R.js";import"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
1
+ import{e as a,f as b}from"./chunk-GJKZESBX.js";import"./chunk-MLNK7NFW.js";import"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1,2 +1,2 @@
1
- import{c as ge,d as fe,e as xe}from"./chunk-K34VOGDF.js";import{g as ue}from"./chunk-IMHM7ISI.js";import{a as Ce}from"./chunk-HUZXJWCG.js";import{B as le,H as _e,K as pe,P as se,V as ce,W as me,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,u as re}from"./chunk-UNMDSCAN.js";import{_ as Z}from"./chunk-7AVOHYTE.js";import{$ as d,Ab as p,Bb as N,Fb as R,Gb as M,Gc as v,Hb as f,Ib as x,Mc as H,Pa as l,Pb as k,Qb as G,Rb as Q,Rc as J,Uc as Y,Vb as u,W as j,Xb as r,aa as C,cb as q,ec as g,gc as B,hb as S,jc as m,kc as z,la as b,lc as U,rc as K,sb as F,sc as E,tb as h,tc as O,ub as $,wb as A,xb as D,xc as W,yb as s,yc as T,zb as _}from"./chunk-26Z7TPJB.js";import{a as L,b as P}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),w=t=>({formView:t}),y=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),u("click",function(){d(e);let n=r();return C(n.showTextArea.set(!1))}),k(1,6),N(2,"sh-icon"),G(),p()}}function we(t,i){if(t&1){let e=x();_(0,"button",18,1),u("click",function(){let n=d(e).$implicit,a=r(3);return C(a.addSetting(n))}),_(2,"div",19)(3,"p"),m(4),p(),m(5),p()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(4),z(e.shortDescription),l(),U(" ",e.name," ")}}function ye(t,i){if(t&1&&(_(0,"h3",10),m(1),p(),A(2,we,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),m(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),u("click",function(){d(e);let n=r(2);return C(n.addFreeTextSetting())}),k(6,8),N(7,"sh-icon"),G(),p(),_(8,"button",21),u("click",function(){d(e);let n=r(2);return C(n.showTextArea.set(!0))}),_(9,"sh-icon"),m(10,"link"),p(),m(11," Edit contents as text "),p(),M(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),N(3,"sh-icon"),G(),p(),R(4,16),A(5,ye,4,1,null,null,$),M(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),u("ngModelChange",function(n){d(e);let a=r();return C(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function Ne(t,i){t&1&&(_(0,"div",23),m(1,"Add a setting above to get started."),p())}function Me(t,i){t&1&&(_(0,"sh-icon",31),m(1," warning-octagon "),p())}function Ee(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function ve(t,i){if(t&1&&(_(0,"sh-icon",33),m(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function Pe(t,i){if(t&1&&(F(0,Me,2,0,"sh-icon",31),_(1,"span"),m(2),p(),F(3,Ee,2,1,"sh-icon",32)(4,ve,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function be(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,be,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),m(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),m(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),N(1,"label",37),_(2,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),m(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),m(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),m(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),m(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),m(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(11,y,T(9,w,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function ct(t,i){t&1&&f(0)}function mt(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function Ct(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,ct,1,0,"ng-container",34)(3,mt,1,0,"ng-container",39),p(),_(4,"input",49),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(10,y,T(8,w,o.FormView))),l(),s("ngModel",o.Value())}}function ut(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,ut,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,Pe,5,5,"ng-template",null,2,v),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,Ct,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),u("click",function(){let n=d(e).$implicit,a=r(2);return C(a.removeSetting(n))}),_(17,"sh-icon"),m(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);E("destination-"+e.Name+o),l(),E(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,Ne,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),m(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=E(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(E(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function wt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(Ce);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=b(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let I=c?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(c=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),P(L({},n),{Value:b(c),FormView:a})}else if(this.hasFreeTextSettings())return P(L({},n),{Value:b(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>P(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
1
+ import{c as ge,d as fe,e as xe}from"./chunk-K34VOGDF.js";import{g as ue}from"./chunk-AT64P6E5.js";import{a as Ce}from"./chunk-HUZXJWCG.js";import{B as le,H as _e,K as pe,P as se,V as ce,W as me,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,u as re}from"./chunk-UNMDSCAN.js";import{_ as Z}from"./chunk-7AVOHYTE.js";import{$ as d,Ab as p,Bb as N,Fb as R,Gb as M,Gc as v,Hb as f,Ib as x,Mc as H,Pa as l,Pb as k,Qb as G,Rb as Q,Rc as J,Uc as Y,Vb as u,W as j,Xb as r,aa as C,cb as q,ec as g,gc as B,hb as S,jc as m,kc as z,la as b,lc as U,rc as K,sb as F,sc as E,tb as h,tc as O,ub as $,wb as A,xb as D,xc as W,yb as s,yc as T,zb as _}from"./chunk-26Z7TPJB.js";import{a as L,b as P}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),w=t=>({formView:t}),y=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),u("click",function(){d(e);let n=r();return C(n.showTextArea.set(!1))}),k(1,6),N(2,"sh-icon"),G(),p()}}function we(t,i){if(t&1){let e=x();_(0,"button",18,1),u("click",function(){let n=d(e).$implicit,a=r(3);return C(a.addSetting(n))}),_(2,"div",19)(3,"p"),m(4),p(),m(5),p()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(4),z(e.shortDescription),l(),U(" ",e.name," ")}}function ye(t,i){if(t&1&&(_(0,"h3",10),m(1),p(),A(2,we,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),m(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),u("click",function(){d(e);let n=r(2);return C(n.addFreeTextSetting())}),k(6,8),N(7,"sh-icon"),G(),p(),_(8,"button",21),u("click",function(){d(e);let n=r(2);return C(n.showTextArea.set(!0))}),_(9,"sh-icon"),m(10,"link"),p(),m(11," Edit contents as text "),p(),M(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),N(3,"sh-icon"),G(),p(),R(4,16),A(5,ye,4,1,null,null,$),M(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),u("ngModelChange",function(n){d(e);let a=r();return C(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function Ne(t,i){t&1&&(_(0,"div",23),m(1,"Add a setting above to get started."),p())}function Me(t,i){t&1&&(_(0,"sh-icon",31),m(1," warning-octagon "),p())}function Ee(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function ve(t,i){if(t&1&&(_(0,"sh-icon",33),m(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function Pe(t,i){if(t&1&&(F(0,Me,2,0,"sh-icon",31),_(1,"span"),m(2),p(),F(3,Ee,2,1,"sh-icon",32)(4,ve,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function be(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,be,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),m(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),m(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),N(1,"label",37),_(2,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),m(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),m(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),m(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),m(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),m(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(11,y,T(9,w,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function ct(t,i){t&1&&f(0)}function mt(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function Ct(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,ct,1,0,"ng-container",34)(3,mt,1,0,"ng-container",39),p(),_(4,"input",49),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(10,y,T(8,w,o.FormView))),l(),s("ngModel",o.Value())}}function ut(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,ut,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,Pe,5,5,"ng-template",null,2,v),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,Ct,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),u("click",function(){let n=d(e).$implicit,a=r(2);return C(a.removeSetting(n))}),_(17,"sh-icon"),m(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);E("destination-"+e.Name+o),l(),E(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,Ne,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),m(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=E(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(E(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function wt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(Ce);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=b(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let I=c?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(c=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),P(L({},n),{Value:b(c),FormView:a})}else if(this.hasFreeTextSettings())return P(L({},n),{Value:b(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>P(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
2
  `));updateSettingsFromText(i){if(typeof i!="string")return;let e=ue(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",V=i.FormView.options.find(I=>(I??"").trim().toLocaleLowerCase()===c);if(V)return n[a].Value=V,n}return n[a].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=q({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:3,consts:()=>{let i;i=$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 o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;return a=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disallowToggle"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",a,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(_(0,"sh-toggle-card",9),R(1,10)(2),Q(3,5),M(),_(4,"div",11),F(5,he,3,0,"button",12)(6,Le,8,2),p(),M(),F(7,Ie,1,3,"textarea",13)(8,Tt,3,1),p(),S(9,wt,1,1,"ng-template",null,0,v)),e&2&&(s("disallowToggle",!0),l(5),h(o.showTextArea()?5:6),l(2),h(o.showTextArea()?7:8))},dependencies:[ae,te,oe,ee,ne,ie,fe,ge,xe,Z,ce,_e,le,pe,de,re,se,me],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{Se as a};
@@ -1 +1 @@
1
- import{a,b,c}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
1
+ import{a,b,c}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1,3 +1,3 @@
1
- import{a as Ee}from"./chunk-TXFTUL4R.js";import{a as Ne}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{h as Te,p as A}from"./chunk-TN6HBIUN.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import{b as he}from"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as D}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as ue,G as de,H as _e,L as pe,P as Ce,Y as ge,c as Z,e as ee,f as te,j as ne,n as oe,o as ie,p as ae,q as se,r as re,s as le,t as ce,u as me}from"./chunk-UNMDSCAN.js";import{b as Fe,c as Se}from"./chunk-CFNARBNK.js";import{b as W,d as Q,e as Y}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as E,Ab as o,Bb as a,Fb as I,Gb as M,Ib as v,Pa as u,Pb as p,Qb as C,R as b,Rb as O,Sb as x,Tb as w,Vb as K,W as _,Xb as N,aa as f,cb as R,gc as J,la as L,na as $,oc as X,pc as q,qc as V,sb as k,tb as G,ub as B,vc as H,wb as y,wc as z,xb as U,xc as j,yb as F,zb as l}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var T=class s{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ie=()=>["backup"];function Me(s,t){s&1&&a(0,"sh-progress-bar",11)}function Oe(s,t){if(s&1&&(l(0,"sh-form-field"),a(1,"input",35),o()),s&2){let e=t.$implicit,n=t.$index;u(),F("id",H("filter-",n))("formControl",e)}}function De(s,t){if(s&1){let e=v();l(0,"form",12)(1,"sh-select",13)(2,"label",14),p(3,1),a(4,"sh-icon",15),C(),o(),a(5,"input",16),o(),l(6,"sh-form-field")(7,"label",17),p(8,2),a(9,"sh-icon",18),C(),o(),a(10,"textarea",19),o(),l(11,"sh-form-field")(12,"label",20),p(13,3),a(14,"sh-icon",21),C(),o(),a(15,"textarea",22),o()(),l(16,"sh-divider"),O(17,4),o(),l(18,"form",12)(19,"sh-form-field")(20,"label",23),p(21,5),a(22,"sh-icon",24),C(),o(),a(23,"input",25),o(),l(24,"sh-form-field")(25,"label",26),p(26,6),a(27,"sh-icon",27),C(),o(),a(28,"input",28),o(),l(29,"app-toggle-card",29),I(30,30),O(31,7),M(),I(32,31),y(33,Oe,2,3,"sh-form-field",null,B),M(),o()(),l(35,"app-options-list",32),V("optionsChange",function(r){E(e);let m=N();return q(m.settings,r)||(m.settings=r),f(r)}),o(),l(36,"div",33)(37,"button",34),K("click",function(){E(e);let r=N();return f(r.submit())}),p(38,8),a(39,"sh-icon"),C(),o()()}if(s&2){let e=N();F("formGroup",e.baseCmdForm),u(),F("options",e.commandOptions()??j(10,Ie))("inlineSearch",!0),u(17),F("formGroup",e.standardFields),u(11),F("disallowToggle",!0),u(4),U(e.standardFields.controls.filters.controls),u(2),X("options",e.settings),F("hasFreeTextSettings",!0),u(2),J("loader",e.isSubmitting()),u(2),x(e.baseCmdForm.value.command),w(38)}}var c=new re,P=class s{#e=_(A);#n=_(Se);#o=_(Q);#t=_(W);#a=_(Fe);#s=_(he);#i=_(T);#r=D(this.#t.params);commandOptions=D(this.#a.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=c.group({"backup-id":c.control(""),"backup-name":c.control(""),dbpath:c.control(""),filters:c.array([])});baseCmdForm=c.group({command:c.control("backup"),targetUrl:c.control(""),arguments:c.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#c=$(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(c.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#s.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",r=(e.arguments??"").split(`
1
+ import{a as Ee}from"./chunk-MLNK7NFW.js";import{a as Ne}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{h as Te,p as A}from"./chunk-LXSHDO5C.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-6LAXPU22.js";import{b as he}from"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as D}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as ue,G as de,H as _e,L as pe,P as Ce,Y as ge,c as Z,e as ee,f as te,j as ne,n as oe,o as ie,p as ae,q as se,r as re,s as le,t as ce,u as me}from"./chunk-UNMDSCAN.js";import{b as Fe,c as Se}from"./chunk-CFNARBNK.js";import{b as W,d as Q,e as Y}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as E,Ab as o,Bb as a,Fb as I,Gb as M,Ib as v,Pa as u,Pb as p,Qb as C,R as b,Rb as O,Sb as x,Tb as w,Vb as K,W as _,Xb as N,aa as f,cb as R,gc as J,la as L,na as $,oc as X,pc as q,qc as V,sb as k,tb as G,ub as B,vc as H,wb as y,wc as z,xb as U,xc as j,yb as F,zb as l}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var T=class s{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ie=()=>["backup"];function Me(s,t){s&1&&a(0,"sh-progress-bar",11)}function Oe(s,t){if(s&1&&(l(0,"sh-form-field"),a(1,"input",35),o()),s&2){let e=t.$implicit,n=t.$index;u(),F("id",H("filter-",n))("formControl",e)}}function De(s,t){if(s&1){let e=v();l(0,"form",12)(1,"sh-select",13)(2,"label",14),p(3,1),a(4,"sh-icon",15),C(),o(),a(5,"input",16),o(),l(6,"sh-form-field")(7,"label",17),p(8,2),a(9,"sh-icon",18),C(),o(),a(10,"textarea",19),o(),l(11,"sh-form-field")(12,"label",20),p(13,3),a(14,"sh-icon",21),C(),o(),a(15,"textarea",22),o()(),l(16,"sh-divider"),O(17,4),o(),l(18,"form",12)(19,"sh-form-field")(20,"label",23),p(21,5),a(22,"sh-icon",24),C(),o(),a(23,"input",25),o(),l(24,"sh-form-field")(25,"label",26),p(26,6),a(27,"sh-icon",27),C(),o(),a(28,"input",28),o(),l(29,"app-toggle-card",29),I(30,30),O(31,7),M(),I(32,31),y(33,Oe,2,3,"sh-form-field",null,B),M(),o()(),l(35,"app-options-list",32),V("optionsChange",function(r){E(e);let m=N();return q(m.settings,r)||(m.settings=r),f(r)}),o(),l(36,"div",33)(37,"button",34),K("click",function(){E(e);let r=N();return f(r.submit())}),p(38,8),a(39,"sh-icon"),C(),o()()}if(s&2){let e=N();F("formGroup",e.baseCmdForm),u(),F("options",e.commandOptions()??j(10,Ie))("inlineSearch",!0),u(17),F("formGroup",e.standardFields),u(11),F("disallowToggle",!0),u(4),U(e.standardFields.controls.filters.controls),u(2),X("options",e.settings),F("hasFreeTextSettings",!0),u(2),J("loader",e.isSubmitting()),u(2),x(e.baseCmdForm.value.command),w(38)}}var c=new re,P=class s{#e=_(A);#n=_(Se);#o=_(Q);#t=_(W);#a=_(Fe);#s=_(he);#i=_(T);#r=D(this.#t.params);commandOptions=D(this.#a.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=c.group({"backup-id":c.control(""),"backup-name":c.control(""),dbpath:c.control(""),filters:c.array([])});baseCmdForm=c.group({command:c.control("backup"),targetUrl:c.control(""),arguments:c.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#c=$(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(c.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#s.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",r=(e.arguments??"").split(`
2
2
  `)??[],m=[n,...r].filter(i=>i.length>0),g=this.standardFields.value,S=g.filters??[],h=[e.command,...m,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...S.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:h}).subscribe({next:i=>{i.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",i.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],r=this.settings(),m=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:r});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:m},replaceUrl:!0}),m}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(r=>{this.standardFields.controls.filters.push(c.control(r))})),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([A])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Command ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let r;r=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let S;S=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let h;h=$localize`Filters`;let i;return i=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,r,m,g,S,h,i,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,n){e&1&&(a(0,"app-status-bar"),l(1,"section")(2,"div",9)(3,"button",10),p(4,0),a(5,"sh-icon"),C(),o()(),k(6,Me,1,0,"sh-progress-bar",11)(7,De,40,11),o()),e&2&&(u(6),G(n.finishedLoading()?7:6))},dependencies:[le,ne,Z,ee,te,Ne,Ee,Te,ce,oe,se,ae,ie,Y,_e,ue,de,Ce,pe,me,ge],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-TXFTUL4R.js";import"./chunk-K34VOGDF.js";import"./chunk-IMHM7ISI.js";import"./chunk-HSHF5HR7.js";import"./chunk-HUZXJWCG.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
1
+ import{a}from"./chunk-MLNK7NFW.js";import"./chunk-K34VOGDF.js";import"./chunk-AT64P6E5.js";import"./chunk-HSHF5HR7.js";import"./chunk-HUZXJWCG.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
package/index.html CHANGED
@@ -124,5 +124,5 @@
124
124
  <body>
125
125
  <app-root></app-root>
126
126
  <div class="loading">Connecting ...</div>
127
- <link rel="modulepreload" href="chunk-AODNZLCK.js"><link rel="modulepreload" href="chunk-GRVTXORM.js"><link rel="modulepreload" href="chunk-MDXSNEQZ.js"><link rel="modulepreload" href="chunk-BFTGDQ4K.js"><link rel="modulepreload" href="chunk-QHBOEY2O.js"><link rel="modulepreload" href="chunk-NK5WD6WE.js"><link rel="modulepreload" href="chunk-B62TPRVG.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-SZUNW4JO.js"><link rel="modulepreload" href="chunk-HSHF5HR7.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-T6UJTPG4.js" type="module"></script></body>
127
+ <link rel="modulepreload" href="chunk-AODNZLCK.js"><link rel="modulepreload" href="chunk-GRVTXORM.js"><link rel="modulepreload" href="chunk-MDXSNEQZ.js"><link rel="modulepreload" href="chunk-BFTGDQ4K.js"><link rel="modulepreload" href="chunk-QHBOEY2O.js"><link rel="modulepreload" href="chunk-NK5WD6WE.js"><link rel="modulepreload" href="chunk-B62TPRVG.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-SZUNW4JO.js"><link rel="modulepreload" href="chunk-HSHF5HR7.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-HMCIC27B.js" type="module"></script></body>
128
128
  </html>