@duplicati/ngclient 0.0.35 → 0.0.36

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 (38) hide show
  1. package/{chunk-DE2AAZUP.js → chunk-3WCWZJYH.js} +1 -1
  2. package/{chunk-X25RPH22.js → chunk-4VPUEZIU.js} +1 -1
  3. package/{chunk-L6DT3BQG.js → chunk-4XJFGB4E.js} +1 -1
  4. package/{chunk-XM4XOJPS.js → chunk-6SKCAZOP.js} +1 -1
  5. package/{chunk-QGSX2XOM.js → chunk-73OFEMRU.js} +1 -1
  6. package/{chunk-LVYTERRJ.js → chunk-7KKPI5E4.js} +1 -1
  7. package/{chunk-UPHEPMGX.js → chunk-A27JK2VW.js} +1 -1
  8. package/chunk-AUUCT7OA.js +1 -0
  9. package/{chunk-UAKB5CAQ.js → chunk-BIE2BC6X.js} +1 -1
  10. package/{chunk-2X2NVYPD.js → chunk-DAXEWTI7.js} +1 -1
  11. package/chunk-DFKPVTYK.js +1 -0
  12. package/{chunk-VOINBIWD.js → chunk-DFT2UYO6.js} +1 -1
  13. package/{chunk-NWRHNRPB.js → chunk-EV37MCYP.js} +1 -1
  14. package/{chunk-BT2JRS3A.js → chunk-GL2OCAVZ.js} +1 -1
  15. package/{chunk-GTXQM7B6.js → chunk-HGQLQ733.js} +1 -1
  16. package/{chunk-RU7EY7FN.js → chunk-IO5IBATB.js} +1 -1
  17. package/chunk-JAY2DGID.js +1 -0
  18. package/chunk-KMNTAMUY.js +1 -0
  19. package/{chunk-EWJCAT5A.js → chunk-LSBOVSYF.js} +1 -1
  20. package/{chunk-ZRCOVLAQ.js → chunk-M4CEGBQO.js} +1 -1
  21. package/{chunk-HLOYWLHV.js → chunk-M76F7EZP.js} +1 -1
  22. package/{chunk-LQUKRKUH.js → chunk-OZQD3PLH.js} +1 -1
  23. package/{chunk-B3MIBKC5.js → chunk-RDUEFPJ3.js} +1 -1
  24. package/{chunk-YCOOYSZG.js → chunk-SAKG3775.js} +1 -1
  25. package/{chunk-SZ4NLIO2.js → chunk-TW4633HQ.js} +1 -1
  26. package/chunk-WKYWPXQ6.js +1 -0
  27. package/{chunk-BJAZPKHX.js → chunk-XYNM2UME.js} +1 -1
  28. package/{chunk-IOH6RL5H.js → chunk-YXIGPDXN.js} +1 -1
  29. package/{chunk-QLPXITCK.js → chunk-Z4XFPOPE.js} +1 -1
  30. package/index.html +2 -2
  31. package/main-QY7RIEAP.js +1 -0
  32. package/package.json +1 -1
  33. package/{styles-CLP6NP2M.css → styles-DO5TEHSB.css} +1 -1
  34. package/chunk-E4CUHBCT.js +0 -1
  35. package/chunk-EHV3OZDB.js +0 -1
  36. package/chunk-NKPGP6QP.js +0 -1
  37. package/chunk-W76PK3CU.js +0 -1
  38. package/main-WGR4ZD6A.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Xe,b as ve}from"./chunk-DE2AAZUP.js";import{a as At,b as Ht}from"./chunk-DNHLTHLR.js";import{a as pt}from"./chunk-V7APGUBT.js";import{b as W}from"./chunk-KFGIVU27.js";import{a as Ie,b as ne,c as ye,d as ie,e as fe,f as ct,g as Ut,h as Se,i as $e,k as _t,l as Te,m as Me,n as Bt,o as Ee,p as oe,q as re,r as ee,s as mt,t as De}from"./chunk-7SJHYZC5.js";import{a as Be}from"./chunk-PIDBEXSZ.js";import{a as ae,b as ut,d as Kt,e as Xt,g as we,i as dt,k as le,m as Ft,n as zt,p as gt,q as se,v as Re,w as Ke}from"./chunk-EHV3OZDB.js";import{H as Ce,X as te}from"./chunk-J3H4BCHI.js";import{c as Lt}from"./chunk-5XX7BU4I.js";import{ia as st}from"./chunk-5ZK3D2RS.js";import{$b as X,Ab as g,Bb as w,Cb as R,Db as v,E as Ye,Eb as a,Fb as r,Gb as m,Hb as I,Ib as $,Jb as be,Kb as P,Kc as H,Mc as lt,Qb as E,R as xe,Ra as l,Rb as D,Sb as A,Tb as Je,Ub as et,Vb as Oe,Wb as C,X as y,Xb as p,Za as x,_a as ue,_b as U,ac as V,ea as S,fa as T,fb as J,fc as de,gc as Fe,hc as ge,ic as c,ja as Mt,jc as L,kc as b,lb as F,lc as wt,mc as Rt,nc as vt,oc as Gt,p as Qe,qa as Ze,ra as rt,rc as bt,sc as Ve,tc as Vt,uc as tt,vb as _,xb as he,yc as at}from"./chunk-MR4RE3IB.js";import{a as Z,c as $t}from"./chunk-C6Q5SG76.js";function nn(n,i){if(n&1&&(a(0,"p"),c(1),r()),n&2){let e=p();l(),L(e._data().message)}}var on={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},Le=class n{data=rt();_data=H(()=>Z(Z({},on),this.data()));closed=Ze();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),c(2),r()(),a(3,"div",1),F(4,nn,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),c(7),r(),a(8,"button",4),C("click",function(){return t.close("confirm")}),c(9),r()()),e&2&&(l(2),L(t._data().title),l(2),g(t._data().message?4:-1),l(3),L(t._data().cancelText),l(2),L(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var Ct=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ue=class n{#e=y(Be);s3Providers=W(this.getS3Config("Providers"));s3Regions=W(this.getS3Config("Regions"));s3RegionHosts=W(this.getS3Config("RegionHosts"));s3StorageClasses=W(this.getS3Config("StorageClasses"));storjSatellites=W(this.getStorjConfig("Satellites"));storjAuthenticationMethods=W(this.getStorjConfig("AuthenticationMethods"));openstackProviders=W(this.getOpenstackConfig("Providers"));openstackVersions=W(this.getOpenstackConfig("Versions"));gcsLocations=W(this.getGcsConfig("Locations"));gcsStorageClasses=W(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(Qe(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(Qe(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(Qe(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(Qe(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ge=new ee,nt={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>Ge.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>Ge.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>Ge.control(n??"",[ye.required,ye.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["authid"]}};function He(n,i){let e={},t={};return i.searchParams.forEach((o,s)=>{nt[n].dynamicFields?.includes(s)?t[s]=decodeURIComponent(o):e[s]=decodeURIComponent(o)}),{advanced:e,dynamic:t}}function it(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var We={file:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,o=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return Z({destinationType:n,custom:{path:`${t?"/":""}${o}${i.pathname}`}},He(n,i))}},ssh:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},He(n,i))},s3:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},He(n,i))},gcs:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>Z({destinationType:n},He(n,i))}};function ft(n){let i=n.destinationType;return!i||!We.hasOwnProperty(i)?We.fallbackMapper.to(n)??"":We[i].to(n)??""}function ht(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],o=new URL(t);if(!We.hasOwnProperty(e))return We.fallbackMapper.from(e,o);if(!i)throw new Error("Invalid target path");return We[e].from(e,o,n)}var Wt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,St=class n{generate(i,e=Wt){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=Wt){let t=this;return Array.apply(null,{length:i}).map(()=>{let o;for(;;)if(o=String.fromCharCode(t.#e()),e.test(o))return o},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var rn=["formRef"];function an(n,i){if(n&1&&(a(0,"option",27),c(1),r()),n&2){let e=i.$implicit;_("value",e.Key),l(),L(e.DisplayName)}}function ln(n,i){if(n&1&&m(0,"spk-progress-bar",38),n&2){let e=p(3);he("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function sn(n,i){n&1&&(a(0,"span",33),A(1,9),r())}function pn(n,i){n&1&&(E(0,7,1),m(1,"spk-icon"),D())}function cn(n,i){n&1&&(E(0,7,2),m(1,"spk-icon"),D())}function _n(n,i){n&1&&(E(0,10,1),m(1,"spk-icon",40),D())}function mn(n,i){n&1&&(E(0,10,2),m(1,"spk-icon"),D())}function un(n,i){if(n&1){let e=P();a(0,"button",39),C("click",function(){S(e);let o=p(3);return T(o.copyPassword())}),E(1,10),F(2,_n,2,0)(3,mn,2,0),D(),r()}if(n&2){let e=p(3);l(2),g(e.copiedPassword()?2:3)}}function dn(n,i){n&1&&(a(0,"spk-alert",37),A(1,11),r())}function Fn(n,i){if(n&1){let e=P();a(0,"div",28)(1,"spk-form-field")(2,"label",29),E(3,6),m(4,"sup"),D(),r(),m(5,"input",30),r(),F(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),m(8,"input",32),F(9,sn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),C("click",function(){S(e);let o=p(2);return T(o.showPassword.set(!o.showPassword()))}),E(12,7),F(13,pn,2,0)(14,cn,2,0),D(),r(),a(15,"button",35),C("click",function(){S(e);let o=p(2);return T(o.generatePassword())}),E(16,8),m(17,"spk-icon"),D(),r(),F(18,un,4,1,"button",36),r(),F(19,dn,2,0,"spk-alert",37),r()}if(n&2){let e=p(2);l(5),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.password?6:-1),l(2),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),g(e.showPassword()?13:14),l(5),g(e.showCopyPassword()?18:-1),l(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function gn(n,i){if(n&1&&(a(0,"spk-select",24)(1,"label",25),A(2,5),r(),m(3,"input",26),R(4,an,2,2,"option",27,w),r(),F(6,Fn,20,7,"div",28)),n&2){let e=p();_("displayFn",e.displayFn()),l(4),v(e.encryptionOptions()),l(2),g(e.encryptionFieldSignal()!==""?6:-1)}}function Cn(n,i){if(n&1&&(a(0,"button",22),E(1,12),m(2,"spk-icon"),D(),r()),n&2){let e=p();_("disabled",e.generalForm.invalid)}}function fn(n,i){if(n&1&&(a(0,"spk-tooltip",23)(1,"button",22),E(2,13),m(3,"spk-icon"),D(),r()()),n&2){let e=p();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var je=new ee,jt=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>je.group({name:je.control(n.name,[ye.required]),description:je.control(n.description),encryption:je.control(n.encryption,[Ht()]),password:je.control(n.password,[At(i=>i?.value.encryption!=="",[ye.required])]),repeatPassword:je.control(n.repeatPassword,[At(i=>i?.value.encryption!=="",[ye.required])])}),yt={Key:"",DisplayName:"None"},Ot=class n{#e=y(te);#n=y(Ce);#i=y(St);#o=y(pe);#t=y(pt);formRef=ue.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=x(!1);copiedPassword=x(!1);showCopyPassword=x(!1);encryptionEffect=lt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=H(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...i].find(o=>o.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&de(t.formRef,rn,5),e&2&&Fe()},decls:20,vars:3,consts:()=>{let i;i=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let s;s=$localize`Backup description`;let d;d=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`Encryption`;let M;M=$localize`Encryption`;let h;h=$localize`Password`;let Q;Q=$localize`Repeat password`;let Y;Y=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let B;B=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,B=Oe(B);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let N;N=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=Oe(N);let u;u=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let f;f=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,o,s,d,M,Y,B,K,j,N,u,f,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",i,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",Q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",14,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",15),A(3,1),r(),a(4,"spk-form-field")(5,"label",16),E(6,2),m(7,"sup"),D(),r(),m(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),A(11,3),r(),m(12,"textarea",19),r(),F(13,gn,7,2),a(14,"div",20)(15,"button",21),C("click",function(){return S(o),T(t.exit())}),E(16,4),m(17,"spk-icon"),D(),r(),F(18,Cn,3,1,"button",22)(19,fn,4,2,"spk-tooltip",23),r()()}e&2&&(_("formGroup",t.generalForm),l(13),g(t.isNew()?13:-1),l(5),g(t.encryptionFieldSignal()===""?18:19))},dependencies:[De,Se,oe,re,ne,ie,fe,Te,Ee,le,se,we,ae,zt,ut,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Sn=["formRef"],Tn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),En=n=>({$implicit:n});function Dn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Nn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.name)}}function An(n,i){if(n&1){let e=P();E(0,7,1),a(1,"button",30,2),C("click",function(){let o=S(e).$implicit,s=p();return T(s.addNewOption(o))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function hn(n,i){n&1&&be(0)}function On(n,i){if(n&1&&F(0,hn,1,0,"ng-container",31),n&2){let e=i.$implicit,t=i.$index;p();let o=ge(36);_("ngTemplateOutlet",o)("ngTemplateOutletContext",Ve(5,En,Vt(2,Tn,t,e)))}}function yn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Pn(n,i){if(n&1&&(a(0,"app-file-tree",34)(1,"label",40),c(2),F(3,yn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function xn(n,i){if(n&1&&(a(0,"app-file-tree",35)(1,"label",40),c(2),F(3,kn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function In(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function $n(n,i){n&1&&(a(0,"spk-icon",43),c(1,"link"),r())}function Mn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"textbox"),r())}function wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,In,3,1,"spk-tooltip",41),r(),m(4,"input",42),F(5,$n,2,0,"spk-icon",43)(6,Mn,2,0,"spk-icon",43),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function Rn(n,i){if(n&1){let e=P();a(0,"span",47),C("click",function(){S(e);let o=p(2).$implicit,s=p();return T(s.oauthStartTokenCreation(o.formViewType))}),c(1,"AuthID"),r()}}function vn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"password"),r())}function Gn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function bn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Vn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),r(),m(3,"input",44),F(4,Rn,2,0,"span",45)(5,vn,2,0,"spk-icon",43)(6,Gn,2,0,"spk-icon",46)(7,bn,2,0,"spk-icon",46),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function Ln(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Un(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Bn(n,i){if(n&1&&(a(0,"spk-select")(1,"label",40),c(2),F(3,Ln,3,1,"spk-tooltip",41),r(),m(4,"input",49),I(5,17),R(6,Un,2,2,"option",18,w),$(),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function Kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function zn(n,i){if(n&1&&(a(0,"div",36)(1,"label",40),c(2),F(3,Kn,3,1,"spk-tooltip",41),r(),a(4,"div",50)(5,"spk-form-field"),m(6,"input",51),a(7,"spk-icon",43),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",52),I(12,17),R(13,Xn,2,2,"option",18,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p();_("formGroupName",t.formView.name),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),X("id","destination-",t.formGroupName,"-",t.index,""),l(7),v(o.sizeOptions())}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,Hn,3,1,"spk-tooltip",41),r(),m(4,"input",53),a(5,"spk-icon",43),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function jn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function qn(n,i){if(n&1&&(a(0,"spk-toggle",37)(1,"label",40),c(2),F(3,jn,3,1,"spk-tooltip",41),r(),m(4,"input",54),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function Qn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Yn(n,i){n&1&&(a(0,"spk-option",56),c(1,"None"),r()),n&2&&_("value","None")}function Zn(n,i){if(n&1&&(a(0,"spk-option",18),c(1),m(2,"spk-checkbox",57),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Jn(n,i){if(n&1&&F(0,Yn,2,1,"spk-option",56)(1,Zn,3,2,"spk-option",18),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function ei(n,i){if(n&1&&(a(0,"spk-select",38)(1,"label",40),c(2),F(3,Qn,3,1,"spk-tooltip",41),r(),m(4,"input",55),I(5,17),R(6,Jn,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function ti(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function ni(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,ti,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function ii(n,i){if(n&1){let e=P();a(0,"div",32),I(1,33),F(2,Pn,5,14,"app-file-tree",34)(3,xn,5,10,"app-file-tree",35)(4,wn,7,10,"spk-form-field")(5,Vn,8,11,"spk-form-field")(6,Bn,8,9,"spk-select")(7,zn,15,9,"div",36)(8,Wn,7,9,"spk-form-field")(9,qn,5,9,"spk-toggle",37)(10,ei,8,7,"spk-select",38)(11,ni,5,9,"spk-form-field"),$(),a(12,"button",39),C("click",function(){let o=S(e).$implicit,s=p();return T(s.removeFormView(o.formView,0))}),a(13,"spk-icon"),c(14,"x-circle"),r()()()}if(n&2){let e=i.$implicit;l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Pe=new ee,oi=["Bytes","KB","MB","GB","TB","PB"],ri=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],qt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Pe.group({remoteVolumeSize:Pe.group({size:Pe.control(n.remoteVolumeSize),unit:Pe.control(n.size)}),backupRetention:Pe.control(n.backupRetention),advancedOptions:Pe.group({})}),gr=(n,i)=>Pe.group({name:Pe.control(n),value:Pe.control(i)}),Pt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=x(oi);rentationOptions=x(ri);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(o=>o.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(o=>o.name===e);return t?`${t.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&de(t.formRef,Sn,5),e&2&&Fe()},decls:44,vars:5,consts:()=>{let i;i=$localize`Select an option...`;let e;e=$localize`Options`;let t;t=$localize`Remote volume size`;let o;o=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#17\uFFFD"}:START_LINK:Read more${"\uFFFD/#17\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let d;d=$localize` Advanced options ${"\uFFFD#27\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#28\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#30\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*32:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*32:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_MENU:`,d=Oe(d);let k;k=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;return M=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],["fieldTemplate",""],["option",""],e,t,o,s,d,k,M,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",i,"formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",10,0),C("submit",function(){return S(o),T(t.submit())}),a(2,"h3",11),A(3,3),r(),a(4,"div",12)(5,"div",13)(6,"spk-form-field")(7,"label",14),A(8,4),r(),m(9,"input",15),r(),a(10,"spk-select"),m(11,"input",16),I(12,17),R(13,Dn,2,2,"option",18,w),$(),r()(),a(15,"p"),E(16,5),m(17,"a",19),D(),r()(),a(18,"spk-select",20)(19,"label",14),A(20,6),r(),m(21,"input",21),R(22,Nn,2,2,"option",18,w),r(),a(24,"app-toggle-card",22),I(25,23),E(26,7),a(27,"spk-menu")(28,"button",24),m(29,"spk-icon"),r(),I(30,25),R(31,An,3,1,"button",26,w),$(),r(),D(),$(),R(33,On,1,7,"ng-container",null,w),r(),F(35,ii,15,2,"ng-template",null,1,at),a(37,"div",27)(38,"button",28),C("click",function(){return S(o),T(t.goBack())}),E(39,8),m(40,"spk-icon"),D(),r(),a(41,"button",29),E(42,9),m(43,"spk-icon"),D(),r()()()}e&2&&(_("formGroup",t.optionsForm),l(13),v(t.sizeOptions()),l(5),_("displayFn",t.retentionOptionDisplayFn()),l(4),v(t.rentationOptions()),l(2),_("disallowToggle",!0),l(7),v(t.nonSelectedOptions()),l(2),v(t.selectedOptions()),l(8),he("loader",t.isSubmitting()))},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,st,Ft,se,we,ae,le,Re,dt,gt,Ke,Xe,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ai=["formRef"];function li(n,i){if(n&1&&(a(0,"option",39),c(1),r()),n&2){let e=i.$implicit;_("value",e.key),l(),L(e.label)}}function si(n,i){if(n&1){let e=P();a(0,"div",26)(1,"spk-form-field")(2,"label",27),A(3,8),r(),a(4,"input",28,1),C("focus",function(){S(e);let o=ge(5);return T(o.showPicker())}),r(),a(6,"spk-icon",29),c(7,"clock"),r()(),a(8,"spk-form-field"),m(9,"label",30),a(10,"input",31,2),C("focus",function(){S(e);let o=ge(11);return T(o.showPicker())}),r(),a(12,"spk-icon",29),c(13,"calendar"),r()()(),I(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),A(18,9),r(),m(19,"input",35),r(),a(20,"spk-select",36),m(21,"input",37),I(22,38),R(23,li,2,2,"option",39,w),$(),r()(),a(25,"app-toggle-card",40),I(26,41),A(27,10),$(),a(28,"div",42)(29,"spk-toggle",21),E(30,11),m(31,"input",43),D(),r(),a(32,"spk-toggle",21),E(33,12),m(34,"input",44),D(),r(),a(35,"spk-toggle",21),E(36,13),m(37,"input",45),D(),r(),a(38,"spk-toggle",21),E(39,14),m(40,"input",46),D(),r(),a(41,"spk-toggle",21),E(42,15),m(43,"input",47),D(),r(),a(44,"spk-toggle",21),E(45,16),m(46,"input",48),D(),r(),a(47,"spk-toggle",21),E(48,17),m(49,"input",49),D(),r()()(),$()}if(n&2){let e=p();l(20),_("displayFn",e.displayFn),l(3),v(e.unitOptions),l(2),_("disallowToggle",!0)}}var q=new ee,Qt=[{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`}],Yt=(n={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>q.group({autoRun:q.control(n.autoRun),nextTime:q.group({time:q.control(n.nextTime.time),date:q.control(n.nextTime.date)}),runAgain:q.group({repeatValue:q.control(n.runAgain.repeatValue),repeatUnit:q.control(n.runAgain.repeatUnit),allowedDays:q.group({mon:q.control(n.runAgain.allowedDays.mon),tue:q.control(n.runAgain.allowedDays.tue),wed:q.control(n.runAgain.allowedDays.wed),thu:q.control(n.runAgain.allowedDays.thu),fri:q.control(n.runAgain.allowedDays.fri),sat:q.control(n.runAgain.allowedDays.sat),sun:q.control(n.runAgain.allowedDays.sun)})})}),kt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Qt;displayFn(i){let e=Qt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&de(t.formRef,ai,5),e&2&&Fe()},decls:18,vars:2,consts:()=>{let i;i=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let s;s=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let d;d=$localize`Next time`;let k;k=$localize`Run again every`;let M;M=$localize`Allowed days`;let h;h=$localize` Monday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Tuesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Wednesday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Thursday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Sunday ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],i,e,t,o,s,d,k,M,h,Q,Y,B,K,j,N,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",19),A(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),E(6,4),m(7,"input",22),D(),r(),a(8,"p"),A(9,5),r()(),F(10,si,50,2),a(11,"div",23)(12,"button",24),C("click",function(){return S(o),T(t.goBack())}),E(13,6),m(14,"spk-icon"),D(),r(),a(15,"button",25),E(16,7),m(17,"spk-icon"),D(),r()()()}if(e&2){let o;_("formGroup",t.scheduleForm),l(10),g((o=t.scheduleFormSignal())!=null&&o.autoRun?10:-1)}},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,le,se,Re,ae,we,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.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})};function pi(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function ci(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function _i(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r(),R(2,ci,2,2,"option",3,w),r()}if(n&2){let e,t=p(2);_("hideClearButton",!0)("displayFn",t.displayFn),l(),_("ngModel",(e=t.pathState())==null?null:e.expression),l(),v(t.fileGroupOptions())}}function mi(n,i){if(n&1){let e=P();a(0,"spk-form-field")(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r()()}if(n&2){let e,t=p(2);l(),_("ngModel",(e=t.pathState())==null?null:e.expression)}}function ui(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(o){S(e);let s=p();return T(s.updateStateType(o))}),r(),I(2,2),R(3,pi,2,2,"option",3,w),$(),r(),F(5,_i,4,3,"spk-select",0)(6,mi,2,1,"spk-form-field"),a(7,"div",4),C("click",function(){S(e);let o=p();return T(o.removeFilter())}),a(8,"spk-icon",5),c(9,"x-circle"),r()()}if(n&2){let e,t,o=p();_("hideClearButton",!0)("displayFn",o.displayFn),l(),_("ngModel",(e=o.pathState())==null?null:e.type),l(2),v(o.expressionOptions()),l(2),g(((t=o.pathState())==null?null:t.type)==="-FileGroup"||((t=o.pathState())==null?null:t.type)==="+FileGroup"?5:6)}}var Zt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{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:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],di=[{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"}],Tt=class n{path=rt.required();pathChange=Ze();remove=Ze();expressionOptions=x(Zt);fileGroupOptions=x(di);pathState=x(null);pathEffect=lt(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}#e(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let o=i.expression.endsWith("/"),s=i.expression.startsWith("/");return o&&s?`${e}${i.expression}`:o?`${e}${i.expression}/`:s?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=Zt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let i;return i=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",i,3,"ngModelChange","ngModel"],["options",""],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,t){e&1&&F(0,ui,10,4),e&2&&g(t.pathState()?0:-1)},dependencies:[mt,oe,re,ne,ie,Ut,se,ae,le],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Fi=["formRef"];function gi(n,i){if(n&1){let e=P();a(0,"app-filter",41),C("pathChange",function(o){let s=S(e).$index,d=p();return T(d.patchPathAt(o,s))})("remove",function(){let o=S(e).$index,s=p();return T(s.removePathAt(o))}),r()}if(n&2){let e=i.$implicit;_("path",e)}}function Ci(n,i){if(n&1&&(a(0,"option",45),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function fi(n,i){if(n&1&&(a(0,"div",40)(1,"spk-form-field"),m(2,"input",42),r(),a(3,"spk-select"),m(4,"input",43),I(5,44),R(6,Ci,2,2,"option",45,w),$(),r()()),n&2){let e=p();l(6),v(e.sizeOptions())}}var ke=new ee,Si=["Bytes","KB","MB","GB","TB","PB"],Jt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ke.group({path:ke.control(n.path),excludes:ke.group({hidden:ke.control(n.excludes.hidden),system:ke.control(n.excludes.system),temporary:ke.control(n.excludes.temporary),filesLargerThan:ke.group({size:ke.control(null),unit:ke.control(null)})})}),xt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=H(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=x(Si);pathSignal=W(this.sourceDataForm.controls.path.valueChanges);pathArray=H(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),s=this.pathArray().map((d,k)=>k===e?`${i}`:`${d}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${s}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(s=>!s.startsWith("-")&&!s.startsWith("+")).join("\0"),o=this.pathArray().filter((s,d)=>d!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${o}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&de(t.formRef,Fi,5),e&2&&Fe()},decls:56,vars:11,consts:()=>{let i;i=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let o;o=$localize`System files`;let s;s=$localize`Temporary files`;let d;d=$localize`Source Data`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;M=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let h;h=$localize`Source Data`;let Q;Q=$localize`Add Path`;let Y;Y=$localize`Add a path directly from your machine.`;let B;B=$localize`Filters`;let K;K=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let N;N=$localize`Exclude`;let u;u=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let z;z=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files larger than `;let Ae;return Ae=$localize`Select an option...`,[["formRef",""],d,k,M,h,Q,Y,B,K,j,N,u,f,z,O,_e,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",i,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],[3,"path"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",t,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",s,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",Ae],["options",""],[3,"value"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",16,0),C("submit",function(){return S(o),T(t.next())}),a(2,"div",17)(3,"h3",18),A(4,1),r(),a(5,"app-file-tree",19)(6,"label",20),c(7,"Folder path"),r(),m(8,"input",21),r(),a(9,"div",22)(10,"button",23),C("click",function(){return S(o),T(t.goBack())}),E(11,2),m(12,"spk-icon"),D(),r(),a(13,"button",24),E(14,3),m(15,"spk-icon"),D(),r()()(),a(16,"div",25)(17,"h3",18),A(18,4),r(),a(19,"app-toggle-card",26),I(20,27),A(21,5),$(),a(22,"p",28),A(23,6),r(),a(24,"div",29)(25,"spk-form-field"),m(26,"input",30),r(),a(27,"button",31),C("click",function(){return S(o),T(t.addNewPath())}),a(28,"spk-icon"),c(29,"plus"),r()()()(),a(30,"app-toggle-card",26),I(31,27),A(32,7),$(),a(33,"p",28),A(34,8),r(),a(35,"button",32),C("click",function(){return S(o),T(t.addFilter())}),A(36,9),r(),R(37,gi,1,1,"app-filter",33,w),r(),a(39,"app-toggle-card",34),I(40,27),A(41,10),$(),a(42,"p",28),A(43,11),r(),a(44,"spk-toggle",35),E(45,12),m(46,"input",36),D(),r(),a(47,"spk-toggle",35),E(48,13),m(49,"input",37),D(),r(),a(50,"spk-toggle",35),E(51,14),m(52,"input",38),D(),r(),a(53,"spk-toggle",39),C("click",function(){return S(o),T(t.toggleFilesLargerThan())}),A(54,15),r(),F(55,fi,8,0,"div",40),r()()()}e&2&&(_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(14),_("disallowToggle",!0),l(7),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),v(t.pathArray()),l(2),_("disallowToggle",!0),l(14),he("active",t.filesLargerThan()),l(2),g(t.filesLargerThan()?55:-1))},dependencies:[mt,Se,oe,re,ne,$e,Ie,ie,fe,De,_t,Te,Ee,Me,le,ae,we,se,Re,Xe,ve,Tt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var ce=new ee,pe=class n{#e=y(te);#n=y(pt);#i=y(Be);#o=y(Ct);generalForm=jt();sourceDataForm=Jt();scheduleForm=Yt();destinationForm=en();optionsForm=qt();isDraft=x(!1);backupId=x(null);isSubmitting=x(!1);finishedLoading=x(!1);backupDefaults=x(null);isNew=H(()=>this.backupId()==="new");selectedOptions=x([]);selectedAdvancedFormPair=x([]);destinationFormPair=x({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=H(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});selectedHttpOptions=x([]);notSelectedHttpOptions=H(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});sourceDataFormSignal=W(this.sourceDataForm.valueChanges);destinationFormSignal=W(this.destinationForm.valueChanges);generalFormSignal=W(this.generalForm.valueChanges);encryptionFieldSignal=W(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=W(this.scheduleForm.valueChanges);destinationOptions=H(()=>this.#n.backendModules()??[]);httpOptions=H(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=H(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=H(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[yt,...i]});nonSelectedOptions=H(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let o=this.notSelectedAdvancedFormPair().find(s=>s.name===i);o&&this.addAdvancedFormPair(o,e,t)}addHttpOptionByName(i,e,t){let o=this.notSelectedHttpOptions().find(s=>s.name===i);o&&this.addHttpOption(o,e,t)}addAdvancedFormPair(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===i.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(s=>s.name!==i.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(s=>s.name!==i.name),o))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(o=>o.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],o=i.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",s=i.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,d=s?.Value.replace(/[0-9]/g,"")??null,k=s?.Value.replace(/[^0-9]/g,"")??null,M={path:[...e,...t].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:d&&k?{size:parseInt(k),unit:d.toUpperCase()}:null}};this.sourceDataForm.patchValue(M)}mapDestinationToForm(i){let e=i.TargetURL?ht(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=ht(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(s=>s.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",o={name:i.Name??"",description:i.Description??""};t&&t!==""&&(o.encryption=t),this.generalForm.patchValue(o)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,o={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(o)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(o=>{if(o.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(o.Value??"");if(!(o.Name&&e.includes(o.Name))){if(o.Name==="dblock-size"){let s=o.Value?.replace(/[^0-9]/g,""),d=o.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:s?parseInt(s):null,unit:d?d.toUpperCase():null})}if(o.Name&&o.Value){let s=t.find(d=>d.name===o.Name);if(!s)return;this.addOptionToFormGroup(s,o.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,d=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],k=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(k=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let M=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([u,f])=>f).map(([u,f])=>u):[],h=o.path?.split("\0")??[],Q=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},Y=this.advancedOptions(),B=Object.entries(e.advancedOptions??{}).filter(([u,f])=>u&&f).map(([u,f])=>{let z=Y.find(O=>O.name===u);return z?.type==="Size"?{Name:u,Value:`${f.size}${f.unit.toLowerCase()}`}:z?.type==="Integer"?{Name:u,Value:f.toString()}:z?.type==="Boolean"?{Name:u,Value:f.toString()}:{Name:u,Value:f}}),K=[Q,...B],j=Object.entries(o.excludes??{}).filter(([u,f])=>f&&u!=="filesLargerThan").map(([u])=>u),N=o.excludes?.filesLargerThan;return j.length&&K.push({Name:"--exclude-files-attributes",Value:j.join(",")}),N&&N.size!==null&&N.unit!==null&&K.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:d[0]??null,Sources:h.filter(u=>!u.startsWith("-")),Settings:K,Filters:h.filter(u=>u.startsWith("-")).map((u,f)=>({Order:f,Include:!1,Expression:u.slice(1)}))},Schedule:t.autoRun?{Repeat:k,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:M}:null}}#a(i){return i.controls.map(e=>ft(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(o=>o.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(o=>(o.push(i),o))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,ce.control(t));return}if(e.type==="Size"){let o=t.replace(/[0-9]/g,""),s=t.replace(/[^0-9]/g,"");i.addControl(e.name,ce.group({size:ce.control(s?parseInt(s):50),unit:ce.control(o?o.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,ce.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,ce.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,ce.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,ce.control(t,[ye.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let o=this.destinationOptions().find(N=>N.Key===i),s=this.httpOptions();if(!o||!o.Options)return;let d=nt.hasOwnProperty(i)&&nt[i],k=d&&d.oauthField?d.oauthField:null,M=d&&d.customFields?d.customFields:{},h=d&&d.dynamicFields?d.dynamicFields:[],Q=d&&d.advancedFields?d.advancedFields:[],Y=d&&d.ignoredAdvancedFields?d.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let B=ce.group({}),K=ce.group({}),j=ce.group({});M&&Object.entries(M).forEach(([N,u],f)=>{let _e=u,{formElement:z}=_e,O=$t(_e,["formElement"]);B.addControl(N,z(e?.custom[N])),this.destinationFormPair.update(Ae=>(Ae.custom.push(Z({order:900+f},O)),Ae))});for(let N=0;N<o.Options.length;N++){let u=o.Options[N];if(u.Deprecated)continue;let f=h.find(z=>z===u.Name||z.name===u.Name);if(f){let z=f&&typeof f!="string",O={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+N},_e=z?Z(Z({},O),f):O,G=e?.dynamic[u.Name]??u.DefaultValue;this.createFormField(K,_e,G),this.destinationFormPair.update(qe=>(qe.dynamic.push(_e),qe))}else{if(Y.find(me=>me===u.Name))continue;let O=Q.find(me=>me===u.Name||me.name===u.Name),_e=O&&typeof O!="string",Ae=e?.advanced[u.Name],G=Ae??u.DefaultValue,qe={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:G,order:900+N},Nt=_e?Z(Z({},qe),O):qe;t&&Ae&&(this.createFormField(j,Nt,G),this.selectedAdvancedFormPair.update(me=>(me.push(Nt),me))),this.destinationFormPair.update(me=>(me.advanced.push(Nt),me))}}for(let N=0;N<s.length;N++){let u=s[N],f=e?.advanced[u.name],z=f??u.defaultValue;t&&f&&(this.createFormField(j,u,z),this.selectedHttpOptions.update(O=>(O.push(u),O)))}this.destinationFormPair.update(N=>({oauthField:N.oauthField,custom:N.custom.sort((u,f)=>u.order-f.order),dynamic:N.dynamic.sort((u,f)=>u.order-f.order),advanced:N.advanced.sort((u,f)=>u.order-f.order)})),this.destinationForm.controls.destinations.push(tn({key:o.Key,customGroup:B,dynamicGroup:K,advancedGroup:j}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ti=["formRef"],Ei=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),Dt=n=>({$implicit:n}),Di=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Ni=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),Ai=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),hi=()=>({maxWidth:"700px",width:"100%"});function Oi(n,i){n&1&&(E(0,2,2),m(1,"spk-icon"),D())}function yi(n,i){n&1&&A(0,2,3)}function Pi(n,i){if(n&1){let e=P();E(0,2,1),a(1,"button",24),C("click",function(){S(e);let o=p();return T(o.testDestination())}),F(2,Oi,2,0)(3,yi,1,0),r(),D()}if(n&2){let e=p();l(),he("success",e.successfulTest()),l(),g(e.successfulTest()?2:3)}}function ki(n,i){if(n&1){let e=P();a(0,"p",30),C("click",function(){S(e);let o=p();return T(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,5),m(2,"span",31),D(),r()}}function xi(n,i){if(n&1){let e=P();a(0,"div",32)(1,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("file"))}),a(2,"h3"),A(3,6),r(),a(4,"p"),A(5,7),r()(),a(6,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("gcs"))}),a(7,"h3"),c(8,"Google Cloud Storage"),r(),a(9,"p"),A(10,8),r()(),a(11,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("s3"))}),a(12,"h3"),c(13,"S3 compatible bucket"),r(),a(14,"p"),A(15,9),r()(),a(16,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("ssh"))}),a(17,"h3"),c(18,"SSH"),r(),a(19,"p"),A(20,10),r()(),a(21,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("googledrive"))}),a(22,"h3"),c(23,"Google Drive"),r(),a(24,"p"),A(25,11),r()()(),a(26,"p"),A(27,12),r()}}function Ii(n,i){n&1&&be(0)}function $i(n,i){if(n&1&&F(0,Ii,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ei,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Mi(n,i){n&1&&be(0)}function wi(n,i){if(n&1&&F(0,Mi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Di,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ri(n,i){if(n&1){let e=P();E(0,13,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addAdvancedFormPair(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function vi(n,i){n&1&&be(0)}function Gi(n,i){if(n&1&&F(0,vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ni,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function bi(n,i){if(n&1){let e=P();E(0,14,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addHttpOption(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function Vi(n,i){n&1&&be(0)}function Li(n,i){if(n&1&&F(0,Vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ai,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ui(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Bi(n,i){if(n&1&&(a(0,"app-file-tree",43)(1,"label",50),c(2),F(3,Ui,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Ki(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xi(n,i){if(n&1&&(a(0,"app-file-tree",44)(1,"label",50),c(2),F(3,Ki,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function zi(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Hi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"link"),r())}function Wi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"textbox"),r())}function ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,zi,3,1,"spk-tooltip",51),r(),m(4,"input",52),F(5,Hi,2,0,"spk-icon",53)(6,Wi,2,0,"spk-icon",53),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function qi(n,i){if(n&1){let e=P();a(0,"span",57),C("click",function(){S(e);let o=p(2).$implicit,s=p(2);return T(s.oauthStartTokenCreation(o.destinationType))}),c(1,"AuthID"),r()}}function Qi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"password"),r())}function Yi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function Zi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),r(),m(3,"input",54),F(4,qi,2,0,"span",55)(5,Qi,2,0,"spk-icon",53)(6,Yi,2,0,"spk-icon",56)(7,Zi,2,0,"spk-icon",56),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function eo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function to(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function no(n,i){if(n&1&&(a(0,"spk-select")(1,"label",50),c(2),F(3,eo,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,to,2,2,"option",61,w),$(),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function io(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function oo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),wt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function ro(n,i){if(n&1&&(a(0,"spk-select",45)(1,"label",50),c(2),F(3,io,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,oo,2,3,"option",61,w),$(),r()),n&2){let e,t=p().$implicit,o=p(2);_("isFreeText",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.loadOptions(o.injector)())}}function ao(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function lo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function so(n,i){if(n&1&&(a(0,"div",46)(1,"label",50),c(2),F(3,ao,3,1,"spk-tooltip",51),r(),a(4,"div",62)(5,"spk-form-field"),m(6,"input",63),a(7,"spk-icon",53),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",64),I(12,60),R(13,lo,2,2,"option",61,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p(2);_("formGroupName",t.formView.name),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(7),v(o.sizeOptions())}}function po(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function co(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,po,3,1,"spk-tooltip",51),r(),m(4,"input",65),a(5,"spk-icon",53),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function _o(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function mo(n,i){if(n&1&&(a(0,"spk-toggle",47)(1,"label",50),c(2),F(3,_o,3,1,"spk-tooltip",51),r(),m(4,"input",66),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function uo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Fo(n,i){n&1&&(a(0,"spk-option",68),c(1,"None"),r()),n&2&&_("value","None")}function go(n,i){if(n&1&&(a(0,"spk-option",61),c(1),m(2,"spk-checkbox",69),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Co(n,i){if(n&1&&F(0,Fo,2,1,"spk-option",68)(1,go,3,2,"spk-option",61),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function fo(n,i){if(n&1&&(a(0,"spk-select",48)(1,"label",50),c(2),F(3,uo,3,1,"spk-tooltip",51),r(),m(4,"input",67),I(5,60),R(6,Co,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function So(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function To(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,So,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Eo(n,i){if(n&1){let e=P();a(0,"button",70),C("click",function(){S(e);let o=p().$implicit,s=p(2);return T(s.removeFormView(o.formView,0))}),a(1,"spk-icon"),c(2,"x-circle"),r()()}}function Do(n,i){if(n&1&&(a(0,"div",41),I(1,42),F(2,Bi,5,16,"app-file-tree",43)(3,Xi,5,12,"app-file-tree",44)(4,ji,7,12,"spk-form-field")(5,Ji,8,13,"spk-form-field")(6,no,8,11,"spk-select")(7,ro,8,12,"spk-select",45)(8,so,15,11,"div",46)(9,co,7,11,"spk-form-field")(10,mo,5,11,"spk-toggle",47)(11,fo,8,8,"spk-select",48)(12,To,5,11,"spk-form-field"),$(),F(13,Eo,3,0,"button",49),r()),n&2){let e=i.$implicit;he("single-field",e.formGroupName!=="advanced"),l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),l(11),g(e.formGroupName==="advanced"?13:-1)}}function No(n,i){if(n&1&&(I(0,25)(1,34),R(2,$i,1,9,"ng-container",null,w),R(4,wi,1,9,"ng-container",null,w),a(6,"app-toggle-card",35),I(7,36),E(8,13),a(9,"spk-menu")(10,"button",37),m(11,"spk-icon"),r(),I(12,23),R(13,Ri,2,1,"button",38,w),$(),r(),D(),$(),R(15,Gi,1,9,"ng-container",null,w),r(),a(17,"app-toggle-card",35),I(18,36),E(19,14),a(20,"spk-menu")(21,"button",37),m(22,"spk-icon"),r(),I(23,23),R(24,bi,2,1,"button",38,w),$(),r(),D(),$(),R(26,Li,1,9,"ng-container",null,w),r(),F(28,Do,14,5,"ng-template",null,1,at),$()()),n&2){let e=p();l(2),v(e.destinationFormPair().custom),l(2),v(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),v(e.notSelectedAdvancedFormPair()),l(2),v(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedHttpOptions().length===0),l(3),v(e.notSelectedHttpOptions()),l(2),v(e.selectedHttpOptions())}}function Ao(n,i){if(n&1){let e=P();a(0,"spk-dialog",71),Gt("isOpenChange",function(o){S(e);let s=p();return vt(s.targetUrlDialogOpen,o)||(s.targetUrlDialogOpen=o),T(o)}),a(1,"header",72)(2,"h2"),A(3,15),r(),a(4,"spk-alert",73),A(5,16),r()(),a(6,"div",74)(7,"spk-form-field"),m(8,"textarea",75),r()(),a(9,"footer",76)(10,"button",27),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),a(12,"button",77),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!0))}),E(13,17),m(14,"spk-icon"),D(),r()()()}if(n&2){let e=p();Rt("isOpen",e.targetUrlDialogOpen),_("options",bt(3,hi)),l(8),_("formControl",e.targetUrlCtrl)}}var ho=["Bytes","KB","MB","GB","TB","PB"],Et=new ee,en=(n={destinations:[]})=>Et.group({destinations:Et.array(n.destinations)}),tn=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>Et.group({destinationType:Et.control(n),custom:i,dynamic:e,advanced:t}),It=class n{#e=y(te);#n=y(Ce);#i=y(Lt);#o=y(Be);#t=y(pe);#r=y(Xt);injector=y(Mt);formRef=ue.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=x(ho);successfulTest=x(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=H(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#t.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:o=>{let s=o.error.error.Error;if(s==="missing-folder"&&this.#r.open(Le,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:d=>{d&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),s.startsWith("incorrect-cert:")){let d=s.split("incorrect-cert:")[1];this.#r.open(Le,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
1
+ import{a as Xe,b as ve}from"./chunk-3WCWZJYH.js";import{a as At,b as Ht}from"./chunk-DNHLTHLR.js";import{a as pt}from"./chunk-V7APGUBT.js";import{b as W}from"./chunk-KFGIVU27.js";import{a as Ie,b as ne,c as ye,d as ie,e as fe,f as ct,g as Ut,h as Se,i as $e,k as _t,l as Te,m as Me,n as Bt,o as Ee,p as oe,q as re,r as ee,s as mt,t as De}from"./chunk-7SJHYZC5.js";import{a as ae,b as ut,d as Kt,e as Xt,g as we,i as dt,k as le,m as Ft,n as zt,p as gt,q as se,v as Re,w as Ke}from"./chunk-AUUCT7OA.js";import{a as Be}from"./chunk-PIDBEXSZ.js";import{H as Ce,X as te}from"./chunk-J3H4BCHI.js";import{c as Lt}from"./chunk-5XX7BU4I.js";import{ia as st}from"./chunk-5ZK3D2RS.js";import{$b as X,Ab as g,Bb as w,Cb as R,Db as v,E as Ye,Eb as a,Fb as r,Gb as m,Hb as I,Ib as $,Jb as be,Kb as P,Kc as H,Mc as lt,Qb as E,R as xe,Ra as l,Rb as D,Sb as A,Tb as Je,Ub as et,Vb as Oe,Wb as C,X as y,Xb as p,Za as x,_a as ue,_b as U,ac as V,ea as S,fa as T,fb as J,fc as de,gc as Fe,hc as ge,ic as c,ja as Mt,jc as L,kc as b,lb as F,lc as wt,mc as Rt,nc as vt,oc as Gt,p as Qe,qa as Ze,ra as rt,rc as bt,sc as Ve,tc as Vt,uc as tt,vb as _,xb as he,yc as at}from"./chunk-MR4RE3IB.js";import{a as Z,c as $t}from"./chunk-C6Q5SG76.js";function nn(n,i){if(n&1&&(a(0,"p"),c(1),r()),n&2){let e=p();l(),L(e._data().message)}}var on={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},Le=class n{data=rt();_data=H(()=>Z(Z({},on),this.data()));closed=Ze();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),c(2),r()(),a(3,"div",1),F(4,nn,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),c(7),r(),a(8,"button",4),C("click",function(){return t.close("confirm")}),c(9),r()()),e&2&&(l(2),L(t._data().title),l(2),g(t._data().message?4:-1),l(3),L(t._data().cancelText),l(2),L(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var Ct=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ue=class n{#e=y(Be);s3Providers=W(this.getS3Config("Providers"));s3Regions=W(this.getS3Config("Regions"));s3RegionHosts=W(this.getS3Config("RegionHosts"));s3StorageClasses=W(this.getS3Config("StorageClasses"));storjSatellites=W(this.getStorjConfig("Satellites"));storjAuthenticationMethods=W(this.getStorjConfig("AuthenticationMethods"));openstackProviders=W(this.getOpenstackConfig("Providers"));openstackVersions=W(this.getOpenstackConfig("Versions"));gcsLocations=W(this.getGcsConfig("Locations"));gcsStorageClasses=W(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(Qe(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(Qe(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(Qe(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(Qe(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ge=new ee,nt={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>Ge.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>Ge.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>Ge.control(n??"",[ye.required,ye.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["authid"]}};function He(n,i){let e={},t={};return i.searchParams.forEach((o,s)=>{nt[n].dynamicFields?.includes(s)?t[s]=decodeURIComponent(o):e[s]=decodeURIComponent(o)}),{advanced:e,dynamic:t}}function it(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var We={file:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,o=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return Z({destinationType:n,custom:{path:`${t?"/":""}${o}${i.pathname}`}},He(n,i))}},ssh:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},He(n,i))},s3:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},He(n,i))},gcs:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>Z({destinationType:n},He(n,i))}};function ft(n){let i=n.destinationType;return!i||!We.hasOwnProperty(i)?We.fallbackMapper.to(n)??"":We[i].to(n)??""}function ht(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],o=new URL(t);if(!We.hasOwnProperty(e))return We.fallbackMapper.from(e,o);if(!i)throw new Error("Invalid target path");return We[e].from(e,o,n)}var Wt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,St=class n{generate(i,e=Wt){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=Wt){let t=this;return Array.apply(null,{length:i}).map(()=>{let o;for(;;)if(o=String.fromCharCode(t.#e()),e.test(o))return o},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var rn=["formRef"];function an(n,i){if(n&1&&(a(0,"option",27),c(1),r()),n&2){let e=i.$implicit;_("value",e.Key),l(),L(e.DisplayName)}}function ln(n,i){if(n&1&&m(0,"spk-progress-bar",38),n&2){let e=p(3);he("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function sn(n,i){n&1&&(a(0,"span",33),A(1,9),r())}function pn(n,i){n&1&&(E(0,7,1),m(1,"spk-icon"),D())}function cn(n,i){n&1&&(E(0,7,2),m(1,"spk-icon"),D())}function _n(n,i){n&1&&(E(0,10,1),m(1,"spk-icon",40),D())}function mn(n,i){n&1&&(E(0,10,2),m(1,"spk-icon"),D())}function un(n,i){if(n&1){let e=P();a(0,"button",39),C("click",function(){S(e);let o=p(3);return T(o.copyPassword())}),E(1,10),F(2,_n,2,0)(3,mn,2,0),D(),r()}if(n&2){let e=p(3);l(2),g(e.copiedPassword()?2:3)}}function dn(n,i){n&1&&(a(0,"spk-alert",37),A(1,11),r())}function Fn(n,i){if(n&1){let e=P();a(0,"div",28)(1,"spk-form-field")(2,"label",29),E(3,6),m(4,"sup"),D(),r(),m(5,"input",30),r(),F(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),m(8,"input",32),F(9,sn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),C("click",function(){S(e);let o=p(2);return T(o.showPassword.set(!o.showPassword()))}),E(12,7),F(13,pn,2,0)(14,cn,2,0),D(),r(),a(15,"button",35),C("click",function(){S(e);let o=p(2);return T(o.generatePassword())}),E(16,8),m(17,"spk-icon"),D(),r(),F(18,un,4,1,"button",36),r(),F(19,dn,2,0,"spk-alert",37),r()}if(n&2){let e=p(2);l(5),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.password?6:-1),l(2),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),g(e.showPassword()?13:14),l(5),g(e.showCopyPassword()?18:-1),l(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function gn(n,i){if(n&1&&(a(0,"spk-select",24)(1,"label",25),A(2,5),r(),m(3,"input",26),R(4,an,2,2,"option",27,w),r(),F(6,Fn,20,7,"div",28)),n&2){let e=p();_("displayFn",e.displayFn()),l(4),v(e.encryptionOptions()),l(2),g(e.encryptionFieldSignal()!==""?6:-1)}}function Cn(n,i){if(n&1&&(a(0,"button",22),E(1,12),m(2,"spk-icon"),D(),r()),n&2){let e=p();_("disabled",e.generalForm.invalid)}}function fn(n,i){if(n&1&&(a(0,"spk-tooltip",23)(1,"button",22),E(2,13),m(3,"spk-icon"),D(),r()()),n&2){let e=p();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var je=new ee,jt=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>je.group({name:je.control(n.name,[ye.required]),description:je.control(n.description),encryption:je.control(n.encryption,[Ht()]),password:je.control(n.password,[At(i=>i?.value.encryption!=="",[ye.required])]),repeatPassword:je.control(n.repeatPassword,[At(i=>i?.value.encryption!=="",[ye.required])])}),yt={Key:"",DisplayName:"None"},Ot=class n{#e=y(te);#n=y(Ce);#i=y(St);#o=y(pe);#t=y(pt);formRef=ue.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=x(!1);copiedPassword=x(!1);showCopyPassword=x(!1);encryptionEffect=lt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=H(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...i].find(o=>o.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&de(t.formRef,rn,5),e&2&&Fe()},decls:20,vars:3,consts:()=>{let i;i=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let s;s=$localize`Backup description`;let d;d=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`Encryption`;let M;M=$localize`Encryption`;let h;h=$localize`Password`;let Q;Q=$localize`Repeat password`;let Y;Y=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let B;B=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,B=Oe(B);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let N;N=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=Oe(N);let u;u=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let f;f=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,o,s,d,M,Y,B,K,j,N,u,f,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",i,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",Q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",14,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",15),A(3,1),r(),a(4,"spk-form-field")(5,"label",16),E(6,2),m(7,"sup"),D(),r(),m(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),A(11,3),r(),m(12,"textarea",19),r(),F(13,gn,7,2),a(14,"div",20)(15,"button",21),C("click",function(){return S(o),T(t.exit())}),E(16,4),m(17,"spk-icon"),D(),r(),F(18,Cn,3,1,"button",22)(19,fn,4,2,"spk-tooltip",23),r()()}e&2&&(_("formGroup",t.generalForm),l(13),g(t.isNew()?13:-1),l(5),g(t.encryptionFieldSignal()===""?18:19))},dependencies:[De,Se,oe,re,ne,ie,fe,Te,Ee,le,se,we,ae,zt,ut,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Sn=["formRef"],Tn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),En=n=>({$implicit:n});function Dn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Nn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.name)}}function An(n,i){if(n&1){let e=P();E(0,7,1),a(1,"button",30,2),C("click",function(){let o=S(e).$implicit,s=p();return T(s.addNewOption(o))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function hn(n,i){n&1&&be(0)}function On(n,i){if(n&1&&F(0,hn,1,0,"ng-container",31),n&2){let e=i.$implicit,t=i.$index;p();let o=ge(36);_("ngTemplateOutlet",o)("ngTemplateOutletContext",Ve(5,En,Vt(2,Tn,t,e)))}}function yn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Pn(n,i){if(n&1&&(a(0,"app-file-tree",34)(1,"label",40),c(2),F(3,yn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function xn(n,i){if(n&1&&(a(0,"app-file-tree",35)(1,"label",40),c(2),F(3,kn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function In(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function $n(n,i){n&1&&(a(0,"spk-icon",43),c(1,"link"),r())}function Mn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"textbox"),r())}function wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,In,3,1,"spk-tooltip",41),r(),m(4,"input",42),F(5,$n,2,0,"spk-icon",43)(6,Mn,2,0,"spk-icon",43),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function Rn(n,i){if(n&1){let e=P();a(0,"span",47),C("click",function(){S(e);let o=p(2).$implicit,s=p();return T(s.oauthStartTokenCreation(o.formViewType))}),c(1,"AuthID"),r()}}function vn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"password"),r())}function Gn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function bn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Vn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),r(),m(3,"input",44),F(4,Rn,2,0,"span",45)(5,vn,2,0,"spk-icon",43)(6,Gn,2,0,"spk-icon",46)(7,bn,2,0,"spk-icon",46),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function Ln(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Un(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Bn(n,i){if(n&1&&(a(0,"spk-select")(1,"label",40),c(2),F(3,Ln,3,1,"spk-tooltip",41),r(),m(4,"input",49),I(5,17),R(6,Un,2,2,"option",18,w),$(),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function Kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function zn(n,i){if(n&1&&(a(0,"div",36)(1,"label",40),c(2),F(3,Kn,3,1,"spk-tooltip",41),r(),a(4,"div",50)(5,"spk-form-field"),m(6,"input",51),a(7,"spk-icon",43),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",52),I(12,17),R(13,Xn,2,2,"option",18,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p();_("formGroupName",t.formView.name),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),X("id","destination-",t.formGroupName,"-",t.index,""),l(7),v(o.sizeOptions())}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,Hn,3,1,"spk-tooltip",41),r(),m(4,"input",53),a(5,"spk-icon",43),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function jn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function qn(n,i){if(n&1&&(a(0,"spk-toggle",37)(1,"label",40),c(2),F(3,jn,3,1,"spk-tooltip",41),r(),m(4,"input",54),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function Qn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Yn(n,i){n&1&&(a(0,"spk-option",56),c(1,"None"),r()),n&2&&_("value","None")}function Zn(n,i){if(n&1&&(a(0,"spk-option",18),c(1),m(2,"spk-checkbox",57),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Jn(n,i){if(n&1&&F(0,Yn,2,1,"spk-option",56)(1,Zn,3,2,"spk-option",18),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function ei(n,i){if(n&1&&(a(0,"spk-select",38)(1,"label",40),c(2),F(3,Qn,3,1,"spk-tooltip",41),r(),m(4,"input",55),I(5,17),R(6,Jn,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function ti(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function ni(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,ti,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function ii(n,i){if(n&1){let e=P();a(0,"div",32),I(1,33),F(2,Pn,5,14,"app-file-tree",34)(3,xn,5,10,"app-file-tree",35)(4,wn,7,10,"spk-form-field")(5,Vn,8,11,"spk-form-field")(6,Bn,8,9,"spk-select")(7,zn,15,9,"div",36)(8,Wn,7,9,"spk-form-field")(9,qn,5,9,"spk-toggle",37)(10,ei,8,7,"spk-select",38)(11,ni,5,9,"spk-form-field"),$(),a(12,"button",39),C("click",function(){let o=S(e).$implicit,s=p();return T(s.removeFormView(o.formView,0))}),a(13,"spk-icon"),c(14,"x-circle"),r()()()}if(n&2){let e=i.$implicit;l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Pe=new ee,oi=["Bytes","KB","MB","GB","TB","PB"],ri=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],qt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Pe.group({remoteVolumeSize:Pe.group({size:Pe.control(n.remoteVolumeSize),unit:Pe.control(n.size)}),backupRetention:Pe.control(n.backupRetention),advancedOptions:Pe.group({})}),gr=(n,i)=>Pe.group({name:Pe.control(n),value:Pe.control(i)}),Pt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=x(oi);rentationOptions=x(ri);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(o=>o.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(o=>o.name===e);return t?`${t.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&de(t.formRef,Sn,5),e&2&&Fe()},decls:44,vars:5,consts:()=>{let i;i=$localize`Select an option...`;let e;e=$localize`Options`;let t;t=$localize`Remote volume size`;let o;o=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#17\uFFFD"}:START_LINK:Read more${"\uFFFD/#17\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let d;d=$localize` Advanced options ${"\uFFFD#27\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#28\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#30\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*32:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*32:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_MENU:`,d=Oe(d);let k;k=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;return M=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],["fieldTemplate",""],["option",""],e,t,o,s,d,k,M,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",i,"formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",10,0),C("submit",function(){return S(o),T(t.submit())}),a(2,"h3",11),A(3,3),r(),a(4,"div",12)(5,"div",13)(6,"spk-form-field")(7,"label",14),A(8,4),r(),m(9,"input",15),r(),a(10,"spk-select"),m(11,"input",16),I(12,17),R(13,Dn,2,2,"option",18,w),$(),r()(),a(15,"p"),E(16,5),m(17,"a",19),D(),r()(),a(18,"spk-select",20)(19,"label",14),A(20,6),r(),m(21,"input",21),R(22,Nn,2,2,"option",18,w),r(),a(24,"app-toggle-card",22),I(25,23),E(26,7),a(27,"spk-menu")(28,"button",24),m(29,"spk-icon"),r(),I(30,25),R(31,An,3,1,"button",26,w),$(),r(),D(),$(),R(33,On,1,7,"ng-container",null,w),r(),F(35,ii,15,2,"ng-template",null,1,at),a(37,"div",27)(38,"button",28),C("click",function(){return S(o),T(t.goBack())}),E(39,8),m(40,"spk-icon"),D(),r(),a(41,"button",29),E(42,9),m(43,"spk-icon"),D(),r()()()}e&2&&(_("formGroup",t.optionsForm),l(13),v(t.sizeOptions()),l(5),_("displayFn",t.retentionOptionDisplayFn()),l(4),v(t.rentationOptions()),l(2),_("disallowToggle",!0),l(7),v(t.nonSelectedOptions()),l(2),v(t.selectedOptions()),l(8),he("loader",t.isSubmitting()))},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,st,Ft,se,we,ae,le,Re,dt,gt,Ke,Xe,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ai=["formRef"];function li(n,i){if(n&1&&(a(0,"option",39),c(1),r()),n&2){let e=i.$implicit;_("value",e.key),l(),L(e.label)}}function si(n,i){if(n&1){let e=P();a(0,"div",26)(1,"spk-form-field")(2,"label",27),A(3,8),r(),a(4,"input",28,1),C("focus",function(){S(e);let o=ge(5);return T(o.showPicker())}),r(),a(6,"spk-icon",29),c(7,"clock"),r()(),a(8,"spk-form-field"),m(9,"label",30),a(10,"input",31,2),C("focus",function(){S(e);let o=ge(11);return T(o.showPicker())}),r(),a(12,"spk-icon",29),c(13,"calendar"),r()()(),I(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),A(18,9),r(),m(19,"input",35),r(),a(20,"spk-select",36),m(21,"input",37),I(22,38),R(23,li,2,2,"option",39,w),$(),r()(),a(25,"app-toggle-card",40),I(26,41),A(27,10),$(),a(28,"div",42)(29,"spk-toggle",21),E(30,11),m(31,"input",43),D(),r(),a(32,"spk-toggle",21),E(33,12),m(34,"input",44),D(),r(),a(35,"spk-toggle",21),E(36,13),m(37,"input",45),D(),r(),a(38,"spk-toggle",21),E(39,14),m(40,"input",46),D(),r(),a(41,"spk-toggle",21),E(42,15),m(43,"input",47),D(),r(),a(44,"spk-toggle",21),E(45,16),m(46,"input",48),D(),r(),a(47,"spk-toggle",21),E(48,17),m(49,"input",49),D(),r()()(),$()}if(n&2){let e=p();l(20),_("displayFn",e.displayFn),l(3),v(e.unitOptions),l(2),_("disallowToggle",!0)}}var q=new ee,Qt=[{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`}],Yt=(n={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>q.group({autoRun:q.control(n.autoRun),nextTime:q.group({time:q.control(n.nextTime.time),date:q.control(n.nextTime.date)}),runAgain:q.group({repeatValue:q.control(n.runAgain.repeatValue),repeatUnit:q.control(n.runAgain.repeatUnit),allowedDays:q.group({mon:q.control(n.runAgain.allowedDays.mon),tue:q.control(n.runAgain.allowedDays.tue),wed:q.control(n.runAgain.allowedDays.wed),thu:q.control(n.runAgain.allowedDays.thu),fri:q.control(n.runAgain.allowedDays.fri),sat:q.control(n.runAgain.allowedDays.sat),sun:q.control(n.runAgain.allowedDays.sun)})})}),kt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Qt;displayFn(i){let e=Qt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&de(t.formRef,ai,5),e&2&&Fe()},decls:18,vars:2,consts:()=>{let i;i=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let s;s=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let d;d=$localize`Next time`;let k;k=$localize`Run again every`;let M;M=$localize`Allowed days`;let h;h=$localize` Monday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Tuesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Wednesday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Thursday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Sunday ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],i,e,t,o,s,d,k,M,h,Q,Y,B,K,j,N,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",19),A(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),E(6,4),m(7,"input",22),D(),r(),a(8,"p"),A(9,5),r()(),F(10,si,50,2),a(11,"div",23)(12,"button",24),C("click",function(){return S(o),T(t.goBack())}),E(13,6),m(14,"spk-icon"),D(),r(),a(15,"button",25),E(16,7),m(17,"spk-icon"),D(),r()()()}if(e&2){let o;_("formGroup",t.scheduleForm),l(10),g((o=t.scheduleFormSignal())!=null&&o.autoRun?10:-1)}},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,le,se,Re,ae,we,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.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})};function pi(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function ci(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function _i(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r(),R(2,ci,2,2,"option",3,w),r()}if(n&2){let e,t=p(2);_("hideClearButton",!0)("displayFn",t.displayFn),l(),_("ngModel",(e=t.pathState())==null?null:e.expression),l(),v(t.fileGroupOptions())}}function mi(n,i){if(n&1){let e=P();a(0,"spk-form-field")(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r()()}if(n&2){let e,t=p(2);l(),_("ngModel",(e=t.pathState())==null?null:e.expression)}}function ui(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(o){S(e);let s=p();return T(s.updateStateType(o))}),r(),I(2,2),R(3,pi,2,2,"option",3,w),$(),r(),F(5,_i,4,3,"spk-select",0)(6,mi,2,1,"spk-form-field"),a(7,"div",4),C("click",function(){S(e);let o=p();return T(o.removeFilter())}),a(8,"spk-icon",5),c(9,"x-circle"),r()()}if(n&2){let e,t,o=p();_("hideClearButton",!0)("displayFn",o.displayFn),l(),_("ngModel",(e=o.pathState())==null?null:e.type),l(2),v(o.expressionOptions()),l(2),g(((t=o.pathState())==null?null:t.type)==="-FileGroup"||((t=o.pathState())==null?null:t.type)==="+FileGroup"?5:6)}}var Zt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{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:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],di=[{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"}],Tt=class n{path=rt.required();pathChange=Ze();remove=Ze();expressionOptions=x(Zt);fileGroupOptions=x(di);pathState=x(null);pathEffect=lt(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}#e(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let o=i.expression.endsWith("/"),s=i.expression.startsWith("/");return o&&s?`${e}${i.expression}`:o?`${e}${i.expression}/`:s?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=Zt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let i;return i=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",i,3,"ngModelChange","ngModel"],["options",""],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,t){e&1&&F(0,ui,10,4),e&2&&g(t.pathState()?0:-1)},dependencies:[mt,oe,re,ne,ie,Ut,se,ae,le],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Fi=["formRef"];function gi(n,i){if(n&1){let e=P();a(0,"app-filter",41),C("pathChange",function(o){let s=S(e).$index,d=p();return T(d.patchPathAt(o,s))})("remove",function(){let o=S(e).$index,s=p();return T(s.removePathAt(o))}),r()}if(n&2){let e=i.$implicit;_("path",e)}}function Ci(n,i){if(n&1&&(a(0,"option",45),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function fi(n,i){if(n&1&&(a(0,"div",40)(1,"spk-form-field"),m(2,"input",42),r(),a(3,"spk-select"),m(4,"input",43),I(5,44),R(6,Ci,2,2,"option",45,w),$(),r()()),n&2){let e=p();l(6),v(e.sizeOptions())}}var ke=new ee,Si=["Bytes","KB","MB","GB","TB","PB"],Jt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ke.group({path:ke.control(n.path),excludes:ke.group({hidden:ke.control(n.excludes.hidden),system:ke.control(n.excludes.system),temporary:ke.control(n.excludes.temporary),filesLargerThan:ke.group({size:ke.control(null),unit:ke.control(null)})})}),xt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=H(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=x(Si);pathSignal=W(this.sourceDataForm.controls.path.valueChanges);pathArray=H(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),s=this.pathArray().map((d,k)=>k===e?`${i}`:`${d}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${s}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(s=>!s.startsWith("-")&&!s.startsWith("+")).join("\0"),o=this.pathArray().filter((s,d)=>d!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${o}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&de(t.formRef,Fi,5),e&2&&Fe()},decls:56,vars:11,consts:()=>{let i;i=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let o;o=$localize`System files`;let s;s=$localize`Temporary files`;let d;d=$localize`Source Data`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;M=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let h;h=$localize`Source Data`;let Q;Q=$localize`Add Path`;let Y;Y=$localize`Add a path directly from your machine.`;let B;B=$localize`Filters`;let K;K=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let N;N=$localize`Exclude`;let u;u=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let z;z=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files larger than `;let Ae;return Ae=$localize`Select an option...`,[["formRef",""],d,k,M,h,Q,Y,B,K,j,N,u,f,z,O,_e,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",i,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],[3,"path"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",t,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",s,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",Ae],["options",""],[3,"value"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",16,0),C("submit",function(){return S(o),T(t.next())}),a(2,"div",17)(3,"h3",18),A(4,1),r(),a(5,"app-file-tree",19)(6,"label",20),c(7,"Folder path"),r(),m(8,"input",21),r(),a(9,"div",22)(10,"button",23),C("click",function(){return S(o),T(t.goBack())}),E(11,2),m(12,"spk-icon"),D(),r(),a(13,"button",24),E(14,3),m(15,"spk-icon"),D(),r()()(),a(16,"div",25)(17,"h3",18),A(18,4),r(),a(19,"app-toggle-card",26),I(20,27),A(21,5),$(),a(22,"p",28),A(23,6),r(),a(24,"div",29)(25,"spk-form-field"),m(26,"input",30),r(),a(27,"button",31),C("click",function(){return S(o),T(t.addNewPath())}),a(28,"spk-icon"),c(29,"plus"),r()()()(),a(30,"app-toggle-card",26),I(31,27),A(32,7),$(),a(33,"p",28),A(34,8),r(),a(35,"button",32),C("click",function(){return S(o),T(t.addFilter())}),A(36,9),r(),R(37,gi,1,1,"app-filter",33,w),r(),a(39,"app-toggle-card",34),I(40,27),A(41,10),$(),a(42,"p",28),A(43,11),r(),a(44,"spk-toggle",35),E(45,12),m(46,"input",36),D(),r(),a(47,"spk-toggle",35),E(48,13),m(49,"input",37),D(),r(),a(50,"spk-toggle",35),E(51,14),m(52,"input",38),D(),r(),a(53,"spk-toggle",39),C("click",function(){return S(o),T(t.toggleFilesLargerThan())}),A(54,15),r(),F(55,fi,8,0,"div",40),r()()()}e&2&&(_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(14),_("disallowToggle",!0),l(7),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),v(t.pathArray()),l(2),_("disallowToggle",!0),l(14),he("active",t.filesLargerThan()),l(2),g(t.filesLargerThan()?55:-1))},dependencies:[mt,Se,oe,re,ne,$e,Ie,ie,fe,De,_t,Te,Ee,Me,le,ae,we,se,Re,Xe,ve,Tt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var ce=new ee,pe=class n{#e=y(te);#n=y(pt);#i=y(Be);#o=y(Ct);generalForm=jt();sourceDataForm=Jt();scheduleForm=Yt();destinationForm=en();optionsForm=qt();isDraft=x(!1);backupId=x(null);isSubmitting=x(!1);finishedLoading=x(!1);backupDefaults=x(null);isNew=H(()=>this.backupId()==="new");selectedOptions=x([]);selectedAdvancedFormPair=x([]);destinationFormPair=x({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=H(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});selectedHttpOptions=x([]);notSelectedHttpOptions=H(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});sourceDataFormSignal=W(this.sourceDataForm.valueChanges);destinationFormSignal=W(this.destinationForm.valueChanges);generalFormSignal=W(this.generalForm.valueChanges);encryptionFieldSignal=W(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=W(this.scheduleForm.valueChanges);destinationOptions=H(()=>this.#n.backendModules()??[]);httpOptions=H(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=H(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=H(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[yt,...i]});nonSelectedOptions=H(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let o=this.notSelectedAdvancedFormPair().find(s=>s.name===i);o&&this.addAdvancedFormPair(o,e,t)}addHttpOptionByName(i,e,t){let o=this.notSelectedHttpOptions().find(s=>s.name===i);o&&this.addHttpOption(o,e,t)}addAdvancedFormPair(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===i.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(s=>s.name!==i.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(s=>s.name!==i.name),o))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(o=>o.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],o=i.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",s=i.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,d=s?.Value.replace(/[0-9]/g,"")??null,k=s?.Value.replace(/[^0-9]/g,"")??null,M={path:[...e,...t].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:d&&k?{size:parseInt(k),unit:d.toUpperCase()}:null}};this.sourceDataForm.patchValue(M)}mapDestinationToForm(i){let e=i.TargetURL?ht(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=ht(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(s=>s.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",o={name:i.Name??"",description:i.Description??""};t&&t!==""&&(o.encryption=t),this.generalForm.patchValue(o)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,o={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(o)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(o=>{if(o.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(o.Value??"");if(!(o.Name&&e.includes(o.Name))){if(o.Name==="dblock-size"){let s=o.Value?.replace(/[^0-9]/g,""),d=o.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:s?parseInt(s):null,unit:d?d.toUpperCase():null})}if(o.Name&&o.Value){let s=t.find(d=>d.name===o.Name);if(!s)return;this.addOptionToFormGroup(s,o.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,d=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],k=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(k=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let M=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([u,f])=>f).map(([u,f])=>u):[],h=o.path?.split("\0")??[],Q=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},Y=this.advancedOptions(),B=Object.entries(e.advancedOptions??{}).filter(([u,f])=>u&&f).map(([u,f])=>{let z=Y.find(O=>O.name===u);return z?.type==="Size"?{Name:u,Value:`${f.size}${f.unit.toLowerCase()}`}:z?.type==="Integer"?{Name:u,Value:f.toString()}:z?.type==="Boolean"?{Name:u,Value:f.toString()}:{Name:u,Value:f}}),K=[Q,...B],j=Object.entries(o.excludes??{}).filter(([u,f])=>f&&u!=="filesLargerThan").map(([u])=>u),N=o.excludes?.filesLargerThan;return j.length&&K.push({Name:"--exclude-files-attributes",Value:j.join(",")}),N&&N.size!==null&&N.unit!==null&&K.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:d[0]??null,Sources:h.filter(u=>!u.startsWith("-")),Settings:K,Filters:h.filter(u=>u.startsWith("-")).map((u,f)=>({Order:f,Include:!1,Expression:u.slice(1)}))},Schedule:t.autoRun?{Repeat:k,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:M}:null}}#a(i){return i.controls.map(e=>ft(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(o=>o.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(o=>(o.push(i),o))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,ce.control(t));return}if(e.type==="Size"){let o=t.replace(/[0-9]/g,""),s=t.replace(/[^0-9]/g,"");i.addControl(e.name,ce.group({size:ce.control(s?parseInt(s):50),unit:ce.control(o?o.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,ce.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,ce.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,ce.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,ce.control(t,[ye.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let o=this.destinationOptions().find(N=>N.Key===i),s=this.httpOptions();if(!o||!o.Options)return;let d=nt.hasOwnProperty(i)&&nt[i],k=d&&d.oauthField?d.oauthField:null,M=d&&d.customFields?d.customFields:{},h=d&&d.dynamicFields?d.dynamicFields:[],Q=d&&d.advancedFields?d.advancedFields:[],Y=d&&d.ignoredAdvancedFields?d.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let B=ce.group({}),K=ce.group({}),j=ce.group({});M&&Object.entries(M).forEach(([N,u],f)=>{let _e=u,{formElement:z}=_e,O=$t(_e,["formElement"]);B.addControl(N,z(e?.custom[N])),this.destinationFormPair.update(Ae=>(Ae.custom.push(Z({order:900+f},O)),Ae))});for(let N=0;N<o.Options.length;N++){let u=o.Options[N];if(u.Deprecated)continue;let f=h.find(z=>z===u.Name||z.name===u.Name);if(f){let z=f&&typeof f!="string",O={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+N},_e=z?Z(Z({},O),f):O,G=e?.dynamic[u.Name]??u.DefaultValue;this.createFormField(K,_e,G),this.destinationFormPair.update(qe=>(qe.dynamic.push(_e),qe))}else{if(Y.find(me=>me===u.Name))continue;let O=Q.find(me=>me===u.Name||me.name===u.Name),_e=O&&typeof O!="string",Ae=e?.advanced[u.Name],G=Ae??u.DefaultValue,qe={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:G,order:900+N},Nt=_e?Z(Z({},qe),O):qe;t&&Ae&&(this.createFormField(j,Nt,G),this.selectedAdvancedFormPair.update(me=>(me.push(Nt),me))),this.destinationFormPair.update(me=>(me.advanced.push(Nt),me))}}for(let N=0;N<s.length;N++){let u=s[N],f=e?.advanced[u.name],z=f??u.defaultValue;t&&f&&(this.createFormField(j,u,z),this.selectedHttpOptions.update(O=>(O.push(u),O)))}this.destinationFormPair.update(N=>({oauthField:N.oauthField,custom:N.custom.sort((u,f)=>u.order-f.order),dynamic:N.dynamic.sort((u,f)=>u.order-f.order),advanced:N.advanced.sort((u,f)=>u.order-f.order)})),this.destinationForm.controls.destinations.push(tn({key:o.Key,customGroup:B,dynamicGroup:K,advancedGroup:j}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ti=["formRef"],Ei=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),Dt=n=>({$implicit:n}),Di=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Ni=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),Ai=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),hi=()=>({maxWidth:"700px",width:"100%"});function Oi(n,i){n&1&&(E(0,2,2),m(1,"spk-icon"),D())}function yi(n,i){n&1&&A(0,2,3)}function Pi(n,i){if(n&1){let e=P();E(0,2,1),a(1,"button",24),C("click",function(){S(e);let o=p();return T(o.testDestination())}),F(2,Oi,2,0)(3,yi,1,0),r(),D()}if(n&2){let e=p();l(),he("success",e.successfulTest()),l(),g(e.successfulTest()?2:3)}}function ki(n,i){if(n&1){let e=P();a(0,"p",30),C("click",function(){S(e);let o=p();return T(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,5),m(2,"span",31),D(),r()}}function xi(n,i){if(n&1){let e=P();a(0,"div",32)(1,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("file"))}),a(2,"h3"),A(3,6),r(),a(4,"p"),A(5,7),r()(),a(6,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("gcs"))}),a(7,"h3"),c(8,"Google Cloud Storage"),r(),a(9,"p"),A(10,8),r()(),a(11,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("s3"))}),a(12,"h3"),c(13,"S3 compatible bucket"),r(),a(14,"p"),A(15,9),r()(),a(16,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("ssh"))}),a(17,"h3"),c(18,"SSH"),r(),a(19,"p"),A(20,10),r()(),a(21,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("googledrive"))}),a(22,"h3"),c(23,"Google Drive"),r(),a(24,"p"),A(25,11),r()()(),a(26,"p"),A(27,12),r()}}function Ii(n,i){n&1&&be(0)}function $i(n,i){if(n&1&&F(0,Ii,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ei,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Mi(n,i){n&1&&be(0)}function wi(n,i){if(n&1&&F(0,Mi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Di,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ri(n,i){if(n&1){let e=P();E(0,13,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addAdvancedFormPair(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function vi(n,i){n&1&&be(0)}function Gi(n,i){if(n&1&&F(0,vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ni,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function bi(n,i){if(n&1){let e=P();E(0,14,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addHttpOption(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function Vi(n,i){n&1&&be(0)}function Li(n,i){if(n&1&&F(0,Vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ai,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ui(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Bi(n,i){if(n&1&&(a(0,"app-file-tree",43)(1,"label",50),c(2),F(3,Ui,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Ki(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xi(n,i){if(n&1&&(a(0,"app-file-tree",44)(1,"label",50),c(2),F(3,Ki,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function zi(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Hi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"link"),r())}function Wi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"textbox"),r())}function ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,zi,3,1,"spk-tooltip",51),r(),m(4,"input",52),F(5,Hi,2,0,"spk-icon",53)(6,Wi,2,0,"spk-icon",53),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function qi(n,i){if(n&1){let e=P();a(0,"span",57),C("click",function(){S(e);let o=p(2).$implicit,s=p(2);return T(s.oauthStartTokenCreation(o.destinationType))}),c(1,"AuthID"),r()}}function Qi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"password"),r())}function Yi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function Zi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),r(),m(3,"input",54),F(4,qi,2,0,"span",55)(5,Qi,2,0,"spk-icon",53)(6,Yi,2,0,"spk-icon",56)(7,Zi,2,0,"spk-icon",56),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function eo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function to(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function no(n,i){if(n&1&&(a(0,"spk-select")(1,"label",50),c(2),F(3,eo,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,to,2,2,"option",61,w),$(),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function io(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function oo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),wt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function ro(n,i){if(n&1&&(a(0,"spk-select",45)(1,"label",50),c(2),F(3,io,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,oo,2,3,"option",61,w),$(),r()),n&2){let e,t=p().$implicit,o=p(2);_("isFreeText",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.loadOptions(o.injector)())}}function ao(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function lo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function so(n,i){if(n&1&&(a(0,"div",46)(1,"label",50),c(2),F(3,ao,3,1,"spk-tooltip",51),r(),a(4,"div",62)(5,"spk-form-field"),m(6,"input",63),a(7,"spk-icon",53),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",64),I(12,60),R(13,lo,2,2,"option",61,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p(2);_("formGroupName",t.formView.name),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(7),v(o.sizeOptions())}}function po(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function co(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,po,3,1,"spk-tooltip",51),r(),m(4,"input",65),a(5,"spk-icon",53),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function _o(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function mo(n,i){if(n&1&&(a(0,"spk-toggle",47)(1,"label",50),c(2),F(3,_o,3,1,"spk-tooltip",51),r(),m(4,"input",66),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function uo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Fo(n,i){n&1&&(a(0,"spk-option",68),c(1,"None"),r()),n&2&&_("value","None")}function go(n,i){if(n&1&&(a(0,"spk-option",61),c(1),m(2,"spk-checkbox",69),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Co(n,i){if(n&1&&F(0,Fo,2,1,"spk-option",68)(1,go,3,2,"spk-option",61),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function fo(n,i){if(n&1&&(a(0,"spk-select",48)(1,"label",50),c(2),F(3,uo,3,1,"spk-tooltip",51),r(),m(4,"input",67),I(5,60),R(6,Co,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function So(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function To(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,So,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Eo(n,i){if(n&1){let e=P();a(0,"button",70),C("click",function(){S(e);let o=p().$implicit,s=p(2);return T(s.removeFormView(o.formView,0))}),a(1,"spk-icon"),c(2,"x-circle"),r()()}}function Do(n,i){if(n&1&&(a(0,"div",41),I(1,42),F(2,Bi,5,16,"app-file-tree",43)(3,Xi,5,12,"app-file-tree",44)(4,ji,7,12,"spk-form-field")(5,Ji,8,13,"spk-form-field")(6,no,8,11,"spk-select")(7,ro,8,12,"spk-select",45)(8,so,15,11,"div",46)(9,co,7,11,"spk-form-field")(10,mo,5,11,"spk-toggle",47)(11,fo,8,8,"spk-select",48)(12,To,5,11,"spk-form-field"),$(),F(13,Eo,3,0,"button",49),r()),n&2){let e=i.$implicit;he("single-field",e.formGroupName!=="advanced"),l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),l(11),g(e.formGroupName==="advanced"?13:-1)}}function No(n,i){if(n&1&&(I(0,25)(1,34),R(2,$i,1,9,"ng-container",null,w),R(4,wi,1,9,"ng-container",null,w),a(6,"app-toggle-card",35),I(7,36),E(8,13),a(9,"spk-menu")(10,"button",37),m(11,"spk-icon"),r(),I(12,23),R(13,Ri,2,1,"button",38,w),$(),r(),D(),$(),R(15,Gi,1,9,"ng-container",null,w),r(),a(17,"app-toggle-card",35),I(18,36),E(19,14),a(20,"spk-menu")(21,"button",37),m(22,"spk-icon"),r(),I(23,23),R(24,bi,2,1,"button",38,w),$(),r(),D(),$(),R(26,Li,1,9,"ng-container",null,w),r(),F(28,Do,14,5,"ng-template",null,1,at),$()()),n&2){let e=p();l(2),v(e.destinationFormPair().custom),l(2),v(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),v(e.notSelectedAdvancedFormPair()),l(2),v(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedHttpOptions().length===0),l(3),v(e.notSelectedHttpOptions()),l(2),v(e.selectedHttpOptions())}}function Ao(n,i){if(n&1){let e=P();a(0,"spk-dialog",71),Gt("isOpenChange",function(o){S(e);let s=p();return vt(s.targetUrlDialogOpen,o)||(s.targetUrlDialogOpen=o),T(o)}),a(1,"header",72)(2,"h2"),A(3,15),r(),a(4,"spk-alert",73),A(5,16),r()(),a(6,"div",74)(7,"spk-form-field"),m(8,"textarea",75),r()(),a(9,"footer",76)(10,"button",27),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),a(12,"button",77),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!0))}),E(13,17),m(14,"spk-icon"),D(),r()()()}if(n&2){let e=p();Rt("isOpen",e.targetUrlDialogOpen),_("options",bt(3,hi)),l(8),_("formControl",e.targetUrlCtrl)}}var ho=["Bytes","KB","MB","GB","TB","PB"],Et=new ee,en=(n={destinations:[]})=>Et.group({destinations:Et.array(n.destinations)}),tn=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>Et.group({destinationType:Et.control(n),custom:i,dynamic:e,advanced:t}),It=class n{#e=y(te);#n=y(Ce);#i=y(Lt);#o=y(Be);#t=y(pe);#r=y(Xt);injector=y(Mt);formRef=ue.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=x(ho);successfulTest=x(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=H(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#t.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:o=>{let s=o.error.error.Error;if(s==="missing-folder"&&this.#r.open(Le,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:d=>{d&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),s.startsWith("incorrect-cert:")){let d=s.split("incorrect-cert:")[1];this.#r.open(Le,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
2
2
  If this is a self-signed certificate, you can choose to trust this certificate.
3
3
  The server reported the certificate hash: ${d}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:k=>{k&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",d)}})}if(s.startsWith("incorrect-host-key:")){let d=s.split('incorrect-host-key:"')[1].split('",')[0],k=s.split('accepted-host-key:"')[1].split('",')[0];k?this.#r.open(Le,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
4
4
  otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
@@ -1 +1 @@
1
- import{n as g}from"./chunk-L6DT3BQG.js";import"./chunk-DE2AAZUP.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import{b as k}from"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import{a as I}from"./chunk-SZ4NLIO2.js";import{a as N}from"./chunk-QZCTOSPE.js";import{a as O}from"./chunk-PIDBEXSZ.js";import{n as $,o as M,s as b}from"./chunk-EHV3OZDB.js";import{H as P,L as h,Y as E,Z as B}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-OVIL3KMN.js";import{Ab as D,B as m,Eb as s,Fb as p,Gb as n,Mc as A,Qb as d,Ra as r,Rb as c,X as F,fb as f,lb as C,qc as R,tc as _,vb as u}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=F(P);#e=F(g);#a=F(N);#i=F(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=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.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(l=>l.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{T as default};
1
+ import{a as I}from"./chunk-TW4633HQ.js";import{n as g}from"./chunk-4XJFGB4E.js";import"./chunk-3WCWZJYH.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import{b as k}from"./chunk-KFGIVU27.js";import{a as N}from"./chunk-QZCTOSPE.js";import"./chunk-7SJHYZC5.js";import{n as $,o as M,s as b}from"./chunk-AUUCT7OA.js";import{a as O}from"./chunk-PIDBEXSZ.js";import{H as P,L as h,Y as E,Z as B}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as D,B as m,Eb as s,Fb as p,Gb as n,Mc as A,Qb as d,Ra as r,Rb as c,X as F,fb as f,lb as C,qc as R,tc as _,vb as u}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=F(P);#e=F(g);#a=F(N);#i=F(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=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.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(l=>l.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{u as O}from"./chunk-EHV3OZDB.js";import{L as c,Y as A,Z as d}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Eb as e,Fb as t,Gb as T,Sb as o,fb as g}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var l=class a{static \u0275fac=function(n){return new(n||a)};static \u0275cmp=g({type:a,selectors:[["app-about"]],decls:13,vars:0,consts:()=>{let i;i=$localize`General`;let n;n=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;return u=$localize`Logs`,[i,n,r,s,u,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"]]},template:function(n,r){n&1&&(e(0,"spk-tabs",5)(1,"button",6),o(2,0),t(),e(3,"button",7),o(4,1),t(),e(5,"button",8),o(6,2),t(),e(7,"button",9),o(8,3),t(),e(9,"button",10),o(10,4),t()(),e(11,"section"),T(12,"router-outlet"),t())},dependencies:[O,c,A,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
1
+ import{u as O}from"./chunk-AUUCT7OA.js";import{L as c,Y as A,Z as d}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Eb as e,Fb as t,Gb as T,Sb as o,fb as g}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var l=class a{static \u0275fac=function(n){return new(n||a)};static \u0275cmp=g({type:a,selectors:[["app-about"]],decls:13,vars:0,consts:()=>{let i;i=$localize`General`;let n;n=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;return u=$localize`Logs`,[i,n,r,s,u,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"]]},template:function(n,r){n&1&&(e(0,"spk-tabs",5)(1,"button",6),o(2,0),t(),e(3,"button",7),o(4,1),t(),e(5,"button",8),o(6,2),t(),e(7,"button",9),o(8,3),t(),e(9,"button",10),o(10,4),t()(),e(11,"section"),T(12,"router-outlet"),t())},dependencies:[O,c,A,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-SSYD4I7W.js";import"./chunk-6M3MNJ52.js";import"./chunk-PIDBEXSZ.js";import{g as M}from"./chunk-EHV3OZDB.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,Eb as t,Fb as i,Gb as g,Ra as u,Sb as l,X as m,Yb as C,Zb as c,fb as s,ic as O,lb as _}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(h);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,M],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
1
+ import{a as h}from"./chunk-SSYD4I7W.js";import"./chunk-6M3MNJ52.js";import{g as M}from"./chunk-AUUCT7OA.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,Eb as t,Fb as i,Gb as g,Ra as u,Sb as l,X as m,Yb as C,Zb as c,fb as s,ic as O,lb as _}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var v=["*",[["","footer",""]]],T=["*","[footer]"],r=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-custom-card"]],ngContentSelectors:T,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,a){e&1&&(C(v),t(0,"div",0),g(1,"img",1),t(2,"header")(3,"div",2),g(4,"img",3),O(5," Duplicati "),i()(),t(6,"main"),c(7),t(8,"footer"),c(9,1),i()()(),g(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-level-20)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:480px;width:100%;position:relative;z-index:100;background-color:var(--base-level-10);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-level-30);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:480px;transform:translateY(-285px);left:0;right:0;z-index:-2;background:radial-gradient(rgba(var(--primary-rgb-100),1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:480px;width:100%;transform:translateY(-285px);left:0;right:0;z-index:-1;mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:12px;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:10px}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:28px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-level-60R);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function x(n,o){n&1&&(t(0,"h3"),l(1,0),i())}function y(n,o){n&1&&(t(0,"h3"),l(1,1),i(),t(2,"button",3),l(3,2),i())}var d=class n{#e=m(h);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=s({type:n,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let o;o=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let a;return a=$localize`Go to login page`,[o,e,a,["spk-button","","routerLink","/",1,"raised","primary"]]},template:function(e,a){e&1&&(t(0,"app-custom-card"),_(1,x,2,0,"h3")(2,y,4,0),i()),e&2&&(u(),f(a.isLoggingOut()?1:2))},dependencies:[r,M],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{d as default};
@@ -1 +1 @@
1
- import{b as P}from"./chunk-KFGIVU27.js";import{a as S}from"./chunk-PIDBEXSZ.js";import{n as A}from"./chunk-EHV3OZDB.js";import{c as M}from"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,E as p,Eb as i,Fb as r,Gb as _,Ra as m,Sb as C,X as o,Za as c,fb as g,ic as u,jc as E,lb as d,p as l}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=c(!0);generalInfo=P(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),m(5),E(s.generalInfo()))},dependencies:[A],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
1
+ import{b as P}from"./chunk-KFGIVU27.js";import{n as A}from"./chunk-AUUCT7OA.js";import{a as S}from"./chunk-PIDBEXSZ.js";import{c as M}from"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import{Ab as f,E as p,Eb as i,Fb as r,Gb as _,Ra as m,Sb as C,X as o,Za as c,fb as g,ic as u,jc as E,lb as d,p as l}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=c(!0);generalInfo=P(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),m(5),E(s.generalInfo()))},dependencies:[A],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};