@duplicati/ngclient 0.0.92 → 0.0.94

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 (57) hide show
  1. package/chunk-2ZYPGUOW.js +6 -0
  2. package/chunk-47XDI5B5.js +1 -0
  3. package/{chunk-5K5OVVFG.js → chunk-4MLA2ZG7.js} +1 -1
  4. package/{chunk-D5FLTSFX.js → chunk-6XMTMDI4.js} +1 -1
  5. package/{chunk-FQFWBJUG.js → chunk-7B4DII5K.js} +1 -1
  6. package/chunk-7LD5V64E.js +1 -0
  7. package/{chunk-H5MRRHWD.js → chunk-7NYCYOKS.js} +1 -1
  8. package/{chunk-T7OI3WCX.js → chunk-7XMYLRVX.js} +1 -1
  9. package/{chunk-SXG7ELTX.js → chunk-CMNODR42.js} +1 -1
  10. package/chunk-ECH6I3YN.js +1 -0
  11. package/chunk-FF6XUK27.js +1 -0
  12. package/chunk-FYSTW7IN.js +1 -0
  13. package/{chunk-K5CDXUNJ.js → chunk-G2H5UWAV.js} +1 -1
  14. package/{chunk-S2HUIFXX.js → chunk-HAZC7QF4.js} +1 -1
  15. package/chunk-IY2EGNYQ.js +1 -0
  16. package/{chunk-LTLQ72IT.js → chunk-KJ3CPTGU.js} +1 -1
  17. package/{chunk-W6H5Q4WY.js → chunk-L667SCU5.js} +1 -1
  18. package/{chunk-WTDHHP4P.js → chunk-L7FLOT6V.js} +1 -1
  19. package/{chunk-BTUWHZ4Y.js → chunk-LGGACMIA.js} +1 -1
  20. package/{chunk-HSX4KVKU.js → chunk-NWVBCPMZ.js} +1 -1
  21. package/{chunk-KSYIZI2Y.js → chunk-OVA6G4AJ.js} +2 -2
  22. package/{chunk-YTANHV3N.js → chunk-P5DXOHSO.js} +1 -1
  23. package/chunk-PQWBOXD7.js +1 -0
  24. package/{chunk-G7PFETH3.js → chunk-PVBMNMGK.js} +1 -1
  25. package/{chunk-56KHHHDE.js → chunk-PWQHMEDY.js} +1 -1
  26. package/{chunk-T4C5WIW2.js → chunk-PZSY4DRF.js} +1 -1
  27. package/{chunk-VQ73M67Z.js → chunk-Q67EYU7V.js} +1 -1
  28. package/{chunk-TGSA7TZP.js → chunk-QJWNFRD3.js} +1 -1
  29. package/{chunk-FQCR6FN2.js → chunk-QPRM4V75.js} +1 -1
  30. package/{chunk-QSTOMEKL.js → chunk-RKQDFV7W.js} +1 -1
  31. package/{chunk-PB47CMLR.js → chunk-SK4EP46J.js} +1 -1
  32. package/{chunk-M65ENIIN.js → chunk-T3IB73UA.js} +1 -1
  33. package/{chunk-L2RC357S.js → chunk-UENFWA7U.js} +2 -2
  34. package/{chunk-ZR2DCXJI.js → chunk-VKM32I64.js} +1 -1
  35. package/{chunk-UFLMIMYM.js → chunk-VTG6KYFA.js} +1 -1
  36. package/{chunk-HDHK74DC.js → chunk-WAE42BEK.js} +1 -1
  37. package/{chunk-TDMCIOHL.js → chunk-WVLWUQUO.js} +1 -1
  38. package/chunk-WZQNMWLT.js +1 -0
  39. package/chunk-XR74M6VT.js +1 -0
  40. package/{chunk-ALVXVMTO.js → chunk-YKV265HA.js} +1 -1
  41. package/{chunk-YTTGU3HX.js → chunk-Z5XE4ZV2.js} +1 -1
  42. package/{chunk-HYROAHLG.js → chunk-ZA4X5BZG.js} +1 -1
  43. package/index.html +2 -2
  44. package/{main-A6WCVNIG.js → main-XIRMJMWZ.js} +1 -1
  45. package/package.json +1 -1
  46. package/styles-XDXFMHQT.css +1 -0
  47. package/chunk-72574KO2.js +0 -1
  48. package/chunk-BRBZMNCZ.js +0 -1
  49. package/chunk-CRREGVJC.js +0 -1
  50. package/chunk-GBNJJFEH.js +0 -1
  51. package/chunk-GFSY2TNF.js +0 -1
  52. package/chunk-H5K6VMSB.js +0 -1
  53. package/chunk-LZVTWC4S.js +0 -6
  54. package/chunk-S75BU6NQ.js +0 -1
  55. package/chunk-SRIKTKDW.js +0 -1
  56. package/chunk-UNTTIERD.js +0 -1
  57. package/styles-PH7LRMW2.css +0 -1
