@duplicati/ngclient 0.0.83 → 0.0.85

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 (96) hide show
  1. package/chunk-2M52SFS6.js +7 -0
  2. package/chunk-2VH4NDQH.js +1 -0
  3. package/chunk-2WZR3NHU.js +6 -0
  4. package/{chunk-QD57YWCQ.js → chunk-4A4CWPH7.js} +1 -1
  5. package/chunk-4WK5KLP3.js +1 -0
  6. package/chunk-6RMLOIRD.js +1 -0
  7. package/{chunk-5G5KVDTS.js → chunk-7G6LF4RE.js} +1 -1
  8. package/{chunk-DNB4ABNJ.js → chunk-7IPKE42T.js} +1 -1
  9. package/chunk-7IRVNC4S.js +1 -0
  10. package/{chunk-6A6LDFVN.js → chunk-7LP2EQ7M.js} +1 -1
  11. package/{chunk-7AU6BKAH.js → chunk-7LRQSKYZ.js} +1 -1
  12. package/{chunk-TIBSEND5.js → chunk-7QNL2MJX.js} +1 -1
  13. package/chunk-AO6V5EDZ.js +1 -0
  14. package/{chunk-UKAYBL4H.js → chunk-AXHB6A4N.js} +1 -1
  15. package/chunk-AYWJL6PH.js +1 -0
  16. package/{chunk-CSMWKX44.js → chunk-C5EHOW7U.js} +1 -1
  17. package/chunk-CI7PYMKD.js +1 -0
  18. package/{chunk-VIQMN6MJ.js → chunk-DALX7AMG.js} +1 -1
  19. package/{chunk-YTBB644O.js → chunk-DNDOALN6.js} +1 -1
  20. package/chunk-DTCM7OB2.js +1 -0
  21. package/{chunk-NE337TA6.js → chunk-DW725235.js} +1 -1
  22. package/chunk-FMSANFAF.js +1 -0
  23. package/chunk-FQPMHKLD.js +1 -0
  24. package/chunk-FXXGCONI.js +1 -0
  25. package/{chunk-KEKOXSB2.js → chunk-G3KME6QI.js} +1 -1
  26. package/chunk-G56SHWBZ.js +1 -0
  27. package/{chunk-EJVKADW2.js → chunk-IYQIIJKE.js} +1 -1
  28. package/{chunk-IAKOIFIN.js → chunk-IZYAOMPF.js} +1 -1
  29. package/{chunk-BDT56US4.js → chunk-JGOWJDLZ.js} +1 -1
  30. package/{chunk-7GWCXQET.js → chunk-KIB4MYBL.js} +1 -1
  31. package/{chunk-7KVBF3B3.js → chunk-L5D4JLN3.js} +1 -1
  32. package/chunk-LJ3ULEOG.js +1 -0
  33. package/chunk-MADB4EX7.js +1 -0
  34. package/{chunk-MKHNYYLL.js → chunk-MCLDJCPW.js} +1 -1
  35. package/{chunk-PFD5SPQI.js → chunk-MNR2YI5Q.js} +1 -1
  36. package/{chunk-WJOMCF4H.js → chunk-NNUHZ2L7.js} +1 -1
  37. package/chunk-OKERRNQC.js +6 -0
  38. package/{chunk-EWNWUTPO.js → chunk-OQ3EADZK.js} +1 -1
  39. package/{chunk-APZSWRAC.js → chunk-P6HOXQHE.js} +1 -1
  40. package/{chunk-O4IO27RV.js → chunk-PHQM25ND.js} +1 -1
  41. package/{chunk-UVM5AF3P.js → chunk-PNJEVGID.js} +1 -1
  42. package/{chunk-6FEY72H5.js → chunk-PPRHD3ZV.js} +1 -1
  43. package/chunk-R2HH6TYJ.js +1 -0
  44. package/{chunk-2CCKM7DM.js → chunk-RGSJ6UVN.js} +1 -1
  45. package/{chunk-FUZ2WCNJ.js → chunk-RTVM3BJK.js} +1 -1
  46. package/chunk-SWGKS3QC.js +1 -0
  47. package/chunk-TO5QMMUQ.js +1 -0
  48. package/chunk-UIC2LGAH.js +1 -0
  49. package/{chunk-DFGJKS5P.js → chunk-UXQIJ2H5.js} +1 -1
  50. package/chunk-W4MEGIZH.js +1 -0
  51. package/chunk-WLQUMVWA.js +1 -0
  52. package/chunk-WQDSSB2V.js +3 -0
  53. package/{chunk-OVUQHKG5.js → chunk-WWJFELTU.js} +1 -1
  54. package/chunk-X6SCWL5V.js +1 -0
  55. package/{chunk-YF6FW4JS.js → chunk-XB5GDNN5.js} +1 -1
  56. package/{chunk-U27FSIPV.js → chunk-XFS2LSEM.js} +1 -1
  57. package/{chunk-MWZZ2BGA.js → chunk-XKAASYKO.js} +1 -1
  58. package/{chunk-2ICYPGI3.js → chunk-Y2422GIA.js} +1 -1
  59. package/{chunk-U5XRPZBE.js → chunk-Y5WADXF5.js} +1 -1
  60. package/{chunk-H2JFCXJJ.js → chunk-YO6IQOER.js} +1 -1
  61. package/{chunk-6PGJBRJV.js → chunk-YOP6HOXH.js} +1 -1
  62. package/chunk-ZLMSSTXT.js +1 -0
  63. package/chunk-ZNTSJUHI.js +1 -0
  64. package/index.html +2 -2
  65. package/main-JZ3UOPVL.js +1 -0
  66. package/package.json +1 -1
  67. package/styles-HDO6WYV2.css +1 -0
  68. package/chunk-2AXD35RA.js +0 -1
  69. package/chunk-3IMBZVOU.js +0 -1
  70. package/chunk-53YXMY4O.js +0 -1
  71. package/chunk-BNJ6YIRT.js +0 -6
  72. package/chunk-CNKMCZR3.js +0 -1
  73. package/chunk-DHMWOZZD.js +0 -1
  74. package/chunk-EPS56WMH.js +0 -1
  75. package/chunk-GGDGKIVD.js +0 -1
  76. package/chunk-I52AX5MH.js +0 -1
  77. package/chunk-I7CCITLM.js +0 -7
  78. package/chunk-IBBJHMWR.js +0 -1
  79. package/chunk-INATF4ZS.js +0 -1
  80. package/chunk-JZVJHJKF.js +0 -3
  81. package/chunk-KSYEGP4X.js +0 -1
  82. package/chunk-MR65TJSP.js +0 -1
  83. package/chunk-NC3TCAYJ.js +0 -1
  84. package/chunk-NGJEATCE.js +0 -1
  85. package/chunk-PHK42XHX.js +0 -1
  86. package/chunk-PLMZCRFV.js +0 -1
  87. package/chunk-TODNKYG6.js +0 -1
  88. package/chunk-UFBCQOH4.js +0 -1
  89. package/chunk-URCWYHPG.js +0 -1
  90. package/chunk-UUHR4SZC.js +0 -1
  91. package/chunk-UVF6BCW2.js +0 -1
  92. package/chunk-VWJ5QJXJ.js +0 -1
  93. package/chunk-WXWYY4O2.js +0 -1
  94. package/chunk-XDOTOR6Y.js +0 -6
  95. package/main-4O3FFDTG.js +0 -1
  96. package/styles-LPOGBXRK.css +0 -1