@@ -0,0 +1,6 @@
1
+ import{a as We}from"./chunk-L7FLOT6V.js";import{a as qe}from"./chunk-Q67EYU7V.js";import{a as wt,b as Zt}from"./chunk-DNHLTHLR.js";import{a as U}from"./chunk-N5K6ODRA.js";import{a as He}from"./chunk-47XDI5B5.js";import{a as at}from"./chunk-CK5N2PPF.js";import{a as Le,b as ie,c as De,d as re,e as Ee,f as Ct,g as St,h as ye,i as Pe,l as ft,m as Oe,n as Ge,o as Yt,p as Ne,q as ae,r as je,s as Ae}from"./chunk-4IJQ7AAQ.js";import{b as ze}from"./chunk-KLIPTMVG.js";import{a as Te,c as pe}from"./chunk-AIOUSVMR.js";import{a as te,b as dt,d as Wt,e as qt,g as he,l as ne,n as Ft,o as gt,r as oe,w as Qt,x as be,y as Xe}from"./chunk-ECH6I3YN.js";import{c as jt}from"./chunk-V5GVLIPJ.js";import{ia as Ht}from"./chunk-2HS3CYRN.js";import{A as At,Ab as s,Bb as a,Cb as _,D as tt,Db as X,Eb as H,Fb as ot,Gb as y,Lc as b,Mb as T,Mc as _t,Nb as h,Ob as I,Pb as Be,Qa as l,Qb as Ke,R as Re,Rb as Ie,Sb as f,Tb as p,Wb as _e,X as x,Xa as Ce,Yb as V,Zb as B,_a as zt,ca as F,cc as Se,da as g,db as J,dc as fe,ec as ee,fc as u,gc as $t,ha as Kt,hc as w,ib as d,ic as Xt,kc as pt,l as Nt,lc as ct,mc as mt,nc as xt,oa as kt,oc as It,p as et,pa as nt,pc as Mt,rb as m,rc as ut,sa as A,sc as it,tb as xe,uc as rt,wb as S,xb as q,yb as Q,yc as ve,zb as Y}from"./chunk-DTPZU6NP.js";import{a as N,b as lt,c as Bt}from"./chunk-C6Q5SG76.js";var Tt=class t{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var $e=class t{#e=x(ze);s3Providers=U(this.getS3Config("Providers"));s3Regions=U(this.getS3Config("Regions"));s3RegionHosts=U(this.getS3Config("RegionHosts"));s3StorageClasses=U(this.getS3Config("StorageClasses"));storjSatellites=U(this.getStorjConfig("Satellites"));storjAuthenticationMethods=U(this.getStorjConfig("AuthenticationMethods"));openstackProviders=U(this.getOpenstackConfig("Providers"));openstackVersions=U(this.getOpenstackConfig("Versions"));gcsLocations=U(this.getGcsConfig("Locations"));gcsStorageClasses=U(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(et(e=>this.#t(e)))}createS3IamUser(n,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":e}})}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(et(e=>this.#t(e)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(et(e=>this.#t(e)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(et(e=>this.#t(e)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([e,o])=>({key:e,value:o})))??[]}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ve(t){return t==null?"":":"+t.toString()}function se(t){return t==null?"":t.startsWith("/")?t:"/"+t}function R(t,n){let e={},o={};return n.searchParams.forEach((i,r)=>{Me.find(c=>c.key===t)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):e[r]=decodeURIComponent(i)}),{advanced:e,dynamic:o}}function v(t,n=!1){let e=t.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return e?(n?"":"?")+e:""}function ht(t){let n=t.destinationType,e=Me.find(o=>o.customKey===n||o.key===n);if(!e)throw new Error("Invalid destination type");return e?.mapper.to(t)??""}function Rt(t){let n=URL.canParse(t),e=t.split("://")[0],o=t.split("://")[1],i="http://"+o;if(o.startsWith("%")&&e==="file")return Me.find(r=>r.customKey===e||r.key===e)?.mapper.from(e,new URL("http://localhost"),t);try{let r=new URL(i);return Me.find(c=>c.customKey===e||c.key===e)?.mapper.from(e,r,t)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var D=new ae,Me=[{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:t=>D.control(t??"")}},mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>{let i=e.startsWith("file:///")?e.split("file:///")[1]:e.split("file://")[1],r=i.startsWith("%"),C=i.slice(1).startsWith(":\\")||r?i:"/"+i;return N({destinationType:t,custom:{path:C}},R(t,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:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>D.control(t??"",[De.required,De.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},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:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,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:t=>D.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).s3StorageClasses}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},R(t,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:t=>D.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get($e).gcsStorageClasses},"authid"],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>A([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>{let o=n.pathname.replace(/^\//,"");return N({destinationType:t,custom:{server:n.hostname,path:o}},R(t,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:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},R(t,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:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,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:t=>D.control(t??"",[De.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.hostname+n.pathname}},R(t,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:o,path:i}=t.custom;return`${t.destinationType}://${o+Ve(e)+se(i)+n}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,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:t=>{let n=t.dynamic["rclone-remote-repository"],e=t.dynamic["rclone-remote-path"],o=Object.entries(t.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=v([...Object.entries(t.advanced),...o]);return`${t.destinationType}://${n}/${e+i}`},from:(t,n,e)=>{let{advanced:o,dynamic:i}=R(t,n);return N({destinationType:t,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:t=>D.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get($e).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get($e).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let n=v([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:e}=t.custom;return`${t.destinationType}://${e+n}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},R(t,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:o}=t.custom,i=t.dynamic["use-ssl"],r=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([c])=>c!=="use-ssl")]);return`${t.destinationType}${i?"s":""}://${e+Ve(n)+se(o)+r}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:o}=t.custom,i=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([r])=>r!=="use-ssl")]);return`${t.destinationType}://${e+Ve(n)+se(o)+i}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,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:t=>D.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let n=t.custom.server,e=t.dynamic["sia-targetpath"],o=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${t.destinationType}://${n+se(e)+o}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname}},R(t,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:t=>D.control(t??"")}},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:t=>{let n=t.custom.path,e=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${t.destinationType}://${n+e}`},from:(t,n,e)=>N({destinationType:t,custom:{path:n.pathname}},R(t,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:t=>D.control(t??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:t=>D.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:n,server:e,path:o,username:i,password:r}=t.custom,c={"auth-username":i,"auth-password":r},C=t.dynamic["use-ssl"],O=v([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([E])=>E!=="use-ssl"),...Object.entries(c)]);return`${t.destinationType}${C?"s":""}://${e+Ve(n)+se(o)+O}`},from:(t,n,e)=>N({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(t,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>D.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>D.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>D.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:n,server:e,path:o,username:i,password:r}=t.custom,c={"auth-username":i,"auth-password":r},C=v([...Object.entries(t.advanced),...Object.entries(c)]);return`${t.destinationType}://${e+se(n)+se(o)+C}`},from:(t,n,e)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:t,custom:{server:n.hostname,share:o,path:i}},R(t,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:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${v([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>N({destinationType:t},R(t,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:t=>t.get($e).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:t=>`storj://storj.io/config?storj-auth-method=API%20key&${v([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>N({destinationType:t},R(t,n))}}];var Jt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Dt=class t{generate(n,e=Jt){let o;do o=this.generatePassword(n,e);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,e=Jt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),e.test(i))return i},this).join("")}calculatePasswordStrength(n){let e=1;return n.length>=8&&e++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&e++,n.match(/\d+/)&&e++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,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(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var cn=["formRef"];function mn(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e.DisplayName," ")}}function un(t,n){if(t&1&&_(0,"spk-progress-bar",37),t&2){let e=p(3);xe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),m("value",e.calculatePasswordStrength()*(100/5))}}function _n(t,n){t&1&&(s(0,"span",32),I(1,9),a())}function dn(t,n){t&1&&(T(0,7,1),_(1,"spk-icon"),h())}function Fn(t,n){t&1&&(T(0,7,2),_(1,"spk-icon"),h())}function gn(t,n){t&1&&(T(0,10,1),_(1,"spk-icon",39),h())}function Cn(t,n){t&1&&(T(0,10,2),_(1,"spk-icon"),h())}function Sn(t,n){if(t&1){let e=y();s(0,"button",38),f("click",function(){F(e);let i=p(3);return g(i.copyPassword())}),T(1,10),d(2,gn,2,0)(3,Cn,2,0),h(),a()}if(t&2){let e=p(3);l(2),S(e.copiedPassword()?2:3)}}function fn(t,n){t&1&&(s(0,"spk-alert",36),I(1,11),a())}function Tn(t,n){if(t&1){let e=y();s(0,"div",27)(1,"spk-form-field")(2,"label",28),T(3,6),_(4,"sup"),h(),a(),_(5,"input",29),a(),d(6,un,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),_(8,"input",31),d(9,_n,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),f("click",function(){F(e);let i=p(2);return g(i.showPassword.set(!i.showPassword()))}),T(12,7),d(13,dn,2,0)(14,Fn,2,0),h(),a(),s(15,"button",34),f("click",function(){F(e);let i=p(2);return g(i.generatePassword())}),T(16,8),_(17,"spk-icon"),h(),a(),d(18,Sn,4,1,"button",35),a(),d(19,fn,2,0,"spk-alert",36),a()}if(t&2){let e=p(2);l(5),m("type",e.showPassword()?"text":"password"),l(),S(e.generalForm.value.password?6:-1),l(2),m("type",e.showPassword()?"text":"password"),l(),S(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),S(e.showPassword()?13:14),l(5),S(e.showCopyPassword()?18:-1),l(),S(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function hn(t,n){if(t&1&&(s(0,"spk-select",24)(1,"label",25),I(2,5),a(),_(3,"input",26),d(4,mn,1,1,"ng-template"),a(),d(5,Tn,20,7,"div",27)),t&2){let e=p();m("options",e.encryptionOptions())("isClearable",!1),l(5),S(e.encryptionFieldSignal()!==""?5:-1)}}function Dn(t,n){if(t&1&&(s(0,"button",22),T(1,12),_(2,"spk-icon"),h(),a()),t&2){let e=p();m("disabled",e.generalForm.invalid)}}function En(t,n){if(t&1&&(s(0,"spk-tooltip",23)(1,"button",22),T(2,13),_(3,"spk-icon"),h(),a()()),t&2){let e=p();m("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),m("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Qe=new ae,en=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Qe.group({name:Qe.control(t.name,[De.required]),description:Qe.control(t.description),encryption:Qe.control(t.encryption,[Zt()]),password:Qe.control(t.password,[wt(n=>n?.value.encryption!=="",[De.required])]),repeatPassword:Qe.control(t.repeatPassword,[wt(n=>n?.value.encryption!=="",[De.required])])}),bt={Key:"",DisplayName:"None"},vt=class t{#e=x(pe);#t=x(Te);#o=x(Dt);#i=x(ce);#n=x(He);formRef=Ce.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=A(!1);copiedPassword=A(!1);showCopyPassword=A(!1);encryptionEffect=_t(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=b(()=>{let e=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});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 e=>{let o=[bt,...n].find(i=>i.Key===e);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(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-general"]],viewQuery:function(e,o){e&1&&Se(o.formRef,cn,5),e&2&&fe()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$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 r;r=$localize`Backup description`;let c;c=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let C;C=$localize`Encryption`;let O;O=$localize`Encryption`;let E;E=$localize`Password`;let K;K=$localize`Repeat password`;let z;z=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let $;$=$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:`,$=Ie($);let j;j=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let me;me=$localize`Passwords do not match`;let Z;Z=$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:`,Z=Ie(Z);let P;P=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let k;k=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let G;return G=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,c,O,z,$,j,me,Z,P,k,G,["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",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",C,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",E,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",K,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",14,0),f("submit",function(){return F(i),g(o.next())}),s(2,"h3",15),I(3,1),a(),s(4,"spk-form-field")(5,"label",16),T(6,2),_(7,"sup"),h(),a(),_(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),I(11,3),a(),_(12,"textarea",19),a(),d(13,hn,6,3),s(14,"div",20)(15,"button",21),f("click",function(){return F(i),g(o.exit())}),T(16,4),_(17,"spk-icon"),h(),a(),d(18,Dn,3,1,"button",22)(19,En,4,2,"spk-tooltip",23),a()()}e&2&&(m("formGroup",o.generalForm),l(13),S(o.isNew()?13:-1),l(5),S(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ae,ye,ie,re,Ee,Oe,Ne,ne,oe,he,te,gt,dt,Xe],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})};function yn(t,n){if(t&1){let e=y();T(0,3,2),s(1,"button",11,0),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addSetting(i))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function Pn(t,n){if(t&1&&(T(0,3,1),_(1,"h3",5),Q(2,yn,3,1,"button",10,q),h()),t&2){let e=n.$implicit;l(2),Y(e.options),Be(e.displayName),Ke(0)}}function On(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Nn(t,n){if(t&1){let e=y();s(0,"app-file-tree",12)(1,"label",17),u(2),d(3,On,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;m("startingPath",o.Value())("accepts",o.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function An(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function kn(t,n){if(t&1){let e=y();s(0,"app-file-tree",13)(1,"label",17),u(2),d(3,An,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;m("startingPath",o.Value()),l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function $n(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function xn(t,n){t&1&&(s(0,"spk-icon",20),u(1,"link"),a())}function In(t,n){t&1&&(s(0,"spk-icon",20),u(1,"textbox"),a())}function Mn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,$n,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),d(5,xn,2,0,"spk-icon",20)(6,In,2,0,"spk-icon",20),a()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value()),l(),S(o.FormView.type==="Path"?5:6)}}function wn(t,n){if(t&1){let e=y();s(0,"spk-icon",23),f("click",function(){F(e);let i=p(2).$implicit;return g(i.showPassword=!i.showPassword)}),u(1," eye "),a()}}function Rn(t,n){if(t&1){let e=y();s(0,"spk-icon",23),f("click",function(){F(e);let i=p(2).$implicit;return g(i.showPassword=!i.showPassword)}),u(1," eye-slash "),a()}}function vn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),a(),s(3,"input",21),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),s(4,"spk-icon",20),u(5,"password"),a(),d(6,wn,2,0,"spk-icon",22)(7,Rn,2,0,"spk-icon",22),a()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),V("id","destination-",o.Name,"-",i,""),m("type",o.showPassword?"text":"password")("ngModel",o.Value()),l(3),S(o.showPassword?6:7)}}function bn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Ln(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Gn(t,n){if(t&1){let e=y();s(0,"spk-select",24)(1,"label",17),u(2),d(3,bn,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()(),d(5,Ln,1,1,"ng-template",null,1,ve)}if(t&2){let e=ee(6),o=p(),i=o.$implicit,r=o.$index;m("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),V("for","destination-",i.Name,"-",r,""),l(),w(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),V("id","destination-",i.Name,"-",r,""),m("ngModel",i.Value())}}function Vn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Un(t,n){if(t&1){let e=y();s(0,"div",14)(1,"label",17),u(2),d(3,Vn,3,1,"spk-tooltip",18),a(),s(4,"div",25)(5,"spk-form-field")(6,"input",26),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSizeSetting(r,i,"size"))}),a(),s(7,"spk-icon",20),u(8,"resize"),a()(),s(9,"spk-select",27)(10,"input",28),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSizeSetting(r,i,"unit"))}),a()()()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index,r=p();l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(3),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.size()),l(3),m("options",r.sizeOptions())("isClearable",!1),l(),m("ngModel",o.unit())}}function Bn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Kn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,Bn,3,1,"spk-tooltip",18),a(),s(4,"input",26),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a(),s(5,"spk-icon",20),u(6,"numpad"),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function zn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Xn(t,n){if(t&1){let e=y();s(0,"spk-toggle",15)(1,"label",17),u(2),d(3,zn,3,1,"spk-tooltip",18),a(),s(4,"input",29),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function Hn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function jn(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Wn(t,n){if(t&1){let e=y();s(0,"spk-select",30)(1,"label",17),u(2),d(3,Hn,3,1,"spk-tooltip",18),a(),s(4,"input",31),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()(),d(5,jn,1,1,"ng-template",null,2,ve)}if(t&2){let e=ee(6),o=p(),i=o.$implicit,r=o.$index;m("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),V("for","destination-",i.Name,"-",r,""),l(),w(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),m("ngModel",i.Value())}}function qn(t,n){if(t&1&&(s(0,"spk-tooltip",18)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.FormView.longDescription)}}function Qn(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"label",17),u(2),d(3,qn,3,1,"spk-tooltip",18),a(),s(4,"input",19),f("ngModelChange",function(i){F(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,i))}),a()()}if(t&2){let e=p(),o=e.$implicit,i=e.$index;l(),V("for","destination-",o.Name,"-",i,""),l(),w(" ",o.FormView.shortDescription," "),l(),S(o.FormView.longDescription?3:-1),l(),V("id","destination-",o.Name,"-",i,""),m("ngModel",o.Value())}}function Yn(t,n){if(t&1){let e=y();s(0,"div",9),d(1,Nn,5,14,"app-file-tree",12)(2,kn,5,10,"app-file-tree",13)(3,Mn,7,10,"spk-form-field")(4,vn,8,10,"spk-form-field")(5,Gn,7,12)(6,Un,11,12,"div",14)(7,Kn,7,9,"spk-form-field")(8,Xn,5,9,"spk-toggle",15)(9,Wn,7,9)(10,Qn,5,9,"spk-form-field"),s(11,"button",16),f("click",function(){let i=F(e).$implicit,r=p();return g(r.removeSetting(i))}),s(12,"spk-icon"),u(13,"x-bold"),a()()()}if(t&2){let e=n.$implicit;l(),S(e.FormView.type==="FileTree"?1:e.FormView.type==="FolderTree"?2:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?3:e.FormView.type==="Password"?4:e.FormView.type==="Enumeration"?5:e.FormView.type==="Size"?6:e.FormView.type==="Integer"?7:e.FormView.type==="Boolean"?8:e.FormView.type==="Flags"?9:e.FormView.type==="Timespan"?10:-1)}}var Zn=["Bytes","KB","MB","GB","TB","PB"],Et=class t{#e=x(He);options=zt.required();hiddenOptions=nt([]);allOptionsGrouped=this.#e.allOptionsGrouped;selectedSettings=b(()=>{let n=this.hiddenOptions();return this.options().map(e=>{let o=this.allOptionsGrouped().flatMap(i=>i.options).find(i=>i.name===e.Name);if(o&&!n.includes(o.name)){if(o.type==="Size"){let c=e.Value?.replace(/[0-9]/g,""),C=e.Value?.replace(/[^0-9]/g,""),O=A(c&&c!==""?c:"MB"),E=A(C&&C!==""?parseInt(C):"");return lt(N({},e),{Value:b(()=>E()+O()),unit:O,size:E,FormView:o})}let i=e.Value??"";o.type==="Boolean"&&(i=i&&i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0);let r=A(i);return lt(N({},e),{Value:r,FormView:o})}return null}).filter(Boolean)});nonSelectedOptionsGrouped=b(()=>{let n=this.options().map(o=>o.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>lt(N({},o),{options:o.options.filter(i=>!n.includes(i.name)&&!e.includes(i.name))})).filter(o=>o.options.length>0)});sizeOptions=A(Zn);addSetting(n){this.options.update(e=>{let o=n.defaultValue??"";return n.type==="Boolean"&&(o=o.toLowerCase()==="true"||!1),n.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:n.name,Value:o}]})}updateSettingValue(n,e){this.options.update(o=>{let i=[...o],r=i.findIndex(c=>c.Name===n.Name);return n.FormView.type==="Boolean"?(i[r].Value=e?"True":"False",i):n.FormView.type==="Integer"?(i[r].Value=e.toString(),i):(i[r].Value=e,i)})}updateSizeSetting(n,e,o){let i=n;this.options.update(r=>{let c=[...r],C=c.findIndex(O=>O.Name===i.Name);return o==="size"&&(c[C].Value=`${e}${i.unit()}`),o==="unit"&&(c[C].Value=`${i.size()}${e}`),c})}removeSetting(n){this.options.update(e=>e.filter(o=>o.Name!==n.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"]},outputs:{options:"optionsChange"},decls:11,vars:2,consts:()=>{let n;n=$localize` Advanced options ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#4\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*8:1\uFFFD"}:START_BLOCK_FOR_1:${"\uFFFD#1:1\uFFFD"}:START_HEADING_LEVEL3:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"\uFFFD/#1:1\uFFFD"}:CLOSE_HEADING_LEVEL3:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:2\uFFFD"}:INTERPOLATION_1:${"[\uFFFD/#4\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*3:2\uFFFD|\uFFFD/*8:1\uFFFD]"}:CLOSE_BLOCK_FOR:${"[\uFFFD/*3:2\uFFFD|\uFFFD/*8:1\uFFFD]"}:CLOSE_BLOCK_FOR:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_MENU:`,n=Ie(n);let e;return e=$localize`Select an item...`,[["option",""],["enumOptionTemplate",""],["optionTemplate",""],n,[3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],[1,"field-row"],["type","button"],["type","button",3,"click"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"ngModelChange","id","ngModel"],["prefix",""],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"form-row"],["type","number",3,"ngModelChange","id","ngModel"],["placeholder",e,3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&(s(0,"spk-toggle-card",4),X(1,5),T(2,3),s(3,"spk-menu",6)(4,"button",7),_(5,"spk-icon"),a(),X(6,8),Q(7,Pn,4,1,null,null,q),H(),a(),h(),H(),Q(9,Yn,14,1,"div",9,q),a()),e&2&&(m("disallowToggle",!0),l(3),m("searchable",!0),l(4),Y(o.nonSelectedOptionsGrouped()),l(2),Y(o.selectedSettings()))},dependencies:[je,ie,Pe,Le,re,St,We,Qt,ne,he,Ft,Xe,te,oe,be],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.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:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};var Jn=["formRef"],eo=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function to(t,n){t&1&&(T(0,2,1),_(1,"spk-icon",13),h())}function no(t,n){t&1&&(s(0,"p",13),I(1,7),a())}var Je=new ae,tn=["Bytes","KB","MB","GB","TB","PB"],oo=[{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`}],io=1024*1024*1024*2,ro=1024*1024*5,nn=(t={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Je.group({remoteVolumeSize:Je.group({size:Je.control(t.remoteVolumeSize),unit:Je.control(t.size)}),backupRetention:Je.control(t.backupRetention),advancedOptions:Je.group({})}),Lt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=A(tn);retentionOptions=A(oo);volumeSizeSignal=U(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(At(300))??Nt(null));volumeUnitSignal=U(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(At(300))??Nt(null));exceededVolumeSize=b(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,e=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||e===null||e===void 0)return!1;let o=n*Math.pow(1024,tn.indexOf(e));return o>io||o<ro});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,o){e&1&&Se(o.formRef,Jn,5),e&2&&fe()},decls:30,vars:12,consts:()=>{let n;n=$localize`Select an option...`;let e;e=$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#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let c;c=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let C;C=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let O;return O=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],e,o,i,r,c,C,O,[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"],["placeholder",n,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",8,0),f("submit",function(){return F(i),g(o.submit())}),s(2,"h3",9),I(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),T(8,2),d(9,to,2,0,"spk-icon",13),h(),a(),_(10,"input",14),a(),s(11,"spk-select",15),_(12,"input",16),a()(),d(13,no,2,0,"p",13),s(14,"p"),T(15,3),s(16,"a",17),_(17,"spk-icon",18),a(),h(),a()(),s(18,"spk-select",19)(19,"label",12),I(20,4),a(),_(21,"input",20),a(),s(22,"app-options-list",21),mt("optionsChange",function(c){return F(i),ct(o.settings,c)||(o.settings=c),g(c)}),a(),s(23,"div",22)(24,"button",23),f("click",function(){return F(i),g(o.goBack())}),T(25,5),_(26,"spk-icon"),h(),a(),s(27,"button",24),T(28,6),_(29,"spk-icon"),h(),a()()()}e&2&&(m("formGroup",o.optionsForm),l(9),S(o.exceededVolumeSize()?9:-1),l(2),m("options",o.sizeOptions())("inlineSearch",!0),l(2),S(o.exceededVolumeSize()?13:-1),l(5),m("options",o.retentionOptions())("inlineSearch",!0),l(4),pt("options",o.settings),m("hiddenOptions",ut(11,eo)),l(5),xe("loader",o.isSubmitting()))},dependencies:[Ae,ye,ie,Pe,re,Ee,Oe,Ne,Ge,Et,he,te,ne,oe],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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var ao=["formRef"];function so(t,n){if(t&1){let e=y();s(0,"div",26)(1,"spk-form-field")(2,"label",27),I(3,8),a(),s(4,"input",28,1),f("focus",function(){F(e);let i=ee(5);return g(i.showPicker())}),a(),s(6,"spk-icon",29),u(7,"clock"),a()(),s(8,"spk-form-field"),_(9,"label",30),s(10,"input",31,2),f("focus",function(){F(e);let i=ee(11);return g(i.showPicker())}),a(),s(12,"spk-icon",29),u(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),I(18,9),a(),_(19,"input",35),a(),s(20,"spk-select",36),_(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),I(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),T(27,11),_(28,"input",41),h(),a(),s(29,"spk-toggle",21),T(30,12),_(31,"input",42),h(),a(),s(32,"spk-toggle",21),T(33,13),_(34,"input",43),h(),a(),s(35,"spk-toggle",21),T(36,14),_(37,"input",44),h(),a(),s(38,"spk-toggle",21),T(39,15),_(40,"input",45),h(),a(),s(41,"spk-toggle",21),T(42,16),_(43,"input",46),h(),a(),s(44,"spk-toggle",21),T(45,17),_(46,"input",47),h(),a()()(),H()}if(t&2){let e=p();l(20),m("options",e.unitOptions)("isClearable",!1),l(2),m("disallowToggle",!0)}}var W=new ae,on=[{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`}],rn=(t={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}}})=>W.group({autoRun:W.control(t.autoRun),nextTime:W.group({time:W.control(t.nextTime.time),date:W.control(t.nextTime.date)}),runAgain:W.group({repeatValue:W.control(t.runAgain.repeatValue),repeatUnit:W.control(t.runAgain.repeatUnit),allowedDays:W.group({mon:W.control(t.runAgain.allowedDays.mon),tue:W.control(t.runAgain.allowedDays.tue),wed:W.control(t.runAgain.allowedDays.wed),thu:W.control(t.runAgain.allowedDays.thu),fri:W.control(t.runAgain.allowedDays.fri),sat:W.control(t.runAgain.allowedDays.sat),sun:W.control(t.runAgain.allowedDays.sun)})})}),Gt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=on;displayFn(n){let e=on.find(o=>o.key===n);return e?`${e.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-schedule"]],viewQuery:function(e,o){e&1&&Se(o.formRef,ao,5),e&2&&fe()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$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 r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let C;C=$localize`Run again every`;let O;O=$localize`Allowed days`;let E;E=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let me;me=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,e,o,i,r,c,C,O,E,K,z,$,j,me,Z,[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"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,o){if(e&1){let i=y();s(0,"form",18,0),f("submit",function(){return F(i),g(o.next())}),s(2,"h3",19),I(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),T(6,4),_(7,"input",22),h(),a(),s(8,"p"),I(9,5),a()(),d(10,so,47,3),s(11,"div",23)(12,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(13,6),_(14,"spk-icon"),h(),a(),s(15,"button",25),T(16,7),_(17,"spk-icon"),h(),a()()()}if(e&2){let i;m("formGroup",o.scheduleForm),l(10),S((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ae,ye,ie,Pe,Le,re,Ee,Oe,Ne,Ge,ne,be,te,he,oe,qe],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 lo(t,n){if(t&1){let e=y();s(0,"spk-select",0)(1,"input",4),f("ngModelChange",function(i){F(e);let r=p(2);return g(r.updateStateExpression(i))}),a()()}if(t&2){let e,o=p(2);m("options",o.fileGroupOptions())("isClearable",!1),l(),m("ngModel",(e=o.pathState())==null?null:e.expression)}}function po(t,n){if(t&1){let e=y();s(0,"spk-form-field")(1,"input",4),f("ngModelChange",function(i){F(e);let r=p(2);return g(r.updateStateExpression(i))}),a()()}if(t&2){let e,o=p(2);l(),m("ngModel",(e=o.pathState())==null?null:e.expression)}}function co(t,n){if(t&1){let e=y();s(0,"spk-select",0)(1,"input",1),f("ngModelChange",function(i){F(e);let r=p();return g(r.updateStateType(i))}),a()(),d(2,lo,2,3,"spk-select",0)(3,po,2,1,"spk-form-field"),s(4,"div",2),f("click",function(){F(e);let i=p();return g(i.removeFilter())}),s(5,"spk-icon",3),u(6,"x-circle"),a()()}if(t&2){let e,o,i=p();m("options",i.expressionOptions())("isClearable",!1),l(),m("ngModel",(e=i.pathState())==null?null:e.type),l(),S(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var an=[{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"},{key:"None",value:"-Unknown"}],mo=[{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"}],yt=class t{path=nt.required();osType=nt();pathChange=kt();remove=kt();expressionOptions=A(an);fileGroupOptions=A(mo);pathState=A(null);typeState=b(()=>{let n=this.pathState();return n?n.type:null});pathEffect=_t(()=>{let n=this.path(),e=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",c=e.startsWith("%");return e===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):c&&e.endsWith(r)||i&&e.slice(2).startsWith("\\")&&e.endsWith("\\")||e.startsWith(r)&&e.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${o}Expression`,path:e,expression:e})});updateStateType(n){this.pathState.update(e=>(e.type=n,e.path=this.#t(e),e)),this.#e()}updateStateExpression(n){this.pathState.update(e=>(e.expression=n,e.path=this.#t(e),e)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let e=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",C=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,O=n.path.startsWith("%");if(o==="Unknown")return`${e}${n.expression}`;if(o==="Folder"){let E=O||C.startsWith(r),K=C.endsWith(r);return K&&E?`${e}${n.expression}`:K?`${e}${n.expression}${r}`:E?`${e}${r}${n.expression}`:`${e}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${e}*${n.expression}*${r}`:o==="FileNameIncludes"?`${e}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${e}{${n.expression}}`:o==="Regex"?`${e}[${n.expression}]`:o==="Extension"?`${e}*.${n.expression}`:`${e}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let e=an.find(o=>o.value===n);return e?e.key:""}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,o){e&1&&d(0,co,7,4),e&2&&S(o.pathState()?0:-1)},dependencies:[je,ie,re,St,te,ne,oe],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%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_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 uo=["formRef"];function _o(t,n){if(t&1){let e=y();s(0,"app-filter",42),f("pathChange",function(i){let r=F(e).$index,c=p(2);return g(c.patchPathAt(i,r))})("remove",function(){let i=F(e).$index,r=p(2);return g(r.removePathAt(i))}),a()}if(t&2){let e,o=n.$implicit,i=p(2);m("path",o)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Fo(t,n){if(t&1&&Q(0,_o,1,2,"app-filter",41,q),t&2){let e=p();Y(e.pathArray())}}function go(t,n){if(t&1&&(s(0,"div",40)(1,"spk-form-field"),_(2,"input",43),a(),s(3,"spk-select",44),_(4,"input",45),a()()),t&2){let e=p();l(3),m("options",e.sizeOptions())("isClearable",!1)}}var we=new ae,Co=["Bytes","KB","MB","GB","TB","PB"],sn=(t={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>we.group({path:we.control(t.path),excludes:we.group({hidden:we.control(t.excludes.hidden),system:we.control(t.excludes.system),temporary:we.control(t.excludes.temporary),filesLargerThan:we.group({size:we.control(null),unit:we.control(null)})})}),Vt=class t{#e=x(ce);#t=x(pe);#o=x(Te);formRef=Ce.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Ct("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=A(Co);osType=this.#e.osType;pathSignal=U(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),r=this.pathArray().map((c,C)=>C===e?`${n}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,c)=>c!==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(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-source-data"]],viewQuery:function(e,o){e&1&&Se(o.formRef,uo,5),e&2&&fe()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let c;c=$localize`Source Data`;let C;C=$localize`Folder path`;let O;O=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let K;K=$localize`Source Data`;let z;z=$localize`Add Path`;let $;$=$localize`Add a path directly from your machine.`;let j;j=$localize`Filters`;let me;me=$localize`Customize your filters.`;let Z;Z=$localize`Add filter`;let P;P=$localize`Exclude`;let k;k=$localize`Choose if there’s any files you want to exclude.`;let G;G=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let M;M=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let le;le=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize` Files larger than `;let ue;return ue=$localize`Select an option...`,[["formRef",""],c,C,O,E,K,z,$,j,me,Z,P,k,G,M,le,Fe,[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",e,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",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",ue]]},template:function(e,o){if(e&1){let i=y();s(0,"form",17,0),f("submit",function(){return F(i),g(o.next())}),s(2,"div",18)(3,"h3",19),I(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),I(7,2),a(),_(8,"input",22),a(),s(9,"div",23)(10,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(11,3),_(12,"spk-icon"),h(),a(),s(13,"button",25),T(14,4),_(15,"spk-icon"),h(),a()()(),s(16,"div",26)(17,"h3",19),I(18,5),a(),s(19,"app-toggle-card",27),X(20,28),I(21,6),H(),s(22,"p",29),I(23,7),a(),s(24,"div",30)(25,"spk-form-field"),_(26,"input",31),a(),s(27,"button",32),f("click",function(){return F(i),g(o.addNewPath())}),s(28,"spk-icon"),u(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),I(32,8),H(),s(33,"p",29),I(34,9),a(),s(35,"button",33),f("click",function(){return F(i),g(o.addFilter())}),I(36,10),a(),d(37,Fo,2,0),a(),s(38,"app-toggle-card",34),X(39,28),I(40,11),H(),s(41,"p",29),I(42,12),a(),s(43,"spk-toggle",35),T(44,13),_(45,"input",36),h(),a(),s(46,"spk-toggle",35),T(47,14),_(48,"input",37),h(),a(),s(49,"spk-toggle",35),T(50,15),_(51,"input",38),h(),a(),s(52,"spk-toggle",39),f("click",function(){return F(i),g(o.toggleFilesLargerThan())}),I(53,16),a(),d(54,go,5,2,"div",40),a()()()}if(e&2){let i;m("formGroup",o.sourceDataForm),l(5),m("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),m("disallowToggle",!0),l(7),m("formControl",o.newPathCtrl),l(4),m("disallowToggle",!0),l(7),S((i=o.pathSignal())!=null&&i.length?37:-1),l(),m("disallowToggle",!0),l(14),xe("active",o.filesLargerThan()),l(2),S(o.filesLargerThan()?54:-1)}},dependencies:[je,ye,ie,Pe,Le,re,Ee,Ae,ft,Oe,Ne,Ge,ne,te,he,be,oe,We,qe,yt],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 de=new ae,ce=class t{#e=x(pe);#t=x(He);#o=x(ze);#i=x(Tt);generalForm=en();sourceDataForm=sn();scheduleForm=rn();destinationForm=ln();optionsForm=nn();settings=A([]);isDraft=A(!1);backupId=A(null);isSubmitting=A(!1);finishedLoading=A(!1);backupDefaults=A(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=A([]);selectedAdvancedFormPair=A([]);destinationFormPair=A({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(o=>e.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=A([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(o=>e.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=U(this.sourceDataForm.valueChanges);destinationFormSignal=U(this.destinationForm.valueChanges);generalFormSignal=U(this.generalForm.valueChanges);encryptionFieldSignal=U(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=U(this.scheduleForm.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=b(()=>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=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[bt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addAdvancedFormPairByName(n,e,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,e,o)}addHttpOptionByName(n,e,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,e,o)}addAdvancedFormPair(n,e,o){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,o){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.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(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(tt(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:e,requestBody:n}).pipe(tt(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},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 e=n.Sources??"",o=n.Filters?.map(E=>`${E.Include?"":"-"}${E.Expression}`)??[],i=n.Settings?.find(E=>E.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(E=>E.Name==="--skip-files-larger-than")??null,c=r?.Value.replace(/[0-9]/g,"")??null,C=r?.Value.replace(/[^0-9]/g,"")??null,O={path:[...e,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:c&&C?{size:parseInt(C),unit:c.toUpperCase()}:null}};this.sourceDataForm.patchValue(O)}mapDestinationToForm(n){let e=n.TargetURL?Rt(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#s(n){let e=Rt(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(r=>r.Name==="encryption-module"),o=e?.Value&&e.Value.length?e.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:!1});return}let e=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.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 e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...e,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),c=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:c?c.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,e=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#i.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let C=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([$,j])=>j).map(([$,j])=>$):[],O=o.path?.split("\0")??[],E=this.mapFormsToSettings(),K=Object.entries(o.excludes??{}).filter(([$,j])=>j&&$!=="filesLargerThan").map(([$])=>$),z=o.excludes?.filesLargerThan;return K.length&&E.push({Name:"--exclude-files-attributes",Value:K.join(",")}),z&&z.size!==null&&z.unit!==null&&E.push({Name:"--skip-files-larger-than",Value:`${z.size}${z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:O.filter($=>!$.startsWith("-")),Settings:E,Filters:O.filter($=>$.startsWith("-")).map(($,j)=>({Order:j,Include:!1,Expression:$.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:C}:null}}mapFormsToSettings(){let n=this.optionsForm.value,e=this.generalForm.value,o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let r=n.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${n.remoteVolumeSize.size}${n.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},c=this.settings().filter(C=>!o.includes(C.Name)).map(C=>{let O=C.Value;return typeof C.Value=="number"&&(O=C.Value.toString()),typeof C.Value=="boolean"&&(O=C.Value?"True":"False"),{Name:C.Name,Value:O}});return[...i,r,...c]}#a(n){return n.controls.map(e=>ht(e.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n),o={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=e.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let e=n.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==e),o)))}addOptionToFormGroup(n,e){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,e??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,e,o){let i=this.optionsForm.controls.advancedOptions,r=N({name:n,type:"String",defaultValue:e},o);this.createFormField(i,r,e),this.selectedOptions.update(c=>(c.push(r),c))}createFormField(n,e,o){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,de.control(o));return}if(e.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),r=(o??"").replace(/[^0-9]/g,"");n.addControl(e.name,de.group({size:de.control(r?parseInt(r):50),unit:de.control(i?i.toUpperCase():"MB")}));return}if(e.type==="Integer"){n.addControl(e.name,de.control(o?parseInt(o):0));return}if(e.type==="Boolean"){n.addControl(e.name,de.control(o==="true"||o==="True"));return}if(e.type==="Flags"){n.addControl(e.name,de.control(o??""));return}if(e.type==="Timespan"){n.addControl(e.name,de.control(o,[De.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,o=!1){let i=Me.find(P=>P.customKey===n||P.key===n),r=i?.key,c=this.destinationOptions().find(P=>P.Key===r),C=this.httpOptions();if(!c||!c.Options)return;let O=i&&i.oauthField?i.oauthField:null,E=i&&i.customFields?i.customFields:{},K=i&&i.dynamicFields?i.dynamicFields:[],z=i&&i.advancedFields?i.advancedFields:[],$=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:O,custom:[],dynamic:[],advanced:[]});let j=de.group({}),me=de.group({}),Z=de.group({});E&&Object.entries(E).forEach(([P,k],G)=>{let Fe=k,{formElement:M}=Fe,le=Bt(Fe,["formElement"]);j.addControl(P,M(e?.custom[P])),this.destinationFormPair.update(ue=>(ue.custom.push(N({order:900+G},le)),ue))});for(let P=0;P<c.Options.length;P++){let k=c.Options[P];if(k.Deprecated)continue;let G=K.find(M=>M===k.Name||M.name===k.Name);if(G){let M=G&&typeof G!="string",le=M?G?.defaultValue??k.DefaultValue:k.DefaultValue,Fe={name:k.Name,type:k.Type,shortDescription:k.ShortDescription??void 0,longDescription:k.LongDescription??void 0,options:k.ValidValues,order:900+P},ue=M?N(N({},Fe),G):Fe,st=e?.dynamic[k.Name]??le??k.DefaultValue;this.createFormField(me,ue,st),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(ue),Ue))}else{if($.find(ge=>ge===k.Name))continue;let le=z.find(ge=>ge===k.Name||ge.name===k.Name),Fe=le&&typeof le!="string",ue=e?.advanced[k.Name],L=ue??k.DefaultValue,st={name:k.Name,type:k.Type,shortDescription:k.ShortDescription??void 0,longDescription:k.LongDescription??void 0,options:k.ValidValues,defaultValue:L,order:900+P},Ue=Fe?N(N({},st),le):st;o&&ue&&(this.createFormField(Z,Ue,L),this.selectedAdvancedFormPair.update(ge=>(ge.push(Ue),ge))),this.destinationFormPair.update(ge=>(ge.advanced.push(Ue),ge))}}for(let P=0;P<C.length;P++){let k=C[P],G=e?.advanced[k.name],M=G??k.defaultValue;o&&G&&(this.createFormField(Z,k,M),this.selectedHttpOptions.update(le=>(le.push(k),le)))}this.destinationFormPair.update(P=>({oauthField:P.oauthField,custom:P.custom.sort((k,G)=>k.order-G.order),dynamic:P.dynamic.sort((k,G)=>k.order-G.order),advanced:P.advanced.sort((k,G)=>k.order-G.order)})),this.destinationForm.controls.destinations.push(pn({key:i?.customKey??n,customGroup:j,dynamicGroup:me,advancedGroup:Z}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Re({token:t,factory:t.\u0275fac,providedIn:"root"})};var So=["formRef"],fo=(t,n,e,o)=>({index:t,formView:n,formGroupName:"custom",destinationType:e,oauthField:o}),Ot=t=>({$implicit:t}),To=(t,n,e,o)=>({index:t,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:o}),ho=(t,n,e,o)=>({index:t,formView:n,formGroupName:"advanced",destinationType:e,oauthField:o}),Do=(t,n,e,o)=>({index:t,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:o}),Eo=()=>({maxWidth:"700px",width:"100%"});function yo(t,n){t&1&&(T(0,5,2),_(1,"spk-icon"),h())}function Po(t,n){t&1&&I(0,5,3)}function Oo(t,n){if(t&1){let e=y();T(0,5,1),s(1,"button",21),f("click",function(){F(e);let i=p();return g(i.testDestination())}),d(2,yo,2,0)(3,Po,1,0),a(),h()}if(t&2){let e=p();l(),xe("success",e.successfulTest()),l(),S(e.successfulTest()?2:3)}}function No(t,n){if(t&1){let e=y();s(0,"p",27),f("click",function(){F(e);let i=p();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),T(1,8),_(2,"span",28),h(),a()}}function Ao(t,n){if(t&1){let e=y();s(0,"div",34),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(i.key))}),s(1,"h3"),u(2),a(),s(3,"p"),u(4),a()()}if(t&2){let e=n.$implicit;l(2),$t(e.displayName),l(2),$t(e.description)}}function ko(t,n){if(t&1){let e=y();s(0,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(i.key))}),u(2),a()}if(t&2){let e=n.$implicit;l(2),w(" ",e.displayName," ")}}function $o(t,n){if(t&1&&(s(0,"div",29),Q(1,Ao,5,2,"div",30,q),a(),s(3,"spk-menu",31)(4,"button",32),I(5,9),a(),X(6,20),Q(7,ko,3,1,"button",33,q),H(),a()),t&2){let e=p();l(),Y(e.destinationTypeOptionsFocused()),l(2),m("searchable",!0),l(4),Y(e.destinationTypeOptionsNotFocused())}}function xo(t,n){t&1&&ot(0)}function Io(t,n){if(t&1&&d(0,xo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,fo,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Mo(t,n){t&1&&ot(0)}function wo(t,n){if(t&1&&d(0,Mo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,To,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Ro(t,n){if(t&1){let e=y();T(0,10,1),s(1,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addAdvancedFormPair(i,0))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function vo(t,n){t&1&&ot(0)}function bo(t,n){if(t&1&&d(0,vo,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,ho,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Lo(t,n){if(t&1){let e=y();T(0,11,1),s(1,"button",35,1),f("click",function(){let i=F(e).$implicit,r=p(2);return g(r.addHttpOption(i,0))}),a(),h()}if(t&2){let e=n.$implicit;l(),Be(e.name),Ke(0)}}function Go(t,n){t&1&&ot(0)}function Vo(t,n){if(t&1&&d(0,Go,1,0,"ng-container",40),t&2){let e,o=n.$implicit,i=n.$index;p();let r=ee(29),c=p();m("ngTemplateOutlet",r)("ngTemplateOutletContext",it(7,Ot,rt(2,Do,i,o,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Uo(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Bo(t,n){if(t&1&&(s(0,"app-file-tree",43)(1,"label",47),u(2),d(3,Uo,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit,i=p(2);m("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function Ko(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function zo(t,n){if(t&1&&(s(0,"app-file-tree",44)(1,"label",47),u(2),d(3,Ko,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit,i=p(2);m("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function Xo(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ho(t,n){t&1&&(s(0,"spk-icon",51),u(1,"link"),a())}function jo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"envelope"),a())}function Wo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"textbox"),a())}function qo(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,Xo,3,1,"spk-tooltip",48),a(),_(4,"input",50),d(5,Ho,2,0,"spk-icon",51)(6,jo,2,0,"spk-icon",51)(7,Wo,2,0,"spk-icon",51),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name),m("type",o.formView.type==="Email"?"email":"text"),l(),S(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function Qo(t,n){if(t&1){let e=y();s(0,"span",55),f("click",function(){F(e);let i=p(2).$implicit,r=p(2);return g(r.oauthStartTokenCreation(i.destinationType))}),u(1,"AuthID"),a()}}function Yo(t,n){t&1&&(s(0,"spk-icon",51),u(1,"password"),a())}function Zo(t,n){if(t&1){let e=y();s(0,"spk-icon",56),f("click",function(){F(e);let i=p(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),u(1," eye "),a()}}function Jo(t,n){if(t&1){let e=y();s(0,"spk-icon",56),f("click",function(){F(e);let i=p(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),u(1," eye-slash "),a()}}function ei(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),a(),_(3,"input",52),d(4,Qo,2,0,"span",53)(5,Yo,2,0,"spk-icon",51)(6,Zo,2,0,"spk-icon",54)(7,Jo,2,0,"spk-icon",54),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name),m("type",o.formView.showPassword?"text":"password"),l(),S(o.oauthField===o.formView.name?4:5),l(2),S(o.formView.showPassword?6:7)}}function ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(3).$implicit;m("message",e.formView.longDescription)}}function ni(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function oi(t,n){if(t&1&&(s(0,"spk-select",57)(1,"label",47),u(2),d(3,ti,3,1,"spk-tooltip",48),a(),_(4,"input",49),a(),d(5,ni,1,1,"ng-template",null,3,ve)),t&2){let e,o=ee(6);p();let i=Mt(0),r=p().$implicit;m("options",i)("isClearable",!1)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),w(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),S(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),_e("formControlName",r.formView.name)}}function ii(t,n){if(t&1&&(xt(0),d(1,oi,7,14)),t&2){let e=p().$implicit,o=It(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),S(o?1:-1)}}function ri(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(3).$implicit;m("message",e.formView.longDescription)}}function ai(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;Xt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function si(t,n){if(t&1&&(s(0,"spk-select",59)(1,"label",47),u(2),d(3,ri,3,1,"spk-tooltip",48),a(),_(4,"input",49),a(),d(5,ai,1,2,"ng-template",null,4,ve)),t&2){let e,o=ee(6);p();let i=Mt(0),r=p().$implicit;m("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),w(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),S(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),_e("formControlName",r.formView.name)}}function li(t,n){t&1&&_(0,"spk-progress-bar",58)}function pi(t,n){if(t&1&&(xt(0),d(1,si,7,15)(2,li,1,0,"spk-progress-bar",58)),t&2){let e=p().$implicit,o=It(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),S(o?1:2)}}function ci(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function mi(t,n){if(t&1&&(s(0,"div",45)(1,"label",47),u(2),d(3,ci,3,1,"spk-tooltip",48),a(),s(4,"div",60)(5,"spk-form-field"),_(6,"input",61),s(7,"spk-icon",51),u(8,"resize"),a()(),s(9,"spk-select",62),_(10,"input",63),a()()()),t&2){let e,o=p().$implicit,i=p(2);m("formGroupName",o.formView.name),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(3),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),m("options",i.sizeOptions())("inlineSearch",!0)}}function ui(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function _i(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,ui,3,1,"spk-tooltip",48),a(),_(4,"input",64),s(5,"spk-icon",51),u(6,"numpad"),a()()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function di(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Fi(t,n){if(t&1&&(s(0,"spk-toggle",46)(1,"label",47),u(2),d(3,di,3,1,"spk-tooltip",48),a(),_(4,"input",65),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function gi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ci(t,n){if(t&1&&u(0),t&2){let e=n.$implicit;w(" ",e," ")}}function Si(t,n){if(t&1&&(s(0,"spk-select",66)(1,"label",47),u(2),d(3,gi,3,1,"spk-tooltip",48),a(),_(4,"input",67),a(),d(5,Ci,1,1,"ng-template",null,4,ve)),t&2){let e,o=ee(6),i=p().$implicit;m("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),V("for","destination-",i.formGroupName,"-",i.index,""),l(),w(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),S(i.formView.longDescription?3:-1),l(),_e("formControlName",i.formView.name)}}function fi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),u(2,"question"),a()()),t&2){let e=p(2).$implicit;m("message",e.formView.longDescription)}}function Ti(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),u(2),d(3,fi,3,1,"spk-tooltip",48),a(),_(4,"input",49),a()),t&2){let e,o=p().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),w(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),S(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),_e("formControlName",o.formView.name)}}function hi(t,n){if(t&1){let e=y();s(0,"button",68),f("click",function(){F(e);let i=p().$implicit,r=p(2);return g(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),u(2,"x-circle"),a()()}}function Di(t,n){if(t&1&&(s(0,"div",41),X(1,42),d(2,Bo,5,17,"app-file-tree",43)(3,zo,5,13,"app-file-tree",44)(4,qo,8,13,"spk-form-field")(5,ei,8,13,"spk-form-field")(6,ii,2,2)(7,pi,3,2)(8,mi,11,13,"div",45)(9,_i,7,11,"spk-form-field")(10,Fi,5,11,"spk-toggle",46)(11,Si,7,9)(12,Ti,5,11,"spk-form-field"),H(),d(13,hi,3,0,"button",32),a()),t&2){let e=n.$implicit;xe("single-field",e.formGroupName!=="advanced"),l(),m("formGroupName",e.formGroupName),l(),S(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),l(11),S(e.formGroupName==="advanced"?13:-1)}}function Ei(t,n){if(t&1&&(X(0,22)(1,36),Q(2,Io,1,9,"ng-container",null,q),Q(4,wo,1,9,"ng-container",null,q),s(6,"app-toggle-card",37),X(7,38),T(8,10),s(9,"spk-menu",31)(10,"button",39),_(11,"spk-icon"),a(),X(12,20),Q(13,Ro,3,1,"button",33,q),H(),a(),h(),H(),Q(15,bo,1,9,"ng-container",null,q),a(),s(17,"app-toggle-card",37),X(18,38),T(19,11),s(20,"spk-menu",31)(21,"button",39),_(22,"spk-icon"),a(),X(23,20),Q(24,Lo,3,1,"button",33,q),H(),a(),h(),H(),Q(26,Vo,1,9,"ng-container",null,q),a(),d(28,Di,14,5,"ng-template",null,2,ve),H()()),t&2){let e=p();l(2),Y(e.destinationFormPair().custom),l(2),Y(e.destinationFormPair().dynamic),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),Y(e.notSelectedAdvancedFormPair()),l(2),Y(e.selectedAdvancedFormPair()),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",e.notSelectedHttpOptions().length===0),l(3),Y(e.notSelectedHttpOptions()),l(2),Y(e.selectedHttpOptions())}}function yi(t,n){if(t&1){let e=y();s(0,"spk-dialog",69),mt("isOpenChange",function(i){F(e);let r=p();return ct(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),g(i)}),s(1,"header",70)(2,"h2"),I(3,12),a(),s(4,"spk-alert",71),I(5,13),a()(),s(6,"div",72)(7,"spk-form-field"),_(8,"textarea",73),a()(),s(9,"footer",74)(10,"button",24),f("click",function(){F(e);let i=p();return g(i.closeTargetUrlDialog(!1))}),u(11,"Cancel"),a(),s(12,"button",75),f("click",function(){F(e);let i=p();return g(i.closeTargetUrlDialog(!0))}),T(13,14),_(14,"spk-icon"),h(),a()()()}if(t&2){let e=p();pt("isOpen",e.targetUrlDialogOpen),m("options",ut(3,Eo)),l(8),m("formControl",e.targetUrlCtrl)}}var Pi=["Bytes","KB","MB","GB","TB","PB"],Pt=new ae,ln=(t={destinations:[]})=>Pt.group({destinations:Pt.array(t.destinations)}),pn=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:o})=>Pt.group({destinationType:Pt.control(t),custom:n,dynamic:e,advanced:o}),Ut=class t{#e=x(pe);#t=x(Te);#o=x(jt);#i=x(ze);#n=x(ce);#r=x(qt);injector=x(Kt);formRef=Ce.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=b(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=A(Pi);successfulTest=A(!1);destinationTypeOptionsInFocus=A(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=A(Me.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(o=>e.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,e,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#n.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#n.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#n.addHttpOption(n,e)}targetUrl=b(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new Ct;targetUrlInitial=A(null);targetUrlDialogOpen=A(!1);openTargetUrlDialog(){let e=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||e===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 r=i.error.error.Error;if(r==="missing-folder"&&this.#r.open(at,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:c=>{c&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),r.startsWith("incorrect-cert:")){let c=r.split("incorrect-cert:")[1];this.#r.open(at,{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: ${c}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:C=>{C&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",c)}})}if(r.startsWith("incorrect-host-key:")){let c=r.split('incorrect-host-key:"')[1].split('",')[0],C=r.split('accepted-host-key:"')[1].split('",')[0];C?this.#r.open(at,{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 ${C}
6
+ with the REPORTED host key: ${c}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,c)}}):this.#r.open(at,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${c}`,confirmText:"Approve",cancelText:"Cancel"},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,c)}})}}})}mapToTargetUrl(n){return ht(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(o=>o.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=A("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=A(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=A(!1);#p=A(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let e=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-e/2,c=screen.height/2-o/2,C=window.open(i,"_blank","height="+o+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+c);C?.addEventListener("blur",O=>{console.log("event blur",O)}),C?.addEventListener("beforeunload",O=>{console.log("event beforeunload",O),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(tt(()=>this.#a.set(!1))).subscribe({next:E=>{console.log("res",E),E?.authid&&this.#p.set(E.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-destination"]],viewQuery:function(e,o){e&1&&Se(o.formRef,So,5),e&2&&fe()},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=Ie(n);let e;e=$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 r;r=$localize`Other destinations`;let c;c=$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:`,c=Ie(c);let C;C=$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:`,C=Ie(C);let O;O=$localize`Select an option...`;let E;E=$localize`Edit target URL`;let K;K=$localize` Be careful, this will overwrite everything you have in your destination. `;let z;return z=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,o,i,r,c,C,E,K,z,[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"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["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","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[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,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",O,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["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(e,o){if(e&1){let i=y();s(0,"form",15,0),f("submit",function(){return F(i),g(o.next())}),s(2,"header")(3,"h3",16),T(4,5),s(5,"div",17),d(6,Oo,4,3,"button",18),s(7,"spk-menu")(8,"button",19),_(9,"spk-icon"),a(),X(10,20),s(11,"button",21),f("click",function(){return F(i),g(o.openTargetUrlDialog())}),_(12,"spk-icon"),a(),H(),a()(),h(),a(),d(13,No,3,0,"p"),a(),d(14,$o,9,1)(15,Ei,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),f("click",function(){return F(i),g(o.goBack())}),T(18,6),_(19,"spk-icon"),h(),a(),s(20,"button",25),T(21,7),_(22,"spk-icon"),h(),a()()(),d(23,yi,15,4,"spk-dialog",26)}if(e&2){let i;m("formGroup",o.destinationForm),l(6),S(o.destinationCount()>0?6:-1),l(7),S(o.destinationCount()>0?13:-1),l(),S(o.destinationCount()===0?14:-1),l(),S(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),S(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ae,ye,ie,Pe,Le,re,Ee,ft,Oe,Ne,Ge,Yt,Ht,ne,Ft,te,be,Xe,Wt,dt,oe,gt,qe,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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{ht as a,Me as b,ln as c,pn as d,Ut as e,en as f,bt as g,vt as h,nn as i,Lt as j,rn as k,Gt as l,sn as m,Vt as n,ce as o};
@@ -0,0 +1 @@
1
+ import{b as u}from"./chunk-KLIPTMVG.js";import{D as n,Lc as a,N as p,R as m,X as l,sa as i}from"./chunk-DTPZU6NP.js";var d=class r{#s=l(u);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=a(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=a(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},s=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#e)??[]}))??[];return[e,...s,...o]});preload(e=!1){let s=this.#s.getApiV1Systeminfo().pipe(p(o=>{this.systemInfo.set(o)}),n(()=>this.isLoaded.set(!0)));if(e)return s;s.subscribe()}preloadFilterGroups(e=!1){let s=this.#s.getApiV1SysteminfoFiltergroups().pipe(p(o=>{this.filterGroups.set(o)}),n(()=>this.isLoaded.set(!0)));if(e)return s;s.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,options:e.ValidValues}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})};export{d as a};
@@ -1 +1 @@
1
- import{a as Ke}from"./chunk-VQ73M67Z.js";import{a as he,b as se}from"./chunk-N5K6ODRA.js";import{a as pe}from"./chunk-OB2RR7QV.js";import{a as be}from"./chunk-SXG7ELTX.js";import"./chunk-QSTOMEKL.js";import{a as le}from"./chunk-GEEPH37P.js";import"./chunk-72574KO2.js";import{a as ve}from"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as ae}from"./chunk-KLIPTMVG.js";import{a as Ie,d as ke}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as z,g as _e,j as ye,k as xe,o as re,v as Be}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import{pa as w,sa as oe}from"./chunk-2HS3CYRN.js";import"./chunk-UQH5ZQG7.js";import{Ab as i,Bb as t,Cb as c,Db as A,Eb as P,Gb as K,Lc as fe,Mb as N,Nb as M,Ob as _,Pb as s,Qa as o,Qb as d,Rb as U,Sb as y,Tb as m,X as R,ca as D,da as $,db as b,fc as F,gc as x,hc as S,ib as C,jc as Re,nc as De,oc as $e,p as B,pa as ie,pc as X,rb as h,sa as G,tb as f,vc as u,wb as E,wc as g,xb as I,xc as T,yb as k,zb as v}from"./chunk-DTPZU6NP.js";import{a as te}from"./chunk-C6Q5SG76.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,xe,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(ve);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[Be,de,ue,ke,le,pe,w,be,z,_e,ye],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
1
+ import{a as Ke}from"./chunk-Q67EYU7V.js";import{a as he,b as se}from"./chunk-N5K6ODRA.js";import{a as pe}from"./chunk-OB2RR7QV.js";import{a as be}from"./chunk-CMNODR42.js";import"./chunk-RKQDFV7W.js";import{a as le}from"./chunk-GEEPH37P.js";import"./chunk-7LD5V64E.js";import{a as Be}from"./chunk-WZG34QS3.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-OQEGPSC6.js";import{b as ae}from"./chunk-KLIPTMVG.js";import{a as Ie,d as ke}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as z,g as _e,j as ve,k as ye,o as re,v as xe}from"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import{pa as w,sa as oe}from"./chunk-2HS3CYRN.js";import"./chunk-UQH5ZQG7.js";import{Ab as i,Bb as t,Cb as c,Db as A,Eb as P,Gb as K,Lc as fe,Mb as N,Nb as M,Ob as _,Pb as s,Qa as o,Qb as d,Rb as U,Sb as y,Tb as m,X as R,ca as D,da as $,db as b,fc as F,gc as x,hc as S,ib as C,jc as Re,nc as De,oc as $e,p as B,pa as ie,pc as X,rb as h,sa as G,tb as f,vc as u,wb as E,wc as g,xb as I,xc as T,yb as k,zb as v}from"./chunk-DTPZU6NP.js";import{a as te}from"./chunk-C6Q5SG76.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-WZG34QS3.js";import{a as $,b as y,d as B,e as h,h as v,m as G,p as L,q as U,s as K}from"./chunk-4IJQ7AAQ.js";import{b as N}from"./chunk-KLIPTMVG.js";import{c as E,d as R}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as w,c as X,g as x,l as V,w as z,y as j}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as r,Bb as n,Cb as l,D as g,Mb as I,Nb as M,Ob as u,Qa as F,Rb as O,Sb as f,X as p,db as S,fc as A,ib as D,rb as d,rc as k,sa as m,tb as C,wb as P}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
1
+ import{a as G}from"./chunk-WZG34QS3.js";import{a as L,b as U,d as K,e as w,h as X,m as x,p as V,q as z,s as j}from"./chunk-4IJQ7AAQ.js";import{b as N}from"./chunk-KLIPTMVG.js";import{c as E,d as R}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as b,c as $,g as y,l as B,x as h,z as v}from"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as r,Bb as n,Cb as l,D as g,Mb as I,Nb as M,Ob as u,Qa as F,Rb as O,Sb as f,X as p,db as S,fc as A,ib as D,rb as d,rc as k,sa as m,tb as C,wb as P}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new z,T=class c{#e=p($);#t=p(N);#o=p(G);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[j,X,U,L,K,w,x,V,R,v,B,b,y,h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{a as R,b as oe}from"./chunk-DNHLTHLR.js";import{a as te}from"./chunk-N5K6ODRA.js";import{a as G}from"./chunk-WZG34QS3.js";import{a as L,b as K,c as S,d as U,e as z,h as j,m as V,p as q,q as H,s as Q}from"./chunk-4IJQ7AAQ.js";import{b as v}from"./chunk-KLIPTMVG.js";import{a as b,c as w,d as B}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as W,f as J,g as Y,l as Z,w as ee}from"./chunk-GBNJJFEH.js";import{c as h}from"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as r,Bb as n,Cb as a,D as E,L as M,Lc as O,Mb as l,Nb as c,Ob as f,Qa as s,Sb as P,X as _,db as I,fc as k,ib as x,ic as y,rb as C,rc as X,sa as T,tb as g,wb as D}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new H,N=class d{#t=_(v);#e=_(b);#o=_(w);#n=_(h);#i=_(G);isExporting=T(!1);exportType=T("file");exportedCmd=T(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,oe()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=te(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=o=>{let t=Object.entries(o);return t?"?"+t.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let o=this.activeBackup()?.Backup?.Name??"Backup",t=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${o}.${t}`),this.#o.navigate(["/"])},error:e=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{this.exportedCmd.set(e.Command??null)},error:e=>{}})}downloadFile(e,i){let o=window.URL.createObjectURL(e),t=document.createElement("a");t.href=o,t.download=i,t.click(),window.URL.revokeObjectURL(o)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,o,t,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,o){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return o.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return o.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return o.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let t;s(4),C("routerLink",X(11,ne)),s(3),g("loading",o.isExporting()),s(4),y("#",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.ID,": ",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.Name,""),s(),C("formGroup",o.exportForm),s(2),g("active",o.exportType()==="cmd"),s(3),g("active",o.exportType()==="file"),s(9),D(o.encryptionFieldSignal()?26:-1)}},dependencies:[Q,j,K,L,U,z,V,q,B,J,ee,W,Z,Y],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{N as default};
1
+ import{a as R,b as oe}from"./chunk-DNHLTHLR.js";import{a as te}from"./chunk-N5K6ODRA.js";import{a as j}from"./chunk-WZG34QS3.js";import{a as V,b as q,c as S,d as H,e as Q,h as W,m as J,p as Y,q as Z,s as ee}from"./chunk-4IJQ7AAQ.js";import{b as v}from"./chunk-KLIPTMVG.js";import{a as b,c as w,d as B}from"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import{a as G,f as L,g as K,l as U,x as z}from"./chunk-ECH6I3YN.js";import{c as h}from"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as r,Bb as n,Cb as a,D as E,L as M,Lc as O,Mb as l,Nb as c,Ob as f,Qa as s,Sb as P,X as _,db as I,fc as k,ib as x,ic as y,rb as C,rc as X,sa as T,tb as g,wb as D}from"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new Z,N=class d{#t=_(v);#e=_(b);#o=_(w);#n=_(h);#i=_(j);isExporting=T(!1);exportType=T("file");exportedCmd=T(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,oe()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=te(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=o=>{let t=Object.entries(o);return t?"?"+t.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let o=this.activeBackup()?.Backup?.Name??"Backup",t=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${o}.${t}`),this.#o.navigate(["/"])},error:e=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{this.exportedCmd.set(e.Command??null)},error:e=>{}})}downloadFile(e,i){let o=window.URL.createObjectURL(e),t=document.createElement("a");t.href=o,t.download=i,t.click(),window.URL.revokeObjectURL(o)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,o,t,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,o){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return o.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return o.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return o.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let t;s(4),C("routerLink",X(11,ne)),s(3),g("loading",o.isExporting()),s(4),y("#",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.ID,": ",(t=o.activeBackup())==null||t.Backup==null?null:t.Backup.Name,""),s(),C("formGroup",o.exportForm),s(2),g("active",o.exportType()==="cmd"),s(3),g("active",o.exportType()==="file"),s(9),D(o.encryptionFieldSignal()?26:-1)}},dependencies:[ee,W,q,V,H,Q,J,Y,B,L,z,G,U,K],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import{a as P,c as A}from"./chunk-OQEGPSC6.js";import{b as k}from"./chunk-KLIPTMVG.js";import{e as d}from"./chunk-ECH6I3YN.js";import{ua as M}from"./chunk-2HS3CYRN.js";import{Ab as m,Bb as f,Cb as _,Lc as g,M as C,Mb as v,Mc as b,Nb as E,Ob as N,Pb as I,Qa as T,Qb as F,R as c,X as s,db as O,g as S,sa as n,vc as w,xc as y}from"./chunk-DTPZU6NP.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
@@ -1,2 +1,2 @@
1
- import{a as K}from"./chunk-N5K6ODRA.js";import{b as X}from"./chunk-KLIPTMVG.js";import{a as z,d as J,g as q}from"./chunk-GBNJJFEH.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as i,Bb as a,Cb as g,Gb as u,Mb as A,Mc as W,Nb as D,Oa as E,Ob as y,Qa as l,Sb as S,Tb as f,Wb as w,X as v,ca as d,da as _,db as h,fc as c,gc as C,hc as I,ib as k,ic as N,kc as $,lc as B,mc as V,nc as U,p as T,rb as F,rc as G,sa as m,wb as x,xb as M,yb as P,zb as R}from"./chunk-DTPZU6NP.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{a as K}from"./chunk-N5K6ODRA.js";import{b as X}from"./chunk-KLIPTMVG.js";import{a as z,d as J,g as q}from"./chunk-ECH6I3YN.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import{Ab as i,Bb as a,Cb as g,Gb as u,Mb as A,Mc as W,Nb as D,Oa as E,Ob as y,Qa as l,Sb as S,Tb as f,Wb as w,X as v,ca as d,da as _,db as h,fc as c,gc as C,hc as I,ib as k,ic as N,kc as $,lc as B,mc as V,nc as U,p as T,rb as F,rc as G,sa as m,wb as x,xb as M,yb as P,zb as R}from"./chunk-DTPZU6NP.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),P(2,Q,13,5,"div",2,M),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),S("click",function(){return d(o),_(n.dialogLicense.set(null))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),R(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[z,q,J],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};