package/chunk-BNJ6YIRT.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as We}from"./chunk-INATF4ZS.js";import{a as Ue}from"./chunk-NE337TA6.js";import{a as Nt,b as Wt}from"./chunk-DNHLTHLR.js";import{b as H}from"./chunk-UVM5AF3P.js";import{a as pt}from"./chunk-6PGJBRJV.js";import{a as nt}from"./chunk-FUZ2WCNJ.js";import{a as Re,b as se,c as Ee,d as le,e as ye,f as ct,g as Kt,h as Pe,i as Ge,k as mt,l as Ne,m as be,n as zt,o as Ae,p as ne,q as ut,r as Oe}from"./chunk-MWZZ2BGA.js";import{b as He}from"./chunk-6FEY72H5.js";import{a as De,c as ae}from"./chunk-TODNKYG6.js";import{a as pe,b as _t,d as Xt,e as Ht,g as Ve,i as dt,l as ce,n as Ft,o as jt,r as me,s as ue,x as Le,y as je}from"./chunk-PLMZCRFV.js";import{c as Bt}from"./chunk-MKHNYYLL.js";import{ia as lt}from"./chunk-VWJ5QJXJ.js";import{$b as X,A as Et,Ab as I,Ac as at,Bb as v,Cb as a,Db as r,E as Ze,Eb as _,Fb as W,Gb as q,Hb as Ke,Ib as k,Mc as K,Ob as g,Oc as st,Pb as C,Qb as M,Ra as s,Rb as Je,S as we,Sb as et,Tb as xe,Ub as D,Vb as p,Y as $,Ya as fe,Yb as j,_b as Q,da as f,ea as S,eb as re,ec as Se,fc as Te,gc as he,hc as m,ia as wt,ic as Y,jc as V,kb as d,kc as Pt,l as Dt,mc as Gt,nc as bt,oc as Vt,p as Ye,pa as yt,qa as Rt,tb as c,tc as Lt,ua as O,uc as ze,vb as $e,vc as Ut,wc as tt,yb as F,zb as x}from"./chunk-I7CCITLM.js";import{a as N,c as Mt}from"./chunk-C6Q5SG76.js";var gt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var ke=class e{#e=$(He);s3Providers=H(this.getS3Config("Providers"));s3Regions=H(this.getS3Config("Regions"));s3RegionHosts=H(this.getS3Config("RegionHosts"));s3StorageClasses=H(this.getS3Config("StorageClasses"));storjSatellites=H(this.getStorjConfig("Satellites"));storjAuthenticationMethods=H(this.getStorjConfig("AuthenticationMethods"));openstackProviders=H(this.getOpenstackConfig("Providers"));openstackVersions=H(this.getOpenstackConfig("Versions"));gcsLocations=H(this.getGcsConfig("Locations"));gcsStorageClasses=H(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Ye(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Ye(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Ye(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Ye(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};function Be(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(u=>u.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function G(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ct(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function At(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,new URL("http://localhost"),e);let l=new URL(i);if(!n)throw new Error("Invalid target path");return ve.find(u=>u.customKey===t||u.key===t)?.mapper.from(t,l,e)}var T=new ne,ve=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>T.control(e??"")}},mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],u=i.startsWith("%")?i:"/"+i;return N({destinationType:e,custom:{path:u}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>T.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},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"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(ke).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>O([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return console.log("pathWithoutPrefixSlash",o),N({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>T.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Be(t)+oe(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(ke).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(ke).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],l=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([u])=>u!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Be(n)+oe(o)+l}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Be(n)+oe(o)+i}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+oe(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>T.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>T.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=e.dynamic["use-ssl"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([A])=>A!=="use-ssl"),...Object.entries(u)]);return`${e.destinationType}${h?"s":""}://${t+Be(n)+oe(o)+P}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>T.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>T.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>T.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:l}=e.custom,u={"auth-username":i,"auth-password":l},h=G([...Object.entries(e.advanced),...Object.entries(u)]);return`${e.destinationType}://${t+oe(n)+oe(o)+h}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(ke).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}}];var qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ft=class e{generate(n,t=qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var an=["formRef"];function sn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),Y(t.DisplayName)}}function ln(e,n){if(e&1&&_(0,"spk-progress-bar",38),e&2){let t=p(3);$e("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function pn(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function cn(e,n){e&1&&(g(0,7,1),_(1,"spk-icon"),C())}function mn(e,n){e&1&&(g(0,7,2),_(1,"spk-icon"),C())}function un(e,n){e&1&&(g(0,10,1),_(1,"spk-icon",40),C())}function _n(e,n){e&1&&(g(0,10,2),_(1,"spk-icon"),C())}function dn(e,n){if(e&1){let t=k();a(0,"button",39),D("click",function(){f(t);let i=p(3);return S(i.copyPassword())}),g(1,10),d(2,un,2,0)(3,_n,2,0),C(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Fn(e,n){e&1&&(a(0,"spk-alert",37),M(1,11),r())}function gn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),g(3,6),_(4,"sup"),C(),r(),_(5,"input",30),r(),d(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),_(8,"input",32),d(9,pn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),D("click",function(){f(t);let i=p(2);return S(i.showPassword.set(!i.showPassword()))}),g(12,7),d(13,cn,2,0)(14,mn,2,0),C(),r(),a(15,"button",35),D("click",function(){f(t);let i=p(2);return S(i.generatePassword())}),g(16,8),_(17,"spk-icon"),C(),r(),d(18,dn,4,1,"button",36),r(),d(19,Fn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Cn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),_(3,"input",26),I(4,sn,2,2,"spk-option",27,x),r(),d(6,gn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function fn(e,n){if(e&1&&(a(0,"button",22),g(1,12),_(2,"spk-icon"),C(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Sn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),g(2,13),_(3,"spk-icon"),C(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ne,Qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[Ee.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[Wt()]),password:qe.control(e.password,[Nt(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:qe.control(e.repeatPassword,[Nt(n=>n?.value.encryption!=="",[Ee.required])])}),kt={Key:"",DisplayName:"None"},Ot=class e{#e=$(ae);#t=$(De);#o=$(ft);#i=$(_e);#n=$(pt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=O(!1);copiedPassword=O(!1);showCopyPassword=O(!1);encryptionEffect=st(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=K(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[kt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,an,5),t&2&&Te()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let u;u=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`Encryption`;let P;P=$localize`Encryption`;let A;A=$localize`Password`;let b;b=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$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:`,Z=xe(Z);let U;U=$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 te;te=$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:`,te=xe(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$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",""],o,i,l,u,P,B,Z,U,J,te,E,y,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"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",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"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(t,o){if(t&1){let i=k();a(0,"form",14,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),g(6,2),_(7,"sup"),C(),r(),_(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),M(11,3),r(),_(12,"textarea",19),r(),d(13,Cn,7,2),a(14,"div",20)(15,"button",21),D("click",function(){return f(i),S(o.exit())}),g(16,4),_(17,"spk-icon"),C(),r(),d(18,fn,3,1,"button",22)(19,Sn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Oe,Pe,se,le,ye,Ne,Ae,ce,ue,Ve,pe,me,jt,_t,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-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 Tn=["formRef"],hn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),Dn=e=>({$implicit:e});function En(e,n){e&1&&(g(0,4,1),_(1,"spk-icon",16),C())}function yn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Pn(e,n){e&1&&(a(0,"p",16),M(1,10),r())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.name)}}function An(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",32,2),D("click",function(){let i=f(t).$implicit,l=p();return S(l.addNewOption(i))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function On(e,n){e&1&&Ke(0)}function kn(e,n){if(e&1&&d(0,On,1,0,"ng-container",33),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",ze(5,Dn,Ut(2,hn,o,t)))}}function $n(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xn(e,n){if(e&1&&(a(0,"app-file-tree",36)(1,"label",42),m(2),d(3,$n,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",42),m(2),d(3,In,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"link"),r())}function Rn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"textbox"),r())}function Gn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Mn,3,1,"spk-tooltip",43),r(),_(4,"input",44),d(5,wn,2,0,"spk-icon",45)(6,Rn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function bn(e,n){if(e&1){let t=k();a(0,"span",49),D("click",function(){f(t);let i=p(2).$implicit,l=p();return S(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Vn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"password"),r())}function Ln(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Un(e,n){if(e&1){let t=k();a(0,"spk-icon",50),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function Bn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),r(),_(3,"input",46),d(4,bn,2,0,"span",47)(5,Vn,2,0,"spk-icon",45)(6,Ln,2,0,"spk-icon",48)(7,Un,2,0,"spk-icon",48),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Kn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Xn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",42),m(2),d(3,Kn,3,1,"spk-tooltip",43),r(),_(4,"input",51),I(5,zn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function Hn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function jn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Wn(e,n){if(e&1&&(a(0,"div",38)(1,"label",42),m(2),d(3,Hn,3,1,"spk-tooltip",43),r(),a(4,"div",52)(5,"spk-form-field"),_(6,"input",53),a(7,"spk-icon",45),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",54),I(12,jn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Q("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function qn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,qn,3,1,"spk-tooltip",43),r(),_(4,"input",55),a(5,"spk-icon",45),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-toggle",39)(1,"label",42),m(2),d(3,Yn,3,1,"spk-tooltip",43),r(),_(4,"input",56),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){e&1&&(a(0,"spk-option",58),m(1,"None"),r()),e&2&&c("value","None")}function to(e,n){if(e&1&&(a(0,"spk-option",19),m(1),_(2,"spk-checkbox",59),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function no(e,n){if(e&1&&d(0,eo,2,1,"spk-option",58)(1,to,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function oo(e,n){if(e&1&&(a(0,"spk-select",40)(1,"label",42),m(2),d(3,Jn,3,1,"spk-tooltip",43),r(),_(4,"input",57),I(5,no,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function io(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ro(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,io,3,1,"spk-tooltip",43),r(),_(4,"input",44),r()),e&2){let t,o=p().$implicit;s(),Q("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Q("id","destination-",o.formGroupName,"-",o.index,""),j("formControlName",o.formView.name)}}function ao(e,n){if(e&1){let t=k();a(0,"div",34),W(1,35),d(2,xn,5,14,"app-file-tree",36)(3,vn,5,10,"app-file-tree",37)(4,Gn,7,10,"spk-form-field")(5,Bn,8,11,"spk-form-field")(6,Xn,7,9,"spk-select")(7,Wn,14,9,"div",38)(8,Qn,7,9,"spk-form-field")(9,Zn,5,9,"spk-toggle",39)(10,oo,7,7,"spk-select",40)(11,ro,5,9,"spk-form-field"),q(),a(12,"button",41),D("click",function(){let i=f(t).$implicit,l=p();return S(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Qe=new ne,Yt=["Bytes","KB","MB","GB","TB","PB"],so=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],lo=1024*1024*1024*2,po=1024*1024*5,Zt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Qe.group({remoteVolumeSize:Qe.group({size:Qe.control(e.remoteVolumeSize),unit:Qe.control(e.size)}),backupRetention:Qe.control(e.backupRetention),advancedOptions:Qe.group({})}),$t=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(Yt);retentionOptions=O(so);volumeSizeSignal=H(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Et(300))??Dt(null));volumeUnitSignal=H(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Et(300))??Dt(null));exceededVolumeSize=K(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Yt.indexOf(t));return o>lo||o<po});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Tn,5),t&2&&Te()},decls:46,vars:7,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$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#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let u;u=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let h;h=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let A;return A=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,u,h,P,A,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[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(t,o){if(t&1){let i=k();a(0,"form",11,0),D("submit",function(){return f(i),S(o.submit())}),a(2,"h3",12),M(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),g(8,4),d(9,En,2,0,"spk-icon",16),C(),r(),_(10,"input",17),r(),a(11,"spk-select"),_(12,"input",18),I(13,yn,2,2,"spk-option",19,x),r()(),d(15,Pn,2,0,"p",16),a(16,"p"),g(17,5),a(18,"a",20),_(19,"spk-icon",21),r(),C(),r()(),a(20,"spk-select",22)(21,"label",15),M(22,6),r(),_(23,"input",23),I(24,Nn,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),W(27,25),g(28,7),a(29,"spk-menu")(30,"button",26),_(31,"spk-icon"),r(),W(32,27),I(33,An,3,1,"button",28,x),q(),r(),C(),q(),I(35,kn,1,7,"ng-container",null,x),r(),d(37,ao,15,2,"ng-template",null,1,at),a(39,"div",29)(40,"button",30),D("click",function(){return f(i),S(o.goBack())}),g(41,8),_(42,"spk-icon"),C(),r(),a(43,"button",31),g(44,9),_(45,"spk-icon"),C(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),$e("loader",o.isSubmitting()))},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,lt,Ft,ue,Ve,pe,ce,Le,dt,me,je,We,Ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.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}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.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 co=["formRef"];function mo(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),Y(t.label)}}function uo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),M(3,8),r(),a(4,"input",28,1),D("focus",function(){f(t);let i=he(5);return S(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),_(9,"label",30),a(10,"input",31,2),D("focus",function(){f(t);let i=he(11);return S(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),W(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),M(18,9),r(),_(19,"input",35),r(),a(20,"spk-select",36),_(21,"input",37),I(22,mo,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),W(25,40),M(26,10),q(),a(27,"div",41)(28,"spk-toggle",21),g(29,11),_(30,"input",42),C(),r(),a(31,"spk-toggle",21),g(32,12),_(33,"input",43),C(),r(),a(34,"spk-toggle",21),g(35,13),_(36,"input",44),C(),r(),a(37,"spk-toggle",21),g(38,14),_(39,"input",45),C(),r(),a(40,"spk-toggle",21),g(41,15),_(42,"input",46),C(),r(),a(43,"spk-toggle",21),g(44,16),_(45,"input",47),C(),r(),a(46,"spk-toggle",21),g(47,17),_(48,"input",48),C(),r()()(),q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new ne,Jt=[{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`}],en=(e={autoRun:!0,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}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,co,5),t&2&&Te()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let u;u=$localize`Next time`;let h;h=$localize`Run again every`;let P;P=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,u,h,P,A,b,B,Z,U,J,te,[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"],[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(t,o){if(t&1){let i=k();a(0,"form",18,0),D("submit",function(){return f(i),S(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),g(6,4),_(7,"input",22),C(),r(),a(8,"p"),M(9,5),r()(),d(10,uo,49,2),a(11,"div",23)(12,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(13,6),_(14,"spk-icon"),C(),r(),a(15,"button",25),g(16,7),_(17,"spk-icon"),C(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,Ne,Ae,be,ce,ue,me,Le,pe,Ve,Ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.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 _o(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function Fo(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Y(t.key)}}function go(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r(),I(2,Fo,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function Co(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),D("ngModelChange",function(i){f(t);let l=p(2);return S(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){f(t);let l=p();return S(l.updateStateType(i))}),r(),I(2,_o,2,2,"spk-option",2,x),r(),d(4,go,4,3,"spk-select",0)(5,Co,2,1,"spk-form-field"),a(6,"div",3),D("click",function(){f(t);let i=p();return S(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{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"}],So=[{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"}],St=class e{path=Rt.required();pathChange=yt();remove=yt();expressionOptions=O(tn);fileGroupOptions=O(So);pathState=O(null);typeState=K(()=>{let n=this.pathState();return n?n.type:null});pathEffect=st(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+";return t.startsWith("/")&&t.endsWith("/")?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith("*/")?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith("[^\\/]*]")?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1);if(o==="Folder"){let i=n.expression.endsWith("/"),l=n.expression.startsWith("/");return i&&l?`${t}${n.expression}`:i?`${t}${n.expression}/`:l?`${t}/${n.expression}`:`${t}/${n.expression}/`}return o==="FolderNameIncludes"?`${t}*${n.expression}*/`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\/]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=tn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,fo,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[ut,se,le,Kt,ue,me,pe,ce],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 To=["formRef"];function ho(e,n){if(e&1){let t=k();a(0,"app-filter",42),D("pathChange",function(i){let l=f(t).$index,u=p(2);return S(u.patchPathAt(i,l))})("remove",function(){let i=f(t).$index,l=p(2);return S(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function Do(e,n){if(e&1&&I(0,ho,1,1,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Eo(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function yo(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),_(2,"input",43),r(),a(3,"spk-select"),_(4,"input",44),I(5,Eo,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var Me=new ne,Po=["Bytes","KB","MB","GB","TB","PB"],nn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(e.path),excludes:Me.group({hidden:Me.control(e.excludes.hidden),system:Me.control(e.excludes.system),temporary:Me.control(e.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),It=class e{#e=$(_e);#t=$(ae);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=K(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(Po);pathSignal=H(this.sourceDataForm.controls.path.valueChanges);pathArray=K(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+"))??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(u=>!u.startsWith("-")&&!u.startsWith("+")).join("\0"),l=this.pathArray().map((u,h)=>h===t?`${n}`:`${u}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,u)=>u!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}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 n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,To,5),t&2&&Te()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let l;l=$localize`Temporary files`;let u;u=$localize`Source Data`;let h;h=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let A;A=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let b;b=$localize`Source Data`;let B;B=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let z;z=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let w;w=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],u,h,P,A,b,B,Z,U,J,te,E,y,z,w,ie,ge,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"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",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),D("submit",function(){return f(i),S(o.next())}),a(2,"div",18)(3,"h3",19),M(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),M(7,2),r(),_(8,"input",22),r(),a(9,"div",23)(10,"button",24),D("click",function(){return f(i),S(o.goBack())}),g(11,3),_(12,"spk-icon"),C(),r(),a(13,"button",25),g(14,4),_(15,"spk-icon"),C(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),W(20,28),M(21,6),q(),a(22,"p",29),M(23,7),r(),a(24,"div",30)(25,"spk-form-field"),_(26,"input",31),r(),a(27,"button",32),D("click",function(){return f(i),S(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),W(31,28),M(32,8),q(),a(33,"p",29),M(34,9),r(),a(35,"button",33),D("click",function(){return f(i),S(o.addFilter())}),M(36,10),r(),d(37,Do,2,0),r(),a(38,"app-toggle-card",34),W(39,28),M(40,11),q(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),g(44,13),_(45,"input",36),C(),r(),a(46,"spk-toggle",35),g(47,14),_(48,"input",37),C(),r(),a(49,"spk-toggle",35),g(50,15),_(51,"input",38),C(),r(),a(52,"spk-toggle",39),D("click",function(){return f(i),S(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,yo,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),$e("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[ut,Pe,se,Ge,Re,le,ye,Oe,mt,Ne,Ae,be,ce,me,pe,Ve,ue,Le,We,Ue,St],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 Fe=new ne,_e=class e{#e=$(ae);#t=$(pt);#o=$(He);#i=$(gt);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=K(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=K(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=K(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=H(this.sourceDataForm.valueChanges);destinationFormSignal=H(this.destinationForm.valueChanges);generalFormSignal=H(this.generalForm.valueChanges);encryptionFieldSignal=H(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=H(this.scheduleForm.valueChanges);destinationOptions=K(()=>this.#t.backendModules()??[]);httpOptions=K(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=K(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=K(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[kt,...n]});nonSelectedOptions=K(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,u=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:u&&h?{size:parseInt(h),unit:u.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?At(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=At(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),u=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:u?u.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(u=>u.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,u=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],h=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(h=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([U,J])=>J).map(([U,J])=>U):[],A=i.path?.split("\0")??[],b=this.mapFormsToSettings(),B=Object.entries(i.excludes??{}).filter(([U,J])=>J&&U!=="filesLargerThan").map(([U])=>U),Z=i.excludes?.filesLargerThan;return B.length&&b.push({Name:"--exclude-files-attributes",Value:B.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&b.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:u[0]??null,Sources:A.filter(U=>!U.startsWith("-")),Settings:b,Filters:A.filter(U=>U.startsWith("-")).map((U,J)=>({Order:J,Include:!1,Expression:U.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},u=Object.entries(t.advancedOptions??{}).filter(([h,P])=>h&&P).map(([h,P])=>{let A=n.find(b=>b.name===h);return A?.type==="Size"?{Name:h,Value:`${P.size}${P.unit.toLowerCase()}`}:A?.type==="Integer"?{Name:h,Value:P.toString()}:A?.type==="Boolean"?{Name:h,Value:P.toString()}:{Name:h,Value:P}});return[...i,l,...u]}#a(n){return n.controls.map(t=>Ct(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,l=N({name:n,type:"String",defaultValue:t},o);this.createFormField(i,l,t),this.selectedOptions.update(u=>(u.push(l),u))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,u=this.destinationOptions().find(E=>E.Key===l),h=this.httpOptions();if(!u||!u.Options)return;let P=i&&i.oauthField?i.oauthField:null,A=i&&i.customFields?i.customFields:{},b=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let U=Fe.group({}),J=Fe.group({}),te=Fe.group({});A&&Object.entries(A).forEach(([E,y],z)=>{let ge=y,{formElement:w}=ge,ie=Mt(ge,["formElement"]);U.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(N({order:900+z},ie)),de))});for(let E=0;E<u.Options.length;E++){let y=u.Options[E];if(y.Deprecated)continue;let z=b.find(w=>w===y.Name||w.name===y.Name);if(z){let w=z&&typeof z!="string",ie=w?z?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=w?N(N({},ge),z):ge,rt=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,rt),this.destinationFormPair.update(Xe=>(Xe.dynamic.push(de),Xe))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=B.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,rt={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},Xe=ge?N(N({},rt),ie):rt;o&&de&&(this.createFormField(te,Xe,L),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(Xe),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(Xe),Ce))}}for(let E=0;E<h.length;E++){let y=h[E],z=t?.advanced[y.name],w=z??y.defaultValue;o&&z&&(this.createFormField(te,y,w),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,z)=>y.order-z.order),dynamic:E.dynamic.sort((y,z)=>y.order-z.order),advanced:E.advanced.sort((y,z)=>y.order-z.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:U,dynamicGroup:J,advancedGroup:te}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var No=["formRef"],Ao=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),ht=e=>({$implicit:e}),Oo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),xo=()=>({maxWidth:"700px",width:"100%"});function Io(e,n){e&1&&(g(0,2,2),_(1,"spk-icon"),C())}function vo(e,n){e&1&&M(0,2,3)}function Mo(e,n){if(e&1){let t=k();g(0,2,1),a(1,"button",18),D("click",function(){f(t);let i=p();return S(i.testDestination())}),d(2,Io,2,0)(3,vo,1,0),r(),C()}if(e&2){let t=p();s(),$e("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function wo(e,n){if(e&1){let t=k();a(0,"p",24),D("click",function(){f(t);let i=p();return S(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,5),_(2,"span",25),C(),r()}}function Ro(e,n){if(e&1){let t=k();a(0,"div",30),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),Y(t.displayName),s(2),Y(t.description)}}function Go(e,n){if(e&1){let t=k();a(0,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),V(" ",t.displayName," ")}}function bo(e,n){if(e&1&&(a(0,"div",26),I(1,Ro,5,2,"div",27,x),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),W(6,17),I(7,Go,2,1,"button",29,x),q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function Vo(e,n){e&1&&Ke(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Ao,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Uo(e,n){e&1&&Ke(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,Oo,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ko(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addAdvancedFormPair(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function zo(e,n){e&1&&Ke(0)}function Xo(e,n){if(e&1&&d(0,zo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,ko,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function Ho(e,n){if(e&1){let t=k();g(0,8,1),a(1,"button",31),D("click",function(){let i=f(t).$implicit,l=p(2);return S(l.addHttpOption(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),Je(t.name),et(0)}}function jo(e,n){e&1&&Ke(0)}function Wo(e,n){if(e&1&&d(0,jo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),u=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",ze(7,ht,tt(2,$o,i,o,(t=u.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,u.destinationFormPair().oauthField)))}}function qo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qo(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,qo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",40)(1,"label",46),m(2),d(3,Yo,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function ti(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function ni(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function oi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Jo,3,1,"spk-tooltip",47),r(),_(4,"input",49),d(5,ei,2,0,"spk-icon",50)(6,ti,2,0,"spk-icon",50)(7,ni,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ii(e,n){if(e&1){let t=k();a(0,"span",54),D("click",function(){f(t);let i=p(2).$implicit,l=p(2);return S(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function ri(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function ai(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function si(e,n){if(e&1){let t=k();a(0,"spk-icon",55),D("click",function(){f(t);let i=p(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function li(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),_(3,"input",51),d(4,ii,2,0,"span",52)(5,ri,2,0,"spk-icon",50)(6,ai,2,0,"spk-icon",53)(7,si,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function pi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ci(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function mi(e,n){if(e&1&&I(0,ci,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function ui(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function _i(e,n){if(e&1&&I(0,ui,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function di(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,pi,3,1,"spk-tooltip",47),r(),_(4,"input",48),d(5,mi,2,0)(6,_i,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Fi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function gi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ci(e,n){if(e&1&&I(0,gi,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function fi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Si(e,n){if(e&1&&I(0,fi,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Ti(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,Fi,3,1,"spk-tooltip",47),r(),_(4,"input",57),d(5,Ci,2,0)(6,Si,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function hi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Di(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),Y(t)}}function Ei(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,hi,3,1,"spk-tooltip",47),r(),a(4,"div",58)(5,"spk-form-field"),_(6,"input",59),a(7,"spk-icon",50),m(8,"resize"),r()(),a(9,"spk-select"),_(10,"label")(11,"input",60),I(12,Di,2,2,"spk-option",56,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function yi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Pi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,yi,3,1,"spk-tooltip",47),r(),_(4,"input",61),a(5,"spk-icon",50),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ai(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Ni,3,1,"spk-tooltip",47),r(),_(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function Oi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function $i(e,n){if(e&1&&(a(0,"spk-option",56),m(1),_(2,"spk-checkbox",65),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function xi(e,n){if(e&1&&d(0,ki,2,1,"spk-option",64)(1,$i,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Ii(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,Oi,3,1,"spk-tooltip",47),r(),_(4,"input",63),I(5,xi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),j("formControlName",o.formView.name),s(),v(o.formView.options)}}function vi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Mi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,vi,3,1,"spk-tooltip",47),r(),_(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),j("formControlName",o.formView.name)}}function wi(e,n){if(e&1){let t=k();a(0,"button",66),D("click",function(){f(t);let i=p().$implicit,l=p(2);return S(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Ri(e,n){if(e&1&&(a(0,"div",37),W(1,38),d(2,Qo,5,16,"app-file-tree",39)(3,Zo,5,12,"app-file-tree",40)(4,oi,8,13,"spk-form-field")(5,li,8,13,"spk-form-field")(6,di,7,14,"spk-select",41)(7,Ti,7,14,"spk-select",42)(8,Ei,14,11,"div",43)(9,Pi,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",44)(11,Ii,7,8,"spk-select",45)(12,Mi,5,11,"spk-form-field"),q(),d(13,wi,3,0,"button",28),r()),e&2){let t=n.$implicit;$e("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function Gi(e,n){if(e&1&&(W(0,19)(1,32),I(2,Lo,1,9,"ng-container",null,x),I(4,Bo,1,9,"ng-container",null,x),a(6,"app-toggle-card",33),W(7,34),g(8,7),a(9,"spk-menu")(10,"button",35),_(11,"spk-icon"),r(),W(12,17),I(13,Ko,2,1,"button",29,x),q(),r(),C(),q(),I(15,Xo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",33),W(18,34),g(19,8),a(20,"spk-menu")(21,"button",35),_(22,"spk-icon"),r(),W(23,17),I(24,Ho,2,1,"button",29,x),q(),r(),C(),q(),I(26,Wo,1,9,"ng-container",null,x),r(),d(28,Ri,14,5,"ng-template",null,1,at),q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function bi(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),Vt("isOpenChange",function(i){f(t);let l=p();return bt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),S(i)}),a(1,"header",68)(2,"h2"),M(3,9),r(),a(4,"spk-alert",69),M(5,10),r()(),a(6,"div",70)(7,"spk-form-field"),_(8,"textarea",71),r()(),a(9,"footer",72)(10,"button",21),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),D("click",function(){f(t);let i=p();return S(i.closeTargetUrlDialog(!0))}),g(13,11),_(14,"spk-icon"),C(),r()()()}if(e&2){let t=p();Gt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,xo)),s(8),c("formControl",t.targetUrlCtrl)}}var Vi=["Bytes","KB","MB","GB","TB","PB"],Tt=new ne,on=(e={destinations:[]})=>Tt.group({destinations:Tt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Tt.group({destinationType:Tt.control(e),custom:n,dynamic:t,advanced:o}),vt=class e{#e=$(ae);#t=$(De);#o=$(Bt);#i=$(He);#n=$(_e);#r=$(Ht);injector=$(wt);formRef=fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(Vi);successfulTest=O(!1);destinationTypeOptionsInFocus=O(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=O(ve.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=K(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=K(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=K(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(nt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:u=>{u&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let u=l.split("incorrect-cert:")[1];this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${u}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:h=>{h&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",u)}})}if(l.startsWith("incorrect-host-key:")){let u=l.split('incorrect-host-key:"')[1].split('",')[0],h=l.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${h}
6
- with the REPORTED host key: ${u}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}}):this.#r.open(nt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${u}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,u)}})}}})}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=O("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=O(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=O(!1);#p=O(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,u=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+u);h?.addEventListener("blur",P=>{console.log("event blur",P)}),h?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ze(()=>this.#a.set(!1))).subscribe({next:A=>{console.log("res",A),A?.authid&&this.#p.set(A.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,No,5),t&2&&Te()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=xe(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let u;u=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,u=xe(u);let h;h=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,h=xe(h);let P;P=$localize`Edit target URL`;let A;A=$localize` Be careful, this will overwrite everything you have in your destination. `;let b;return b=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],n,t,o,i,l,u,h,P,A,b,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],["spk-button","","type","button",1,"outlined"],["item","","type","button"],[1,"tile",3,"click"],["item","","type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","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"],[3,"value"],["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"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",12,0),D("submit",function(){return f(i),S(o.next())}),a(2,"header")(3,"h3",13),g(4,2),a(5,"div",14),d(6,Mo,4,3,"button",15),a(7,"spk-menu")(8,"button",16),_(9,"spk-icon"),r(),W(10,17),a(11,"button",18),D("click",function(){return f(i),S(o.openTargetUrlDialog())}),_(12,"spk-icon"),r(),q(),r()(),C(),r(),d(13,wo,3,0,"p"),r(),d(14,bo,9,0)(15,Gi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),D("click",function(){return f(i),S(o.goBack())}),g(18,3),_(19,"spk-icon"),C(),r(),a(20,"button",22),g(21,4),_(22,"spk-icon"),C(),r()()(),d(23,bi,15,4,"spk-dialog",23)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Oe,Pe,se,Ge,Re,le,ye,mt,Ne,Ae,be,zt,lt,ce,ue,Ft,dt,me,pe,Le,je,Xt,_t,Ue,We],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{Ct as a,ve as b,on as c,rn as d,vt as e,Qt as f,kt as g,Ot as h,Zt as i,$t as j,en as k,xt as l,nn as m,It as n,_e as o};
package/chunk-CNKMCZR3.js DELETED
@@ -1 +0,0 @@
1
- import{c as a,d as b,e as c}from"./chunk-BNJ6YIRT.js";import"./chunk-INATF4ZS.js";import"./chunk-NE337TA6.js";import"./chunk-DNHLTHLR.js";import"./chunk-UVM5AF3P.js";import"./chunk-6PGJBRJV.js";import"./chunk-FUZ2WCNJ.js";import"./chunk-MWZZ2BGA.js";import"./chunk-6FEY72H5.js";import"./chunk-TODNKYG6.js";import"./chunk-CSMWKX44.js";import"./chunk-PLMZCRFV.js";import"./chunk-MKHNYYLL.js";import"./chunk-VWJ5QJXJ.js";import"./chunk-I7CCITLM.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
package/chunk-DHMWOZZD.js DELETED
@@ -1 +0,0 @@
1
- import{o as Ae}from"./chunk-BNJ6YIRT.js";import{a as Kt}from"./chunk-INATF4ZS.js";import{a as Qt}from"./chunk-NE337TA6.js";import"./chunk-DNHLTHLR.js";import{a as we,b as te}from"./chunk-UVM5AF3P.js";import{a as Ge}from"./chunk-7GWCXQET.js";import{a as ce}from"./chunk-6PGJBRJV.js";import{a as Ht}from"./chunk-OVUQHKG5.js";import"./chunk-FUZ2WCNJ.js";import{a as bt}from"./chunk-6A6LDFVN.js";import{a as Wt}from"./chunk-IBBJHMWR.js";import"./chunk-7AU6BKAH.js";import"./chunk-7KVBF3B3.js";import"./chunk-3IMBZVOU.js";import"./chunk-UKAYBL4H.js";import{a as Vt,b as j,d as H,e as de,g as me,h as ue,i as Dt,l as Se,m as ge,o as Te,p as fe,q as Ce,r as Ee}from"./chunk-MWZZ2BGA.js";import"./chunk-UFBCQOH4.js";import{b as k}from"./chunk-6FEY72H5.js";import"./chunk-TODNKYG6.js";import"./chunk-CSMWKX44.js";import{a as Ne,b as Lt,g as he,i as Xt,k as zt,l as W,n as Bt,o as Ut,p as qt,q as jt,r as Oe,s as Me,x as Pe,y as Ie}from"./chunk-PLMZCRFV.js";import"./chunk-MKHNYYLL.js";import"./chunk-VWJ5QJXJ.js";import"./chunk-YTBB644O.js";import{Ab as G,Ac as $t,Bb as x,Cb as s,D as Fe,Db as o,E as w,Eb as E,Fb as le,Gb as _e,Hb as yt,Ib as h,L as b,Mc as U,Nc as kt,Ob as D,Oc as q,Pa as Ot,Pb as L,Qb as p,Ra as r,Rb as Y,S as ae,Sb as ee,Tb as pe,Ub as g,Vb as l,Y as N,Ya as Mt,Yb as F,_b as O,aa as Ct,b as St,ba as Et,c as re,da as m,ea as u,eb as V,ec as Rt,fc as vt,gc as Ft,hc as c,ia as Nt,ic as $,jc as I,k as gt,kb as C,l as Z,mc as X,n as Tt,nc as z,oc as B,p as ft,q as ve,qb as Pt,rb as It,sc as wt,ta as ht,tb as S,tc as At,ua as f,uc as Gt,vb as P,vc as xt,y as J,yb as T,zb as A}from"./chunk-I7CCITLM.js";import"./chunk-C6Q5SG76.js";function Zt(i,n,e){!n&&Et(i);let t=n??N(Nt);return e?Ct(t,e):t}function xe(...i){let{normalizedSources:n,hasInitValue:e,operator:t,options:a}=nn(i),_=Zt(xe,a?.injector);return e?te(ve(n).pipe(t),{initialValue:a.initialValue,injector:_}):te(ve(n).pipe(t),{injector:_,requireSync:!0})}function nn(i){if(!i||!i.length||typeof i[0]!="object")throw new TypeError("derivedFrom needs sources");let n=typeof i[1]=="function";if(i.length==3&&!n)throw new TypeError("derivedFrom needs pipeable operator as a second argument");n||i.splice(1,0,St);let[e,t,a]=i,_=!!a&&"initialValue"in a;return{normalizedSources:Object.entries(e).reduce((R,[M,v])=>{if(ht(v))R[M]=we(v,{injector:a?.injector}).pipe(b(kt(v)));else if(Tt(v))R[M]=v.pipe(Fe());else if(typeof v=="function"){let oe=U(v);R[M]=we(oe,{injector:a?.injector}).pipe(b(v()))}else R[M]=gt(v).pipe(Fe());return R},Array.isArray(e)?[]:{}),operator:t,hasInitValue:_,options:a}}var K=class i{#e=N(k);#i=te(this.#e.getApiV1Serversettings());#t=f(void 0);serverSettings=U(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:n=>{this.#t.set(n)}})}withRefresh(){return re(w(()=>this.refreshServerSettings()))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var on=["formRef"],sn=()=>[import("./chunk-QD57YWCQ.js").then(i=>i.NgTemplateOutlet)],rn=(i,n)=>({index:i,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),an=i=>({$implicit:i});function ln(i,n){if(i&1){let e=h();D(0,3,1),s(1,"button",13,2),g("click",function(){let a=m(e).$implicit,_=l();return u(_.addNewOption(a))}),o(),L()}if(i&2){let e=n.$implicit;r(),Y(e.name),ee(0)}}function _n(i,n){i&1&&yt(0)}function pn(i,n){if(i&1&&C(0,_n,1,0,"ng-container",14),i&2){let e=n.$implicit,t=n.$index;l(2);let a=Ft(15);S("ngTemplateOutlet",a)("ngTemplateOutletContext",Gt(5,an,xt(2,rn,t,e)))}}function cn(i,n){if(i&1&&G(0,pn,1,7,"ng-container",null,A),i&2){let e=l();x(e.selectedOptions())}}function dn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function mn(i,n){if(i&1&&(s(0,"app-file-tree",17)(1,"label",23),c(2),C(3,dn,3,1,"spk-tooltip",24),o(),E(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();S("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name)}}function un(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function Sn(i,n){if(i&1&&(s(0,"app-file-tree",18)(1,"label",23),c(2),C(3,un,3,1,"spk-tooltip",24),o(),E(4,"input",25),o()),i&2){let e,t=l().$implicit,a=l();S("startingPath",a.getFormFieldValue(0,t.formGroupName,t.formView.name)),r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name)}}function gn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function Tn(i,n){i&1&&(s(0,"spk-icon",26),c(1,"link"),o())}function fn(i,n){i&1&&(s(0,"spk-icon",26),c(1,"textbox"),o())}function Cn(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",23),c(2),C(3,gn,3,1,"spk-tooltip",24),o(),E(4,"input",25),C(5,Tn,2,0,"spk-icon",26)(6,fn,2,0,"spk-icon",26),o()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name),r(),T(t.formView.type==="Path"?5:6)}}function En(i,n){if(i&1){let e=h();s(0,"span",30),g("click",function(){m(e);let a=l(2).$implicit,_=l();return u(_.oauthStartTokenCreation(a.formViewType))}),c(1,"AuthID"),o()}}function Nn(i,n){i&1&&(s(0,"spk-icon",26),c(1,"password"),o())}function hn(i,n){if(i&1){let e=h();s(0,"spk-icon",31),g("click",function(){m(e);let a=l(2).$implicit;return u(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye "),o()}}function On(i,n){if(i&1){let e=h();s(0,"spk-icon",31),g("click",function(){m(e);let a=l(2).$implicit;return u(a.formView.showPassword=!a.formView.showPassword)}),c(1," eye-slash "),o()}}function Mn(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",23),c(2),o(),E(3,"input",27),C(4,En,2,0,"span",28)(5,Nn,2,0,"spk-icon",26)(6,hn,2,0,"spk-icon",29)(7,On,2,0,"spk-icon",29),o()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name),S("type",t.formView.showPassword?"text":"password"),r(),T(t.oauthField===t.formView.name?4:5),r(2),T(t.formView.showPassword?6:7)}}function Pn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function In(i,n){if(i&1&&(s(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;S("value",e),r(),$(e)}}function yn(i,n){if(i&1&&(s(0,"spk-select")(1,"label",23),c(2),C(3,Pn,3,1,"spk-tooltip",24),o(),E(4,"input",32),G(5,In,2,2,"spk-option",33,A),o()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name),r(),x(t.formView.options)}}function Rn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function vn(i,n){if(i&1&&(s(0,"spk-option",33),c(1),o()),i&2){let e=n.$implicit;S("value",e),r(),$(e)}}function Fn(i,n){if(i&1&&(s(0,"div",19)(1,"label",23),c(2),C(3,Rn,3,1,"spk-tooltip",24),o(),s(4,"div",34)(5,"spk-form-field"),E(6,"input",35),s(7,"spk-icon",26),c(8,"resize"),o()(),s(9,"spk-select"),E(10,"label")(11,"input",36),G(12,vn,2,2,"spk-option",33,A),o()()()),i&2){let e,t=l().$implicit,a=l();S("formGroupName",t.formView.name),r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(3),O("id","destination-",t.formGroupName,"-",t.index,""),r(6),x(a.sizeOptions())}}function wn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function An(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",23),c(2),C(3,wn,3,1,"spk-tooltip",24),o(),E(4,"input",37),s(5,"spk-icon",26),c(6,"numpad"),o()()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name)}}function Gn(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function xn(i,n){if(i&1&&(s(0,"spk-toggle",20)(1,"label",23),c(2),C(3,Gn,3,1,"spk-tooltip",24),o(),E(4,"input",38),o()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name)}}function $n(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function kn(i,n){i&1&&(s(0,"spk-option",40),c(1,"None"),o()),i&2&&S("value","None")}function bn(i,n){if(i&1&&(s(0,"spk-option",33),c(1),E(2,"spk-checkbox",41),o()),i&2){let e=l().$implicit;S("value",e),r(),I(" ",e," ")}}function Vn(i,n){if(i&1&&C(0,kn,2,1,"spk-option",40)(1,bn,3,2,"spk-option",33),i&2){let e=n.$implicit;T(e==="None"?0:1)}}function Dn(i,n){if(i&1&&(s(0,"spk-select",21)(1,"label",23),c(2),C(3,$n,3,1,"spk-tooltip",24),o(),E(4,"input",39),G(5,Vn,2,1,null,null,A),o()),i&2){let e,t=l().$implicit;S("selectMultiple",!0),r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),F("formControlName",t.formView.name),r(),x(t.formView.options)}}function Ln(i,n){if(i&1&&(s(0,"spk-tooltip",24)(1,"spk-icon"),c(2,"question"),o()()),i&2){let e=l(2).$implicit;S("message",e.formView.longDescription)}}function Xn(i,n){if(i&1&&(s(0,"spk-form-field")(1,"label",23),c(2),C(3,Ln,3,1,"spk-tooltip",24),o(),E(4,"input",25),o()),i&2){let e,t=l().$implicit;r(),O("for","destination-",t.formGroupName,"-",t.index,""),r(),I(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),r(),T(t.formView.longDescription?3:-1),r(),O("id","destination-",t.formGroupName,"-",t.index,""),F("formControlName",t.formView.name)}}function zn(i,n){if(i&1){let e=h();s(0,"div",15),le(1,16),C(2,mn,5,14,"app-file-tree",17)(3,Sn,5,10,"app-file-tree",18)(4,Cn,7,10,"spk-form-field")(5,Mn,8,11,"spk-form-field")(6,yn,7,9,"spk-select")(7,Fn,14,9,"div",19)(8,An,7,9,"spk-form-field")(9,xn,5,9,"spk-toggle",20)(10,Dn,7,7,"spk-select",21)(11,Xn,5,9,"spk-form-field"),_e(),s(12,"button",22),g("click",function(){let a=m(e).$implicit,_=l();return u(_.removeFormView(a.formView))}),s(13,"spk-icon"),c(14,"x-circle"),o()()()}if(i&2){let e=n.$implicit;r(),S("formGroupName",e.formGroupName),r(),T(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 bi=new fe,Bn=["Bytes","KB","MB","GB","TB","PB"],Vi=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Di=1024*1024*1024*2,Li=1024*1024*5;var ne=class i{#e=N(Ae);#i=N(K);#t=N(k);formRef=Mt.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=f(!1);isLoadingOptions=f(!0);sizeOptions=f(Bn);serverSettingsEffect=q(()=>{let n=this.#i.serverSettings();if(n===void 0)return;this.isLoadingOptions.set(!0);let e=this.#e.nonSelectedOptions(),t=Object.entries(n);t.forEach(([a,_],y)=>{if(a.startsWith("--")){let R=a.replace("--",""),M=e.find(v=>v.name===R);M!==void 0?this.addNewOption(M,_):this.addFreeTextOption(R,_)}y===t.length-1&&this.isLoadingOptions.set(!1)})});oauthStartTokenCreation(n){}getFormFieldValue(n,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(n){let e="--"+n.name;this.#t.patchApiV1Serversettings({requestBody:{[e]:null}}).subscribe({next:t=>{window.location.reload()}})}addNewOption(n,e){this.#e.addOptionToFormGroup(n,e)}addFreeTextOption(n,e){this.#e.addFreeTextOption(n,e,{})}submit(){this.isSubmitting.set(!0);let n=this.optionsForm.value.advancedOptions;if(!n)return;let e=this.#n(n);this.#t.patchApiV1Serversettings({requestBody:e}).pipe(w(()=>this.isSubmitting.set(!1))).subscribe()}#n(n){let e={};for(let t in n)e[`--${t}`]=n[t];return e}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,t){e&1&&Rt(t.formRef,on,5),e&2&&vt()},features:[wt([Ae])],decls:20,vars:5,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#8\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*10:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#6\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=pe(n);let e;return e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `,[["formRef",""],["fieldTemplate",""],["option",""],n,e,[3,"submit","formGroup"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["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"],[3,"value"],[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 a=h();s(0,"form",5,0),g("submit",function(){return m(a),u(t.submit())}),s(2,"app-toggle-card",6),le(3,7),D(4,3),s(5,"spk-menu")(6,"button",8),E(7,"spk-icon"),o(),le(8,9),G(9,ln,3,1,"button",10,A),_e(),o(),L(),_e(),C(11,cn,2,0),Pt(12,11,sn),o(),C(14,zn,15,2,"ng-template",null,1,$t),s(16,"div",11)(17,"button",12),D(18,4),E(19,"spk-icon"),L(),o()()()}e&2&&(S("formGroup",t.optionsForm),r(2),S("disallowToggle",!0),r(7),x(t.nonSelectedOptions()),r(3),It(!t.isLoadingOptions()),r(5),P("loader",t.isSubmitting()))},dependencies:[Ee,ue,j,Dt,Vt,H,de,Se,Te,ge,Bt,Me,he,Ne,W,Pe,Xt,Oe,Ie,Kt,Qt],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}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.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 Q=class i{#e=N(k);#i=N(ce);repeatRegisterTimer=null;state=f("unknown");claimUrl=f(null);registerUrl=f("");status=U(()=>{let n=this.state();return n==="enabled"?"Remote control is enabled but not connected":n==="connected"?"Remote control is connected":n==="registering"?"Registering machine...":n==="registeringfaulted"?"Registration failed":n==="registered"?"Registered, waiting for accept":n==="disabled"?"Remote control is configured but not enabled":n==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=q(()=>{let n=this.#i.systemInfo();n&&this.registerUrl.set(n.RemoteControlRegistrationUrl??"")});#t(n){n.RegistrationUrl&&this.claimUrl.set(n.RegistrationUrl),n.IsConnected?this.state.set("connected"):n.IsEnabled?this.state.set("enabled"):n.CanEnable?this.state.set("disabled"):n.IsRegisteringFaulted?this.state.set("registeringfaulted"):n.IsRegistering?n.RegistrationUrl!=null&&n.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();console.log("currentState: ",e),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})},5e3)),n.IsRegistering&&n.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t)})}#n(n){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})}deleteRemoteControl(){let n=this;confirm("Are you sure you want to delete the remote control registration?")&&n.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>n.#t(e),error:e=>n.#n(e)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};function Un(i,n){if(i&1){let e=h();s(0,"spk-form-field",10)(1,"input",11),B("ngModelChange",function(a){m(e);let _=l(2);return z(_.registerUrl,a)||(_.registerUrl=a),u(a)}),o()(),s(2,"button",12),g("click",function(){m(e);let a=l(2);return u(a.register())}),p(3,0),o()}if(i&2){let e=l(2);r(),X("ngModel",e.registerUrl)}}function qn(i,n){if(i&1&&(s(0,"div",8)(1,"label"),p(2,1),o(),s(3,"a",13),c(4),o()()),i&2){let e=l(2);r(3),F("href",e.claimUrl(),Ot),r(),$(e.claimUrl())}}function jn(i,n){i&1&&(s(0,"div",8)(1,"label"),p(2,2),o()())}function Hn(i,n){if(i&1){let e=h();s(0,"button",12),g("click",function(){m(e);let a=l(2);return u(a.cancel())}),p(1,3),o()}}function Wn(i,n){if(i&1){let e=h();s(0,"button",12),g("click",function(){m(e);let a=l(2);return u(a.disable())}),p(1,4),o()}}function Kn(i,n){if(i&1){let e=h();s(0,"button",12),g("click",function(){m(e);let a=l(2);return u(a.enable())}),p(1,5),o(),s(2,"button",14),g("click",function(){m(e);let a=l(2);return u(a.delete())}),p(3,6),o()}}function Qn(i,n){if(i&1&&(s(0,"div",7),C(1,Un,4,1)(2,qn,5,2,"div",8)(3,jn,3,0,"div",8)(4,Hn,2,0,"button",9)(5,Wn,2,0,"button",9)(6,Kn,4,0),o()),i&2){let e=l();r(),T(e.state()==="inactive"?1:-1),r(),T(e.state()==="registered"?2:-1),r(),T(e.state()==="registering"?3:-1),r(),T(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),r(),T(e.state()==="connected"||e.state()==="enabled"?5:-1),r(),T(e.state()==="disabled"?6:-1)}}var Re=class i{#e=N(Q);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let n;n=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let t;t=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let y;y=$localize`Enable remote control`;let R;return R=$localize`Delete remote control setup`,[n,e,t,a,_,y,R,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(e,t){e&1&&C(0,Qn,7,6,"div",7),e&2&&T(t.state()!=="unknown"?0:-1)},dependencies:[Ce,j,H,me,W],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Zn=()=>({standalone:!0});function Jn(i,n){i&1&&(s(0,"spk-icon",74),c(1,"check"),o())}function Yn(i,n){i&1&&(s(0,"spk-icon",75),c(1,"prohibit"),o())}function ei(i,n){if(i&1){let e=h();s(0,"button",79),g("click",function(){m(e);let a=l(2);return u(a.updatePassphrase())}),p(1,36),o()}if(i&2){let e=l(2);P("loader",e.isUpdating())}}function ti(i,n){if(i&1){let e=h();s(0,"spk-tooltip",78)(1,"button",80),g("click",function(){m(e);let a=l(2);return u(a.updatePassphrase())}),p(2,37),o()()}if(i&2){let e=l(2);r(),P("loader",e.isUpdating()),S("disabled",!0)}}function ni(i,n){if(i&1){let e=h();s(0,"spk-form-field")(1,"label",70),p(2,33),o(),s(3,"input",71),B("ngModelChange",function(a){m(e);let _=l();return z(_.passphrase,a)||(_.passphrase=a),u(a)}),o()(),s(4,"spk-form-field")(5,"label",72),p(6,34),o(),s(7,"input",73),B("ngModelChange",function(a){m(e);let _=l();return z(_.repeatPassphrase,a)||(_.repeatPassphrase=a),u(a)}),o(),C(8,Jn,2,0,"spk-icon",74)(9,Yn,2,0,"spk-icon",75),o(),s(10,"div",51)(11,"button",76),g("click",function(){m(e);let a=l();return u(a.cancelPasswordChange())}),p(12,35),o(),C(13,ei,2,2,"button",77)(14,ti,3,3,"spk-tooltip",78),o()}if(i&2){let e=l();r(3),X("ngModel",e.passphrase),r(4),S("disabled",e.passphrase().length===0),X("ngModel",e.repeatPassphrase),r(),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),r(3),P("loader",e.isUpdating()),r(2),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function ii(i,n){i&1&&(s(0,"spk-icon",81),c(1,"check"),o())}function oi(i,n){if(i&1){let e=h();s(0,"div",51)(1,"button",76),g("click",function(){m(e);let a=l();return u(a.openPassphraseForm())}),p(2,38),o(),C(3,ii,2,0,"spk-icon",81),o()}if(i&2){let e=l();r(3),T(e.passwordUpdated()?3:-1)}}function si(i,n){if(i&1){let e=h();s(0,"spk-form-field")(1,"label",82),p(2,39),o(),s(3,"textarea",83),B("ngModelChange",function(a){m(e);let _=l();return z(_.allowedHostnames,a)||(_.allowedHostnames=a),u(a)}),o()(),s(4,"spk-alert",84),p(5,40),o(),s(6,"button",79),g("click",function(){m(e);let a=l();return u(a.updateAllowedHostnames())}),p(7,41),o()}if(i&2){let e=l();r(3),X("ngModel",e.allowedHostnames),r(3),P("loader",e.updatingAllowedHosts())}}function ri(i,n){if(i&1&&c(0),i&2){let e,t=l();I(" ",(e=t.sysinfo())==null?null:e.ServerVersion," ")}}function ai(i,n){i&1&&E(0,"spk-progress-bar",56)}function li(i,n){if(i&1&&(s(0,"spk-option",64),c(1),o()),i&2){let e=n.$implicit;S("value",e),r(),$(e)}}function _i(i,n){if(i&1){let e=h();s(0,"spk-option",85),g("click",function(){let a=m(e).$implicit,_=l();return u(_.pauseSettings.controls.timeType.setValue(a.value))}),c(1),o()}if(i&2){let e=n.$implicit;S("value",e.value),r(),I(" ",e.label," ")}}function pi(i,n){if(i&1&&(s(0,"spk-option",64),c(1),o()),i&2){let e=n.$implicit;S("value",e.value),r(),I(" ",e.label," ")}}var ie=new fe,en=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],tn=[{value:"",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],$e=class i{#e=N(Ht);#i=N(ce);#t=N(k);#n=N(K);#r=N(Q);#o=N(bt);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=f("list");previousLang=this.#s;langCtrl=f(this.#s);remoteControlStatus=this.#r.status;settingsForm=ie.group({pauseSettings:ie.group({time:ie.control(0),timeType:ie.control("s")}),usageStatistics:ie.control("")});updatingChannel=f(!1);updateChannel=f("");setNewChannel(n){let e=this.updateChannel();this.updateChannel.set(n),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":n}}).pipe(this.#n.withRefresh(),w(()=>this.updatingChannel.set(!1)),J(()=>(this.updateChannel.set(e),Z(null)))).subscribe()}allowRemoteAccess=f(!1);allowedHostnames=f("");loadedAllowedHostnames=f("");updatingRemoteAccess=f(!1);updatingAllowedHosts=f(!1);updateRemoteAccess(){let n=this.allowRemoteAccess(),e=!n;this.allowRemoteAccess.set(e),e||this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(this.#n.withRefresh(),w(()=>this.updatingRemoteAccess.set(!1)),J(()=>(this.allowRemoteAccess.set(n),Z(null)))).subscribe()}updateAllowedHostnames(){let n=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(this.#n.withRefresh(),w(()=>this.updatingAllowedHosts.set(!1)),J(()=>(this.allowedHostnames.set(n),Z(null)))).subscribe()}updatingDisableTrayIconLogin=f(!1);disableTrayIconLogin=f(!1);saveDisableTrayIconLogin(){let n=this.disableTrayIconLogin(),e=!n;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(this.#n.withRefresh(),w(()=>this.updatingDisableTrayIconLogin.set(!1)),J(()=>(this.disableTrayIconLogin.set(n),Z(null)))).subscribe()}showPassphraseForm=f(!1);isUpdating=f(!1);passphrase=f("");repeatPassphrase=f("");passwordUpdated=f(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(this.#n.withRefresh(),w(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=f(Ge);usageStatisticsOptions=f(tn);timeTypeOptions=f(en);timeOptions=xe([this.pauseSettings.controls.timeType.valueChanges.pipe(b("s")),this.pauseSettings.controls.time.valueChanges.pipe(b(null))],re(ft(([n,e])=>{let t=this.#a(n);return e!==null?t.filter(a=>a.toString().includes(e.toString())):t}),b([])));#a(n){let e=n==="h"?25:61;return new Array(e).fill(0).map((t,a)=>a)}updateLocale(n){let t=n[0]?.value??"";!t||t===""||t===this.previousLang||(this.#o.setItem("locale",t),window.location.reload())}submit(){let n=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":n==="0s"?"":n}}).pipe(this.#n.withRefresh()).subscribe()}serverSettingsEffect=q(()=>{let n=this.#n.serverSettings();if(n===void 0)return;let e=n["startup-delay"],t=e.slice(-1),a=e.slice(0,-1),_=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(a==""?"0":a),timeType:_.includes(t)?t:"s"},usageStatistics:n["usage-reporter-level"]}),this.disableTrayIconLogin.set(n["disable-tray-icon-login"]!=="False"),this.updateChannel.set(n["update-channel"]),this.allowRemoteAccess.set(n["server-listen-interface"]==="any"),this.allowedHostnames.set(n["allowed-hostnames"]),this.loadedAllowedHostnames.set(n["allowed-hostnames"])});languageDisplay(){let n=this;return()=>{let e=n.langCtrl();return e?Ge.find(t=>t.value===e)?.label??null:null}}typeDisplay(){let n=this;return()=>{let e=n.settingsForm.value.pauseSettings?.timeType;return e==null?null:en.find(t=>t.value===e)?.label??null}}usageDisplay(){let n=this;return()=>{let e=n.settingsForm.value.usageStatistics;return e==null?null:tn.find(t=>t.value===e)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-settings"]],decls:139,vars:37,consts:()=>{let n;n=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let t;t=$localize` Save changes `;let a;a=$localize`Remote access control`;let _;_=$localize`Color theme`;let y;y=$localize`Customize your application theme`;let R;R=$localize`Passwords`;let M;M=$localize`Change server passphrase`;let v;v=$localize`Language`;let oe;oe=$localize`Select a language for the platform`;let ke;ke=$localize`Allow remote access (requires restart)`;let be;be=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Ve;Ve=$localize`Allow remote access`;let De;De=$localize`Prevent tray icon automatic log-in`;let Le;Le=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Xe;Xe=$localize`Prevent tray icon automatic log-in`;let ze;ze=$localize`Update channel`;let Be;Be=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ue;Ue=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Stable`;let je;je=$localize`Official releases`;let He;He=$localize`Beta`;let We;We=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Ke;Ke=$localize` Experimental `;let Qe;Qe=$localize`Specific builds for developers only. Not for use with important data.`;let Ze;Ze=$localize`Canary`;let Je;Je=$localize`Individual builds for developers only. Not for use with important data.`;let Ye;Ye=$localize`Pause after startup or hibernation`;let et;et=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let tt;tt=$localize`Usage statistics`;let se;se=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#125\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#125\uFFFD"}:CLOSE_LINK:${"[\uFFFD#126\uFFFD\uFFFD/#126\uFFFD|\uFFFD#127\uFFFD\uFFFD/#127\uFFFD]"}:LINE_BREAK:${"[\uFFFD#126\uFFFD\uFFFD/#126\uFFFD|\uFFFD#127\uFFFD\uFFFD/#127\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,se=pe(se);let nt;nt=$localize`Advanced options`;let it;it=$localize`Enter new password`;let ot;ot=$localize`Repeat password`;let st;st=$localize`Password have to be filled and have to match`;let rt;rt=$localize`Passphrase`;let at;at=$localize`Repeat passphrase`;let lt;lt=$localize`Cancel`;let _t;_t=$localize` Update passphrase `;let pt;pt=$localize` Update passphrase `;let ct;ct=$localize`Change password`;let dt;dt=$localize`Allowed hostnames`;let mt;mt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ut;return ut=$localize` Update allowed hostnames `,[["input",""],n,e,t,a,_,y,R,M,v,oe,ke,be,Ve,De,Le,Xe,ze,Be,Ue,qe,je,He,We,Ke,Qe,Ze,Je,Ye,et,tt,se,nt,rt,at,lt,_t,pt,ct,dt,mt,ut,[1,"content"],[1,"title"],["type","submit","spk-button","",1,"raised","primary",3,"click","disabled"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"selectedOptionsChange","options","isClearable","inlineSearch"],["type","text",3,"ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"submit","formGroup"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",it,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ot,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",st,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],[3,"click","value"]]},template:function(e,t){if(e&1){let a=h();E(0,"app-status-bar"),s(1,"div",42)(2,"header")(3,"div",43)(4,"h2"),p(5,1),o(),s(6,"p"),p(7,2),o()(),s(8,"button",44),g("click",function(){return m(a),u(t.submit())}),p(9,3),o()(),s(10,"section")(11,"div",45)(12,"h3"),p(13,4),o(),s(14,"p"),c(15),o()(),s(16,"div",46),E(17,"app-remote-control"),o()(),s(18,"section")(19,"div",45)(20,"h3"),p(21,5),o(),s(22,"p"),p(23,6),o()(),s(24,"div",46)(25,"div",47)(26,"img",48),g("click",function(){return m(a),u(t.setLightMode())}),o(),s(27,"img",49),g("click",function(){return m(a),u(t.setDarkMode())}),o()()()(),s(28,"section")(29,"div",45)(30,"h3"),p(31,7),o(),s(32,"p"),p(33,8),o()(),s(34,"div",50),C(35,ni,15,7)(36,oi,4,1,"div",51),o()(),s(37,"section")(38,"div",45)(39,"h3"),p(40,9),o(),s(41,"p"),p(42,10),o()(),s(43,"div",46)(44,"spk-select-new",52),g("selectedOptionsChange",function(y){return m(a),u(t.updateLocale(y))}),E(45,"input",53,0),o()()(),s(47,"section")(48,"div",45)(49,"h3"),p(50,11),o(),s(51,"p"),p(52,12),o()(),s(53,"div",54)(54,"spk-toggle",55),g("click",function(){return m(a),u(t.updateRemoteAccess())}),s(55,"label"),p(56,13),o()(),C(57,si,8,3),o()(),s(58,"section")(59,"div",45)(60,"h3"),p(61,14),o(),s(62,"p"),p(63,15),o()(),s(64,"div",46)(65,"spk-toggle",55),g("click",function(){return m(a),u(t.saveDisableTrayIconLogin())}),s(66,"label"),p(67,16),o()()()(),s(68,"section")(69,"div",45)(70,"h3"),p(71,17),o(),s(72,"p"),C(73,ri,1,1),o(),C(74,ai,1,0,"spk-progress-bar",56),o(),s(75,"div",57)(76,"div",58),g("click",function(){return m(a),u(t.setNewChannel(""))}),s(77,"spk-radio",59),p(78,18),o(),s(79,"p"),p(80,19),o()(),s(81,"div",58),g("click",function(){return m(a),u(t.setNewChannel("stable"))}),s(82,"spk-radio",59),p(83,20),o(),s(84,"p"),p(85,21),o()(),s(86,"div",58),g("click",function(){return m(a),u(t.setNewChannel("beta"))}),s(87,"spk-radio",59),p(88,22),o(),s(89,"p"),p(90,23),o()(),s(91,"div",58),g("click",function(){return m(a),u(t.setNewChannel("experimental"))}),s(92,"spk-radio",59),p(93,24),o(),s(94,"p"),p(95,25),o()(),s(96,"div",58),g("click",function(){return m(a),u(t.setNewChannel("canary"))}),s(97,"spk-radio",59),p(98,26),o(),s(99,"p"),p(100,27),o()()()()(),E(101,"spk-divider"),s(102,"form",60),g("submit",function(){return m(a),u(t.submit())}),s(103,"section")(104,"div",45)(105,"h3"),p(106,28),o(),s(107,"p"),p(108,29),o()(),s(109,"div",46)(110,"div",61)(111,"spk-select",62),E(112,"input",63),G(113,li,2,2,"spk-option",64,A),o(),s(115,"spk-select",65),E(116,"input",66),G(117,_i,2,2,"spk-option",64,A),o()()()(),s(119,"section")(120,"div",45)(121,"h3"),p(122,30),o(),s(123,"p"),D(124,31),E(125,"a",67)(126,"br")(127,"br"),L(),o()(),s(128,"div",46)(129,"spk-select",68),E(130,"input",69),G(131,pi,2,2,"spk-option",64,A),o()()(),s(133,"section")(134,"div",45)(135,"h3"),p(136,32),o()(),s(137,"div",46),E(138,"app-advanced-options-settings"),o()()()}if(e&2){let a,_,y;r(8),S("disabled",t.settingsForm.untouched),r(7),$(t.remoteControlStatus()),r(11),P("active",!t.isDarkMode()),r(),P("active",t.isDarkMode()),r(8),T(t.showPassphraseForm()?35:36),r(9),S("options",t.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),S("ngModel",t.langCtrl())("ngModelOptions",At(36,Zn)),r(9),P("active",t.allowRemoteAccess()),r(3),T(t.allowRemoteAccess()?57:-1),r(8),P("active",t.disableTrayIconLogin()),r(8),T(t.updateChannel()!==""&&((a=t.sysinfo())!=null&&a.ServerVersion)?73:-1),r(),T(t.updatingChannel()?74:-1),r(3),P("active",t.updateChannel()===""),r(),Y((_=t.sysinfo())==null?null:_.DefaultUpdateChannel),ee(78),r(2),Y((y=t.sysinfo())==null?null:y.ServerVersionType),ee(80),r(2),P("active",t.updateChannel()==="stable"),r(5),P("active",t.updateChannel()==="beta"),r(5),P("active",t.updateChannel()==="experimental"),r(5),P("active",t.updateChannel()==="canary"),r(5),S("formGroup",t.settingsForm),r(9),S("hideClearButton",!0),r(2),x(t.timeOptions()),r(2),S("displayFn",t.typeDisplay())("hideClearButton",!0),r(2),x(t.timeTypeOptions()),r(12),S("displayFn",t.usageDisplay()),r(2),x(t.usageStatisticsOptions())}},dependencies:[Ce,ue,j,H,de,me,Ee,Se,Te,ge,Wt,Re,ne,Oe,he,qt,Me,Ut,Pe,Ie,W,Ne,zt,Lt,jt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{$e as default};
package/chunk-EPS56WMH.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-H2JFCXJJ.js";import"./chunk-INATF4ZS.js";import"./chunk-NE337TA6.js";import"./chunk-UVM5AF3P.js";import"./chunk-6PGJBRJV.js";import"./chunk-MWZZ2BGA.js";import"./chunk-6FEY72H5.js";import"./chunk-TODNKYG6.js";import"./chunk-CSMWKX44.js";import"./chunk-PLMZCRFV.js";import"./chunk-MKHNYYLL.js";import"./chunk-VWJ5QJXJ.js";import"./chunk-I7CCITLM.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
package/chunk-GGDGKIVD.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-XDOTOR6Y.js")},{path:"encryption",loadComponent:()=>import("./chunk-UVF6BCW2.js")},{path:"select-files",loadComponent:()=>import("./chunk-53YXMY4O.js")},{path:"options",loadComponent:()=>import("./chunk-EPS56WMH.js")}],o=t;export{o as default};
package/chunk-I52AX5MH.js DELETED
@@ -1 +0,0 @@
1
- import{f as a,g as b,h as c}from"./chunk-BNJ6YIRT.js";import"./chunk-INATF4ZS.js";import"./chunk-NE337TA6.js";import"./chunk-DNHLTHLR.js";import"./chunk-UVM5AF3P.js";import"./chunk-6PGJBRJV.js";import"./chunk-FUZ2WCNJ.js";import"./chunk-MWZZ2BGA.js";import"./chunk-6FEY72H5.js";import"./chunk-TODNKYG6.js";import"./chunk-CSMWKX44.js";import"./chunk-PLMZCRFV.js";import"./chunk-MKHNYYLL.js";import"./chunk-VWJ5QJXJ.js";import"./chunk-I7CCITLM.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};