@duplicati/ngclient 0.0.101 → 0.0.103

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 (121) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-2EOGI5U4.js +8 -0
  3. package/{chunk-M7VDIUGU.js → chunk-2IDHF5MN.js} +1 -1
  4. package/chunk-2PAPG5UW.js +1 -0
  5. package/chunk-4B4SNBSE.js +1 -0
  6. package/chunk-4YRHMBJK.js +1 -0
  7. package/{chunk-ZP273LXY.js → chunk-5242ZMFS.js} +1 -1
  8. package/chunk-56BIOJTU.js +1 -0
  9. package/chunk-5BO226DZ.js +1 -0
  10. package/chunk-5EOQSHY6.js +1 -0
  11. package/chunk-5XWXETE2.js +1 -0
  12. package/{chunk-SFWQDWHT.js → chunk-6OYKPS4F.js} +1 -1
  13. package/chunk-6WLXFV43.js +1 -0
  14. package/{chunk-EO2PLY2Q.js → chunk-73FGPZLT.js} +1 -1
  15. package/{chunk-4FF7PF7J.js → chunk-7NSKVKO7.js} +1 -1
  16. package/chunk-7WCKE7GY.js +1 -0
  17. package/chunk-A7BKUGJT.js +1 -0
  18. package/chunk-ADU47UB6.js +1 -0
  19. package/{chunk-MM22YS5Z.js → chunk-ARQ6YMHX.js} +1 -1
  20. package/{chunk-MEQPT4C3.js → chunk-B7AEDFNS.js} +1 -1
  21. package/{chunk-2SGDSXNW.js → chunk-BIHIR35J.js} +1 -1
  22. package/chunk-C4IFBLYB.js +1 -0
  23. package/{chunk-ULTH3Z7H.js → chunk-DHVICIXP.js} +1 -1
  24. package/chunk-DYCJPQSE.js +1 -0
  25. package/chunk-EQ74YCX7.js +1 -0
  26. package/{chunk-O6GWHO26.js → chunk-FQMZSQUI.js} +1 -1
  27. package/chunk-GM25ACCR.js +7 -0
  28. package/chunk-GON7FNZR.js +1 -0
  29. package/{chunk-I457VUEG.js → chunk-GWH4FCBZ.js} +1 -1
  30. package/{chunk-FDMBNUIK.js → chunk-HFKG5ODC.js} +1 -1
  31. package/{chunk-DJWNLIDJ.js → chunk-HPSQUH4S.js} +1 -1
  32. package/chunk-IPNKLO2C.js +1 -0
  33. package/chunk-IYJFFIHQ.js +1 -0
  34. package/{chunk-FQPH5MIV.js → chunk-K4BJJNFG.js} +1 -1
  35. package/{chunk-CQTSWNP2.js → chunk-K7E5BKU4.js} +1 -1
  36. package/chunk-KEHATBLP.js +1 -0
  37. package/chunk-KXHE37LY.js +1 -0
  38. package/chunk-LOR4VCVG.js +1 -0
  39. package/chunk-LU6KVNOT.js +1 -0
  40. package/chunk-MYXDJGSR.js +1 -0
  41. package/{chunk-TLY4PQBT.js → chunk-N35UIMLP.js} +1 -1
  42. package/chunk-NYZVIDDD.js +1 -0
  43. package/{chunk-BWYJMRKB.js → chunk-OD5LGCQE.js} +1 -1
  44. package/{chunk-WCLOWI5G.js → chunk-OELZQ6RK.js} +1 -1
  45. package/{chunk-E2LHQGCK.js → chunk-OP5UYIDM.js} +1 -1
  46. package/{chunk-FKTH6XCB.js → chunk-OPC7T2MU.js} +1 -1
  47. package/{chunk-WSLU6K4D.js → chunk-OQNO5JCJ.js} +1 -1
  48. package/chunk-ORNS7N6Q.js +1 -0
  49. package/chunk-P3QRASBZ.js +1 -0
  50. package/chunk-POO6N4RH.js +1 -0
  51. package/chunk-PX25CWH6.js +1 -0
  52. package/chunk-PXG6UWRT.js +1 -0
  53. package/chunk-QBYHBPBT.js +1 -0
  54. package/{chunk-JJQARMUD.js → chunk-QTTYDT3P.js} +1 -1
  55. package/{chunk-3IZBE2NA.js → chunk-R5DUA6AR.js} +1 -1
  56. package/{chunk-KABJYPCP.js → chunk-S2EID4MC.js} +1 -1
  57. package/chunk-S6C4DHJH.js +3 -0
  58. package/chunk-TFIF6FCF.js +1 -0
  59. package/{chunk-K3CYM6ID.js → chunk-TKVTCBLW.js} +1 -1
  60. package/{chunk-UXWTPWS6.js → chunk-U34D3G4S.js} +1 -1
  61. package/chunk-UKQTVYRS.js +1 -0
  62. package/chunk-UO57IKTF.js +1 -0
  63. package/chunk-VJPUDP2T.js +1 -0
  64. package/{chunk-BKWTKAB4.js → chunk-W2OVJAGT.js} +1 -1
  65. package/chunk-WX5636KE.js +1 -0
  66. package/chunk-X7KD2725.js +1 -0
  67. package/chunk-XYENMXJU.js +1 -0
  68. package/{chunk-LBZ753XE.js → chunk-Y5T3G6PP.js} +1 -1
  69. package/chunk-YBGYY3E5.js +1 -0
  70. package/{chunk-VRGLHRK2.js → chunk-YC7JUCYS.js} +1 -1
  71. package/{chunk-J6XKFGF5.js → chunk-YCVMFFKU.js} +1 -1
  72. package/{chunk-ISRMJKPG.js → chunk-YRQ33MKD.js} +1 -1
  73. package/chunk-ZJWHMCU4.js +1 -0
  74. package/{chunk-D5WIWFNP.js → chunk-ZVBVR6H4.js} +1 -1
  75. package/index.html +2 -2
  76. package/locale/messages.json +268 -49
  77. package/main-DQ77DZR6.js +1 -0
  78. package/package.json +1 -1
  79. package/styles-CAXGLRRN.css +1 -0
  80. package/chunk-2VHTET54.js +0 -1
  81. package/chunk-36ZZ3COU.js +0 -1
  82. package/chunk-3NDOYD25.js +0 -1
  83. package/chunk-3UJUWE5B.js +0 -1
  84. package/chunk-3V622MYY.js +0 -1
  85. package/chunk-436ZVGPO.js +0 -1
  86. package/chunk-4DZRXRA3.js +0 -1
  87. package/chunk-54SNAQYD.js +0 -1
  88. package/chunk-5SLAQVCB.js +0 -3
  89. package/chunk-6UVVDGKQ.js +0 -8
  90. package/chunk-7QUJNAXH.js +0 -1
  91. package/chunk-BA7NYTFR.js +0 -1
  92. package/chunk-CEOO3F5U.js +0 -1
  93. package/chunk-DNHLTHLR.js +0 -1
  94. package/chunk-DRBDCRHV.js +0 -1
  95. package/chunk-FRXAEGHW.js +0 -1
  96. package/chunk-I3TLRILF.js +0 -1
  97. package/chunk-LHTAXP73.js +0 -1
  98. package/chunk-MYK7A3PZ.js +0 -1
  99. package/chunk-NEZX7ARK.js +0 -1
  100. package/chunk-NFME267J.js +0 -1
  101. package/chunk-OH33D663.js +0 -1
  102. package/chunk-ONSJL7VA.js +0 -1
  103. package/chunk-PFAU4FFV.js +0 -1
  104. package/chunk-PGUALKQ6.js +0 -1
  105. package/chunk-PWLZT57L.js +0 -1
  106. package/chunk-QFKEUN2J.js +0 -1
  107. package/chunk-RQSCZC6C.js +0 -1
  108. package/chunk-TUR6D3AC.js +0 -1
  109. package/chunk-UH6BCOA6.js +0 -1
  110. package/chunk-UJZB6UQE.js +0 -1
  111. package/chunk-VDQCSHBX.js +0 -1
  112. package/chunk-XGARKXE4.js +0 -7
  113. package/chunk-XH2A67YP.js +0 -1
  114. package/chunk-XQKR67WI.js +0 -1
  115. package/chunk-YBLCACKN.js +0 -1
  116. package/chunk-YOTPPWSO.js +0 -1
  117. package/chunk-YPSSTA3J.js +0 -1
  118. package/chunk-YTJB3DGU.js +0 -1
  119. package/chunk-ZHAXIU33.js +0 -1
  120. package/main-CVAZAPFI.js +0 -1
  121. package/styles-2KPDWK5U.css +0 -1
package/assets/spk.woff2 CHANGED
Binary file
@@ -0,0 +1,8 @@
1
+ import{a as zt,b as jt}from"./chunk-Y5T3G6PP.js";import{a as mt}from"./chunk-4B4SNBSE.js";import{a as je}from"./chunk-YRQ33MKD.js";import{a as Xt,b as Nt,c as Ht}from"./chunk-UO57IKTF.js";import{a as z}from"./chunk-NYZVIDDD.js";import{a as lt}from"./chunk-OELZQ6RK.js";import{a as Ne}from"./chunk-ARQ6YMHX.js";import{b as Le,c as de,d as _e,e as Fe,f as Ue,g as pt,h as Ve,i as Be,j as Ke,m as ct,n as We,o as ut,p as Wt,q as Xe,r as ge,s as He,t as ze}from"./chunk-QTTYDT3P.js";import{b as Ee,d as pe}from"./chunk-7WCKE7GY.js";import{A as st,a as ce,b as rt,d as Vt,e as Bt,g as be,l as ue,o as Kt,p as at,t as me,z as Ge}from"./chunk-6WLXFV43.js";import{b as ve}from"./chunk-DYCJPQSE.js";import{c as Ut}from"./chunk-TKVTCBLW.js";import{i as Lt}from"./chunk-2IDHF5MN.js";import{$b as j,Ab as b,E as Ye,Eb as E,Fb as y,Gb as R,Hb as Dt,Ib as Et,Jb as Ae,Kb as P,Lb as c,Oa as l,Ob as le,Qb as bt,R as $e,Rb as W,Va as we,Wb as Re,X as $,Xb as Ie,Yb as ie,Zb as d,_a as se,_b as xe,ac as Gt,ca as F,cc as V,da as g,db as C,dc as B,ec as K,fc as yt,gc as Pt,ha as xt,hc as At,jc as Ze,kb as vt,kc as et,lb as u,mc as tt,nb as Pe,oa as ft,pa as Tt,qb as T,qc as nt,r as Qe,rb as Z,sa as D,sb as ee,tb as te,ub as s,vb as a,wb as m,xb as X,yb as H,yc as v,zb as Je,zc as it}from"./chunk-GM25ACCR.js";import{a as S,b as De,c as It}from"./chunk-7CGTOI24.js";var dt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=$e({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ce=class e{#n=$(ve);s3Providers=z(this.getS3Config("Providers"));s3Regions=z(this.getS3Config("Regions"));s3RegionHosts=z(this.getS3Config("RegionHosts"));s3StorageClasses=z(this.getS3Config("StorageClasses"));storjSatellites=z(this.getStorjConfig("Satellites"));storjAuthenticationMethods=z(this.getStorjConfig("AuthenticationMethods"));openstackProviders=z(this.getOpenstackConfig("Providers"));openstackVersions=z(this.getOpenstackConfig("Versions"));gcsLocations=z(this.getGcsConfig("Locations"));gcsStorageClasses=z(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Qe(t=>this.#t(t)))}createS3IamUser(n,t){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Qe(t=>this.#t(t)))}getOpenstackConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Qe(t=>this.#t(t)))}getGcsConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Qe(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=$e({token:e,factory:e.\u0275fac,providedIn:"root"})};function ye(e){return e==null?"":":"+e.toString()}function Y(e){return e==null?"":e.startsWith("/")?e:"/"+e}function O(e,n){let t={},o={},i=Se.find(r=>r.key===e);return n.searchParams.forEach((r,p)=>{i?.dynamicFields?.some(N=>N===p||N?.name===p)?o[p]=decodeURIComponent(r):t[p]=decodeURIComponent(r)}),{advanced:t,dynamic:o}}function M(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function _t(e){let n=e.destinationType,t=Se.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function kt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return Se.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return Se.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var _=new ge,Se=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>_.control(e??"")}},mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),h=i.slice(1).startsWith(":\\")||r?i:"/"+i;return S({destinationType:e,custom:{path:h}},O(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>_.control(e??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ye(t)+Y(i)+n}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Y(t)+o}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},O(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>D([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{server:t,path:o}=e.custom;return`${e.destinationType}://${t+Y(o)+n}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return S({destinationType:e,custom:{server:n.hostname,path:o}},O(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ye(t)+Y(i)+n}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ye(t)+Y(i)+n}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Y(t)+o}`},from:(e,n,t)=>S({destinationType:e,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},O(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Y(t)+o}`},from:(e,n,t)=>S({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},O(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>_.control(e??"",[_e.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.hostname+n.pathname}},O(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ye(t)+Y(i)+n}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=M([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=O(e,n);return S({destinationType:e,dynamic:S({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=M([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},O(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=M([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+ye(n)+Y(o)+r}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=M([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+ye(n)+Y(o)+i}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=M([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+Y(t)+o}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.pathname}},O(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=M([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>S({destinationType:e,custom:{path:n.pathname}},O(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>_.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},h=e.dynamic["use-ssl"],N=M([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([w])=>w!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${h?"s":""}://${t+ye(n)+Y(o)+N}`},from:(e,n,t)=>S({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},O(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},h=new Map([...Object.entries(p),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),N=M(Array.from(h));return`${e.destinationType}://${t+Y(n)+Y(o)+N}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return S({destinationType:e,custom:{server:n.hostname,share:o,path:i}},O(e,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:e=>_.control(e??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:e=>{let{path:n,username:t,password:o}=e.custom,i={"auth-username":t,"auth-password":o},r=new Map([...Object.entries(i),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),p=M(Array.from(r));return`${e.destinationType}://${n+p}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,S({destinationType:e,custom:{path:o}},O(e,n))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:e=>_.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:e=>_.control(e??"")}],mapper:{to:e=>{let{path:n,username:t,password:o,apitoken:i}=e.custom,r=(i||"").trim()===""?{"auth-username":t,"auth-password":o}:{"api-token":i},p=new Map([...Object.entries(r),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),h=M(Array.from(p));return`${e.destinationType}://${n+h}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,S({destinationType:e,custom:{path:o}},O(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${M([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>S({destinationType:e},O(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Ce).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${M([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>S({destinationType:e},O(e,n))}}];var tn=["formRef"];function nn(e,n){e&1&&(s(0,"spk-alert",17),E(1,5),m(2,"spk-icon",26),y(),a())}function on(e,n){if(e&1&&d(0),e&2){let t=n.$implicit;j(" ",t.DisplayName," ")}}function rn(e,n){if(e&1&&m(0,"spk-progress-bar",40),e&2){let t=c(3);Pe("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function an(e,n){e&1&&(s(0,"span",35),R(1,10),a())}function sn(e,n){e&1&&(E(0,8,1),m(1,"spk-icon"),y())}function ln(e,n){e&1&&(E(0,8,2),m(1,"spk-icon"),y())}function pn(e,n){e&1&&(E(0,11,1),m(1,"spk-icon",42),y())}function cn(e,n){e&1&&(E(0,11,2),m(1,"spk-icon"),y())}function un(e,n){if(e&1){let t=b();s(0,"button",41),P("click",function(){F(t);let i=c(3);return g(i.copyPassword())}),E(1,11),C(2,pn,2,0)(3,cn,2,0),y(),a()}if(e&2){let t=c(3);l(2),T(t.copiedPassword()?2:3)}}function mn(e,n){e&1&&(s(0,"spk-alert",39),R(1,12),a())}function dn(e,n){if(e&1){let t=b();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),m(4,"sup"),y(),a(),m(5,"input",32),a(),C(6,rn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),m(8,"input",34),C(9,an,2,0,"span",35),a(),s(10,"div",36)(11,"button",37),P("click",function(){F(t);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),E(12,8),C(13,sn,2,0)(14,ln,2,0),y(),a(),s(15,"button",37),P("click",function(){F(t);let i=c(2);return g(i.generatePassword())}),E(16,9),m(17,"spk-icon"),y(),a(),C(18,un,4,1,"button",38),a(),C(19,mn,2,0,"spk-alert",39),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),T(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),T(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),T(t.showPassword()?13:14),l(5),T(t.showCopyPassword()?18:-1),l(),T(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function _n(e,n){if(e&1&&(s(0,"spk-select",27)(1,"label",28),R(2,6),a(),m(3,"input",29),C(4,on,1,1,"ng-template"),a(),C(5,dn,20,7,"div",30)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),T(t.encryptionFieldSignal()!==""?5:-1)}}function Fn(e,n){if(e&1&&(s(0,"button",24),E(1,13),m(2,"spk-icon"),y(),a()),e&2){let t=c();u("disabled",t.nameAndDescriptionValid()===!1)}}function gn(e,n){if(e&1&&(s(0,"spk-tooltip",25)(1,"button",24),E(2,14),m(3,"spk-icon"),y(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ge,qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[_e.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[Ht()]),password:qe.control(e.password,[Nt(n=>n?.value.encryption!=="",[_e.required])]),repeatPassword:qe.control(e.repeatPassword,[Nt(n=>n?.value.encryption!=="",[_e.required])])}),Mt={Key:"",DisplayName:"None"},Ot=class e{#n=$(pe);#t=$(Ee);#o=$(Xt);#i=$(he);#e=$(lt);formRef=we.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=D(!1);copiedPassword=D(!1);showCopyPassword=D(!1);encryptionEffect=it(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=v(()=>{let n=this.generalFormSignal(),t=this.generalForm.controls;return t?.name&&t.name.valid&&t?.description&&t.description.valid});calculatePasswordStrength=v(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#e.systemInfo()?.EncryptionModules??[];return t=>{let o=[Mt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Re(o.formRef,tn,5),t&2&&Ie()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let N;N=$localize`Encryption`;let w;w=$localize`Encryption`;let q;q=$localize`Password`;let I;I=$localize`Repeat password`;let G;G=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let U;U=$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:`,U=Ae(U);let ne;ne=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let f;f=$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:`,f=Ae(f);let A;A=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let L;L=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let Q;return Q=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,h,w,G,U,ne,J,f,A,L,Q,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",N,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",q,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",I,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=b();s(0,"form",15,0),P("submit",function(){return F(i),g(o.next())}),s(2,"h3",16),R(3,1),a(),C(4,nn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),m(8,"sup"),y(),a(),m(9,"input",19),a(),s(10,"spk-form-field")(11,"label",20),R(12,3),a(),m(13,"textarea",21),a(),C(14,_n,6,3),s(15,"div",22)(16,"button",23),P("click",function(){return F(i),g(o.exit())}),E(17,4),m(18,"spk-icon"),y(),a(),C(19,Fn,3,1,"button",24)(20,gn,4,2,"spk-tooltip",25),a()()}if(t&2){let i;u("formGroup",o.generalForm),l(4),T(!o.isNew()&&((i=o.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(o.isNew()?14:-1),l(5),T(o.encryptionFieldSignal()===""||!o.isNew()?19:20)}},dependencies:[ze,Be,de,Fe,Ue,We,Xe,ue,me,be,ce,at,rt,st],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 Cn(e,n){if(e&1){let t=b();s(0,"div",24)(1,"spk-form-field")(2,"label",25),R(3,7),a(),s(4,"input",26,0),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.nextTime().time,i)||(r.scheduleFields.nextTime().time=i),g(i)}),P("focus",function(){F(t);let i=ie(5);return g(i.showPicker())}),a(),s(6,"spk-icon",27),d(7,"clock"),a()(),s(8,"spk-form-field"),m(9,"label",28),s(10,"input",29,1),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.nextTime().date,i)||(r.scheduleFields.nextTime().date=i),g(i)}),P("focus",function(){F(t);let i=ie(11);return g(i.showPicker())}),a(),s(12,"spk-icon",27),d(13,"calendar"),a()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),R(17,8),a(),s(18,"input",31),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().repeatValue,i)||(r.scheduleFields.runAgain().repeatValue=i),g(i)}),a()(),s(19,"spk-select",32)(20,"input",33),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().repeatUnit,i)||(r.scheduleFields.runAgain().repeatUnit=i),g(i)}),a()()(),s(21,"app-toggle-card",34),X(22,35),R(23,9),H(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.mon,i)||(r.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),a(),y(),a(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.tue,i)||(r.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),a(),y(),a(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.wed,i)||(r.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),a(),y(),a(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.thu,i)||(r.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),a(),y(),a(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.fri,i)||(r.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),a(),y(),a(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.sat,i)||(r.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),a(),y(),a(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),K("ngModelChange",function(i){F(t);let r=c();return B(r.scheduleFields.runAgain().allowedDays.sun,i)||(r.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),a(),y(),a()()()}if(e&2){let t=c();l(4),V("ngModel",t.scheduleFields.nextTime().time),l(6),V("ngModel",t.scheduleFields.nextTime().date),l(8),V("ngModel",t.scheduleFields.runAgain().repeatValue),l(),u("options",t.unitOptions)("isClearable",!1),l(),V("ngModel",t.scheduleFields.runAgain().repeatUnit),l(),u("disallowToggle",!0),l(6),V("ngModel",t.scheduleFields.runAgain().allowedDays.mon),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.tue),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.wed),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.thu),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.fri),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.sat),l(3),V("ngModel",t.scheduleFields.runAgain().allowedDays.sun)}}var hn=[{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`}],Oe={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}}},$t=class e{#n=$(he);#t=$(pe);#o=$(Ee);unitOptions=hn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\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#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let h;h=$localize`Run again every`;let N;N=$localize`Allowed days`;let w;w=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;return J=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,t,o,i,r,p,h,N,w,q,I,G,U,ne,J,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(t,o){t&1&&(s(0,"h3",17),R(1,2),a(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),K("ngModelChange",function(r){return B(o.scheduleFields.autoRun,r)||(o.scheduleFields.autoRun=r),r}),a(),y(),a(),s(6,"p"),R(7,4),a()(),C(8,Cn,46,14),s(9,"div",21)(10,"button",22),P("click",function(){return o.goBack()}),E(11,5),m(12,"spk-icon"),y(),a(),s(13,"button",23),P("click",function(){return o.next()}),E(14,6),m(15,"spk-icon"),y(),a()()),t&2&&(l(5),V("ngModel",o.scheduleFields.autoRun),l(3),T(o.scheduleFields.autoRun()?8:-1))},dependencies:[He,de,Ke,Le,Fe,Ve,ue,Ge,ce,be,me,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Sn(e,n){if(e&1&&(X(0,4),d(1),H()),e&2){let t,o=c();l(),xe((t=o.currentExpressionOption())==null?null:t.startsWith)}}function fn(e,n){if(e&1&&(X(0,5),d(1),H()),e&2){let t,o=c();l(),xe((t=o.currentExpressionOption())==null?null:t.endsWith)}}var Tn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ct=class e{path=Tt.required();osType=Tt();pathChange=ft();remove=ft();internalPath=D("");pathType=D("-Expression");currentExpressionOption=v(()=>{let n=this.pathType();return this.expressionOptions().find(t=>t.value===n)});expressionOptions=v(()=>{let t=this.osType()==="Windows"?"\\":"/";return Tn.map(o=>o.value==="-Folder"||o.value==="+Folder"?De(S({},o),{startsWith:"",endsWith:""}):o.value==="-FolderName"||o.value==="+FolderName"?De(S({},o),{startsWith:"*",endsWith:`*${t}`}):o.value==="-FileName"||o.value==="+FileName"?De(S({},o),{startsWith:"[.*",endsWith:`[^\\${t}]*]`}):o.value==="-FileGroup"||o.value==="+FileGroup"?De(S({},o),{startsWith:"{",endsWith:"}"}):o.value==="-Regex"||o.value==="+Regex"?De(S({},o),{startsWith:"[",endsWith:"]"}):o.value==="-Extension"||o.value==="+Extension"?De(S({},o),{startsWith:"*.",endsWith:""}):De(S({},o),{startsWith:"",endsWith:""}))});pathEffect=it(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/";t.startsWith("%")&&t.endsWith(r)||i&&t.slice(2).startsWith(r)&&t.endsWith(r)||t.startsWith(r)&&t.endsWith(r)?(this.pathType.set(`${o}Folder`),this.internalPath.set(t)):t.startsWith("*")&&t.endsWith(`*${r}`)?(this.pathType.set(`${o}FolderName`),this.internalPath.set(t.slice(1,-2))):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?(this.pathType.set(`${o}FileName`),this.internalPath.set(t.slice(3,-7))):t.startsWith("{")&&t.endsWith("}")?(this.pathType.set(`${o}FileGroup`),this.internalPath.set(t.slice(1,-1))):t.startsWith("[")&&t.endsWith("]")?(this.pathType.set(`${o}Regex`),this.internalPath.set(t.slice(1,-1))):t.startsWith("*.")?(this.pathType.set(`${o}Extension`),this.internalPath.set(t.slice(2))):(this.pathType.set(`${o}Expression`),this.internalPath.set(t))});updateFilter(){let n=this.internalPath(),t=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${t?.value.slice(0,1)}${t?.startsWith??""}${n}${t?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(t,o){if(t&1&&(s(0,"spk-select",0)(1,"input",1),K("ngModelChange",function(r){return B(o.pathType,r)||(o.pathType=r),r}),P("ngModelChange",function(){return o.updateFilter()}),a()(),s(2,"spk-form-field",2)(3,"input",3),K("ngModelChange",function(r){return B(o.internalPath,r)||(o.internalPath=r),r}),P("ngModelChange",function(){return o.updateFilter()}),a(),C(4,Sn,2,1,"ng-container",4)(5,fn,2,1,"ng-container",5),a(),s(6,"div",6),P("click",function(){return o.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),a()()),t&2){let i,r;u("options",o.expressionOptions())("isClearable",!1),l(),V("ngModel",o.pathType),l(2),V("ngModel",o.internalPath),l(),T(!((i=o.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((r=o.currentExpressionOption())==null||r.endsWith==null)&&r.endsWith.length?5:-1)}},dependencies:[He,de,Fe,Ve,me,ue,ce],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Dn=["formRef"],Qt=()=>({standalone:!0});function En(e,n){if(e&1){let t=b();s(0,"spk-form-field",42)(1,"input",43),K("ngModelChange",function(i){F(t);let r=c(2);return B(r.editingPath,i)||(r.editingPath=i),g(i)}),a()(),s(2,"button",44),P("click",function(){F(t);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),a()(),s(5,"button",44),P("click",function(){F(t);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),a()()}if(e&2){let t=c(2);l(),V("ngModel",t.editingPath),u("ngModelOptions",Ze(2,Qt))}}function yn(e,n){if(e&1){let t=b();s(0,"spk-form-field",42),m(1,"input",45),a(),s(2,"button",44),P("click",function(){F(t);let i=c().$implicit,r=c();return g(r.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),a()(),s(5,"button",44),P("click",function(){F(t);let i=c().$implicit,r=c();return g(r.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),a()()}if(e&2){let t=c().$implicit;vt("readonly",!0),l(),u("ngModel",t)("ngModelOptions",Ze(3,Qt))}}function Pn(e,n){if(e&1&&(s(0,"div",30),C(1,En,8,3)(2,yn,8,4),a()),e&2){let t=n.$implicit,o=c();l(),T(o.oldPath()===t?1:2)}}function An(e,n){if(e&1){let t=b();s(0,"app-new-filter",47),P("pathChange",function(i){let r=F(t).$index,p=c(2);return g(p.patchPathAt(i,r))})("remove",function(){let i=F(t).$index,r=c(2);return g(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function Nn(e,n){if(e&1&&ee(0,An,1,2,"app-new-filter",46,Z),e&2){let t=c();te(t.pathArray())}}function kn(e,n){if(e&1&&(s(0,"div",41)(1,"spk-form-field"),m(2,"input",48),a(),s(3,"spk-select",49),m(4,"input",50),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var fe=new ge,On=["Bytes","KB","MB","GB","TB","PB"],Yt=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>fe.group({path:fe.control(e.path),excludes:fe.group({hidden:fe.control(e.excludes.hidden),system:fe.control(e.excludes.system),temporary:fe.control(e.excludes.temporary),filesLargerThan:fe.group({size:fe.control(null),unit:fe.control(null)})})}),wt=class e{#n=$(he);#t=$(pe);#o=$(Ee);formRef=we.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=v(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=D(On);osType=this.#n.osType;pathSignal=z(this.sourceDataForm.controls.path.valueChanges);pathArray=v(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=v(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=D(null);editingPath=D(null);addingNewPath=D(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),t=this.editingPath();if(!n||!t||t===n){this.oldPath.set(null),this.editingPath.set(null);return}let o=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(o?.replace(n,t)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let t=this.sourceDataForm.controls.path.value??"",o=t.indexOf(n);if(o===-1)return;let i=o===0?n:"\0"+n,r=t.replace(i,"");this.sourceDataForm.controls.path.setValue(r)}addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,h)=>h===t?`${n}`:`${p}`).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,p)=>p!==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,t=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${t}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Re(o.formRef,Dn,5),t&2&&Ie()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let h;h=$localize`Folder path`;let N;N=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let w;w=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let q;q=$localize`Paths`;let I;I=$localize`Add a path directly from your machine.`;let G;G=$localize`Filters`;let U;U=$localize`Customize your filters.`;let ne;ne=$localize`Add filter`;let J;J=$localize`Exclude`;let f;f=$localize`Choose if there’s any files you want to exclude.`;let A;A=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let L;L=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Files larger than `;let re;re=$localize`Edit path`;let oe;return oe=$localize`Select an option...`,[["formRef",""],p,h,N,w,q,I,G,U,ne,J,f,A,L,Q,k,[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,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",re,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",oe]]},template:function(t,o){if(t&1){let i=b();s(0,"form",16,0),P("submit",function(){return F(i),g(o.next())}),s(2,"div",17)(3,"h3",18),R(4,1),a(),s(5,"app-file-tree",19)(6,"label",20),R(7,2),a(),m(8,"input",21),a(),s(9,"div",22)(10,"button",23),P("click",function(){return F(i),g(o.goBack())}),E(11,3),m(12,"spk-icon"),y(),a(),s(13,"button",24),E(14,4),m(15,"spk-icon"),y(),a()()(),s(16,"div",25)(17,"app-toggle-card",26),X(18,27),R(19,5),H(),s(20,"p",28),R(21,6),a(),s(22,"div",29),ee(23,Pn,3,1,"div",30,Z),s(25,"div",31)(26,"spk-form-field"),m(27,"input",32),a(),s(28,"button",33),P("click",function(){return F(i),g(o.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),a()()()()(),s(31,"app-toggle-card",26),X(32,27),R(33,7),H(),s(34,"p",28),R(35,8),a(),s(36,"button",34),P("click",function(){return F(i),g(o.addFilter())}),R(37,9),a(),C(38,Nn,2,0),a(),s(39,"app-toggle-card",35),X(40,27),R(41,10),H(),s(42,"p",28),R(43,11),a(),s(44,"spk-toggle",36),E(45,12),m(46,"input",37),y(),a(),s(47,"spk-toggle",36),E(48,13),m(49,"input",38),y(),a(),s(50,"spk-toggle",36),E(51,14),m(52,"input",39),y(),a(),s(53,"spk-toggle",40),P("click",function(){return F(i),g(o.toggleFilesLargerThan())}),R(54,15),a(),C(55,kn,5,2,"div",41),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(12),u("disallowToggle",!0),l(6),te(o.nonFilterPaths()),l(4),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),T((i=o.pathSignal())!=null&&i.length?38:-1),l(),u("disallowToggle",!0),l(14),Pe("active",o.filesLargerThan()),l(2),T(o.filesLargerThan()?55:-1)}},dependencies:[He,Be,de,Ke,Le,Fe,Ue,Ve,ze,ct,We,Xe,ut,ue,ce,be,Ge,me,Ct,mt,je],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}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Jt="1W:1D,4W:1W,12M:1M",Te=new ge,he=class e{#n=$(pe);#t=$(lt);#o=$(ve);#i=$(dt);generalForm=qt();sourceDataForm=Yt();scheduleFields={autoRun:D(Oe.autoRun),nextTime:D(Oe.nextTime),runAgain:D(Oe.runAgain)};destinationForm=Zt();settings=D([]);optionsFields={remoteVolumeSize:D("50MB"),backupRetention:D("all"),backupRetentionTime:D(""),backupRetentionVersions:D(0),backupRetentionCustom:D("")};isDraft=D(!1);backupId=D(null);isSubmitting=D(!1);finishedLoading=D(!1);backupDefaults=D(null);isNew=v(()=>this.backupId()==="new");osType=v(()=>this.#t.systemInfo()?.OSType);selectedOptions=D([]);selectedAdvancedFormPair=D([]);destinationFormPair=D({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=v(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=D([]);notSelectedHttpOptions=v(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=z(this.sourceDataForm.valueChanges);destinationFormSignal=z(this.destinationForm.valueChanges);generalFormSignal=z(this.generalForm.valueChanges);encryptionFieldSignal=z(this.generalForm.controls.encryption.valueChanges);destinationOptions=v(()=>this.#t.backendModules()??[]);httpOptions=v(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#e)??[]);advancedOptions=v(()=>this.#t.systemInfo()?.Options?.map(this.#e)??[]);#e(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=v(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Mt,...n]});nonSelectedOptions=v(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#n.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],i=n.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,p={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let t=n.TargetURL?kt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=kt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(p=>p.Name==="encryption-module"),o=n.Settings?.find(p=>p.Name==="passphrase")?.Value??"",i=t?.Value&&t.Value.length?t.Value:"",r={name:n.Name??"",description:n.Description??""};i&&i!==""&&(r.encryption=i),o&&o!==""&&(r.password=o,r.repeatPassword=o),this.generalForm.patchValue(r)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let t=this.#i.fromString(n.Repeat)??null,o=this.#p(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>S(S({},i),o)),this.scheduleFields.runAgain.set({repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],o=n.Settings?.filter(p=>!t.includes(p.Name)),i=n.Settings?.filter(p=>t.includes(p.Name));this.settings.set(o??[]),o?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var r="all";i?.forEach(p=>{if(console.log("x",p.Name),p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return r="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return r="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Jt)r="smart";else return r="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(r)}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,t=this.getScheduleFormValue(),o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let h=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([G,U])=>U).map(([G,U])=>G):[],N=o.path?.split("\0")??[],w=this.mapFormsToSettings(),q=Object.entries(o.excludes??{}).filter(([G,U])=>U&&G!=="filesLargerThan").map(([G])=>G),I=o.excludes?.filesLargerThan;return q.length&&w.push({Name:"--exclude-files-attributes",Value:q.join(",")}),I&&I.size!==null&&I.unit!==null&&w.push({Name:"--skip-files-larger-than",Value:`${I.size}${I.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:N.filter(G=>!G.startsWith("-")),Settings:w,Filters:N.filter(G=>G.startsWith("-")).map((G,U)=>({Order:U,Include:!1,Expression:G.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:h}:null}}mapFormsToSettings(n=[]){let t=this.generalForm.value,o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];t.encryption!==""&&(i=[{Name:"encryption-module",Value:t.encryption??null},{Name:"passphrase",Value:t.password??null}]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:Jt});break}let p=[...n,...o],h=this.settings().filter(N=>!p.includes(N.Name)).map(N=>{let w=N.Value;return typeof N.Value=="number"&&(w=N.Value.toString()),typeof N.Value=="boolean"&&(w=N.Value?"True":"False"),{Name:N.Name,Value:w}});return[...i,...r,...h]}#a(n){return n.controls.map(t=>_t(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n);return{time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`,date:t.toISOString().split("T")[0]}}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Te.control(o));return}if(t.type==="Size"){n.addControl(t.name,Te.control(o));return}if(t.type==="Integer"){n.addControl(t.name,Te.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Te.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Te.control(o??""));return}if(t.type==="Timespan"||t.type==="DateTime"){n.addControl(t.name,Te.control(o,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=Se.find(f=>f.customKey===n||f.key===n),r=i?.key,p=this.destinationOptions().find(f=>f.Key===r),h=this.httpOptions();if(!p||!p.Options)return;let N=i&&i.oauthField?i.oauthField:null,w=i&&i.customFields?i.customFields:{},q=i&&i.dynamicFields?i.dynamicFields:[],I=i&&i.advancedFields?i.advancedFields:[],G=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:N,custom:[],dynamic:[],advanced:[]});let U=Te.group({}),ne=Te.group({}),J=Te.group({});w&&Object.entries(w).forEach(([f,A],L)=>{let re=A,{formElement:Q}=re,k=It(re,["formElement"]);U.addControl(f,Q(t?.custom[f])),this.destinationFormPair.update(oe=>(oe.custom.push(S({order:900+L},k)),oe))});for(let f=0;f<p.Options.length;f++){let A=p.Options[f];if(A.Deprecated)continue;let L=q.find(Q=>Q===A.Name||Q.name===A.Name);if(L){let Q=L&&typeof L!="string",k=Q?L?.defaultValue??A.DefaultValue:A.DefaultValue,re={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,order:900+f},oe=Q?S(S({},re),L):re,ot=t?.dynamic[A.Name]??k??A.DefaultValue;this.createFormField(ne,oe,ot),this.destinationFormPair.update(Me=>(Me.dynamic.push(oe),Me))}else{if(G.find(ae=>ae===A.Name))continue;let k=I.find(ae=>ae===A.Name||ae.name===A.Name),re=k&&typeof k!="string",oe=t?.advanced[A.Name],x=oe??A.DefaultValue,ot={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,defaultValue:x,order:900+f},Me=re?S(S({},ot),k):ot;o&&oe&&(this.createFormField(J,Me,x),this.selectedAdvancedFormPair.update(ae=>(ae.push(Me),ae))),this.destinationFormPair.update(ae=>(ae.advanced.push(Me),ae))}}for(let f=0;f<h.length;f++){let A=h[f],L=t?.advanced[A.name],Q=L??A.defaultValue;o&&L&&(this.createFormField(J,A,Q),this.selectedHttpOptions.update(k=>(k.push(A),k)))}this.destinationFormPair.update(f=>({oauthField:f.oauthField,custom:f.custom.sort((A,L)=>A.order-L.order),dynamic:f.dynamic.sort((A,L)=>A.order-L.order),advanced:f.advanced.sort((A,L)=>A.order-L.order)})),this.destinationForm.controls.destinations.push(en({key:i?.customKey??n,customGroup:U,dynamicGroup:ne,advancedGroup:J}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Oe.autoRun),this.scheduleFields.nextTime.set(Oe.nextTime),this.scheduleFields.runAgain.set(Oe.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(t){return new(t||e)};static \u0275prov=$e({token:e,factory:e.\u0275fac,providedIn:"root"})};var Mn=["formRef"],$n=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),wn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Rn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),In=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),xn=()=>({maxWidth:"700px",width:"100%"});function vn(e,n){e&1&&(E(0,5,2),m(1,"spk-icon"),y())}function bn(e,n){e&1&&R(0,5,3)}function Gn(e,n){if(e&1){let t=b();E(0,5,1),s(1,"button",21),P("click",function(){F(t);let i=c();return g(i.testDestination())}),C(2,vn,2,0)(3,bn,1,0),a(),y()}if(e&2){let t=c();l(),Pe("success",t.successfulTest()),l(),T(t.successfulTest()?2:3)}}function Ln(e,n){if(e&1){let t=b();s(0,"p",27),P("click",function(){F(t);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),m(2,"span",28),y(),a()}}function Un(e,n){if(e&1){let t=b();s(0,"div",34),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),a(),s(3,"p"),d(4),a()()}if(e&2){let t=n.$implicit;l(2),xe(t.displayName),l(2),xe(t.description)}}function Vn(e,n){if(e&1){let t=b();s(0,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),d(2),a()}if(e&2){let t=n.$implicit;l(2),j(" ",t.displayName," ")}}function Bn(e,n){if(e&1&&(s(0,"div",29),ee(1,Un,5,2,"div",30,Z),a(),s(3,"spk-menu",31)(4,"button",32),R(5,9),a(),X(6,20),ee(7,Vn,3,1,"button",33,Z),H(),a()),e&2){let t=c();l(),te(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),te(t.destinationTypeOptionsNotFocused())}}function Kn(e,n){e&1&&Je(0)}function Wn(e,n){if(e&1&&C(0,Kn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,St,tt(2,$n,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Xn(e,n){e&1&&Je(0)}function Hn(e,n){if(e&1&&C(0,Xn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,St,tt(2,wn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function zn(e,n){if(e&1){let t=b();E(0,10,1),s(1,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addAdvancedFormPair(i,0))}),a(),y()}if(e&2){let t=n.$implicit;l(),Dt(t.name),Et(0)}}function jn(e,n){e&1&&Je(0)}function qn(e,n){if(e&1&&C(0,jn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,St,tt(2,Rn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Qn(e,n){if(e&1){let t=b();E(0,11,1),s(1,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addHttpOption(i,0))}),a(),y()}if(e&2){let t=n.$implicit;l(),Dt(t.name),Et(0)}}function Yn(e,n){e&1&&Je(0)}function Jn(e,n){if(e&1&&C(0,Yn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,St,tt(2,In,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Zn(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function eo(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),C(3,Zn,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function to(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function no(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),C(3,to,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function oo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function io(e,n){e&1&&(s(0,"spk-icon",51),d(1,"link"),a())}function ro(e,n){e&1&&(s(0,"spk-icon",51),d(1,"envelope"),a())}function ao(e,n){e&1&&(s(0,"spk-icon",51),d(1,"textbox"),a())}function so(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),d(2),C(3,oo,3,1,"spk-tooltip",48),a(),m(4,"input",50),C(5,io,2,0,"spk-icon",51)(6,ro,2,0,"spk-icon",51)(7,ao,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),T(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function lo(e,n){if(e&1){let t=b();s(0,"span",55),P("click",function(){F(t);let i=c(2).$implicit,r=c(2);return g(r.oauthStartTokenCreation(i.destinationType))}),d(1,"AuthID"),a()}}function po(e,n){e&1&&(s(0,"spk-icon",51),d(1,"password"),a())}function co(e,n){if(e&1){let t=b();s(0,"spk-icon",56),P("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),a()}}function uo(e,n){if(e&1){let t=b();s(0,"spk-icon",56),P("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),a()}}function mo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),d(2),a(),m(3,"input",52),C(4,lo,2,0,"span",53)(5,po,2,0,"spk-icon",51)(6,co,2,0,"spk-icon",54)(7,uo,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),T(o.oauthField===o.formView.name?4:5),l(2),T(o.formView.showPassword?6:7)}}function _o(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function Fo(e,n){if(e&1&&d(0),e&2){let t=n.$implicit;j(" ",t," ")}}function go(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),d(2),C(3,_o,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),C(5,Fo,1,1,"ng-template",null,3,nt)),e&2){let t,o=ie(6);c();let i=At(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),j(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function Co(e,n){if(e&1&&(yt(0),C(1,go,7,14)),e&2){let t=c().$implicit,o=Pt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),T(o?1:-1)}}function ho(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function So(e,n){if(e&1&&d(0),e&2){let t=n.$implicit;Gt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function fo(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),d(2),C(3,ho,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),C(5,So,1,2,"ng-template",null,4,nt)),e&2){let t,o=ie(6);c();let i=At(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),j(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function To(e,n){e&1&&m(0,"spk-progress-bar",58)}function Do(e,n){if(e&1&&(yt(0),C(1,fo,7,15)(2,To,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=Pt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),T(o?1:2)}}function Eo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function yo(e,n){if(e&1&&(s(0,"app-size",45)(1,"label",47),d(2),C(3,Eo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.Name)("formControlName",o.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
+ item.asHttpOptions ? 'http' : 'other'
3
+ }}`),l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1)}}function Po(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Ao(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),d(2),C(3,Po,3,1,"spk-tooltip",48),a(),m(4,"input",60),s(5,"spk-icon",51),d(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function No(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function ko(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),C(3,No,3,1,"spk-tooltip",48),a(),m(4,"input",61),a()),e&2){let t,o=c().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function Oo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Mo(e,n){if(e&1&&d(0),e&2){let t=n.$implicit;j(" ",t," ")}}function $o(e,n){if(e&1&&(s(0,"spk-select",62)(1,"label",47),d(2),C(3,Oo,3,1,"spk-tooltip",48),a(),m(4,"input",63),a(),C(5,Mo,1,1,"ng-template",null,4,nt)),e&2){let t,o=ie(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),bt("for","destination-",i.formGroupName,"-",i.index,""),l(),j(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),le("formControlName",i.formView.name)}}function wo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Ro(e,n){if(e&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),C(3,wo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.formView.name)("formControlName",o.formView.name)("customId","destination-"+o.formGroupName+"-"+o.index+"-"+(o.asHttpOptions?"http":"other")),l(),W("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),j(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),T(o.formView.longDescription?3:-1)}}function Io(e,n){if(e&1){let t=b();s(0,"button",64),P("click",function(){F(t);let i=c().$implicit,r=c(2);return g(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),a()()}}function xo(e,n){if(e&1&&(s(0,"div",41),X(1,42),C(2,eo,5,17,"app-file-tree",43)(3,no,5,13,"app-file-tree",44)(4,so,8,13,"spk-form-field")(5,mo,8,13,"spk-form-field")(6,Co,2,2)(7,Do,3,2)(8,yo,4,9,"app-size",45)(9,Ao,7,11,"spk-form-field")(10,ko,5,11,"spk-toggle",46)(11,$o,7,9)(12,Ro,4,9,"app-timespan",45),H(),C(13,Io,3,0,"button",32),a()),e&2){let t=n.$implicit;Pe("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),T(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),l(11),T(t.formGroupName==="advanced"?13:-1)}}function vo(e,n){if(e&1&&(X(0,22)(1,36),ee(2,Wn,1,9,"ng-container",null,Z),ee(4,Hn,1,9,"ng-container",null,Z),s(6,"app-toggle-card",37),X(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),a(),X(12,20),ee(13,zn,3,1,"button",33,Z),H(),a(),y(),H(),ee(15,qn,1,9,"ng-container",null,Z),a(),s(17,"app-toggle-card",37),X(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),a(),X(23,20),ee(24,Qn,3,1,"button",33,Z),H(),a(),y(),H(),ee(26,Jn,1,9,"ng-container",null,Z),a(),C(28,xo,14,5,"ng-template",null,2,nt),H()()),e&2){let t=c();l(2),te(t.destinationFormPair().custom),l(2),te(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),te(t.notSelectedAdvancedFormPair()),l(2),te(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),te(t.notSelectedHttpOptions()),l(2),te(t.selectedHttpOptions())}}function bo(e,n){if(e&1){let t=b();s(0,"spk-dialog",65),K("isOpenChange",function(i){F(t);let r=c();return B(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),R(3,12),a(),s(4,"spk-alert",67),R(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),m(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),P("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),a(),s(12,"button",71),P("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!0))}),E(13,14),m(14,"spk-icon"),y(),a()()()}if(e&2){let t=c();V("isOpen",t.targetUrlDialogOpen),u("options",Ze(3,xn)),l(8),u("formControl",t.targetUrlCtrl)}}var ht=new ge,Zt=(e={destinations:[]})=>ht.group({destinations:ht.array(e.destinations)}),en=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>ht.group({destinationType:ht.control(e),custom:n,dynamic:t,advanced:o}),Rt=class e{#n=$(pe);#t=$(Ee);#o=$(Ut);#i=$(ve);#e=$(he);#r=$(Bt);injector=$(xt);formRef=we.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=v(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=D(!1);destinationTypeOptionsInFocus=D(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=D(Se.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=v(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#e.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#e.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#e.addHttpOption(n,t)}targetUrl=v(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=D(null);targetUrlDialogOpen=D(!1);openTargetUrlDialog(){let t=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#e.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(this.successfulTest.set(!1),r==="missing-folder"){this.#r.open(Ne,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe({next:()=>{this.#r.open(Ne,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{this.testDestination(n)}})}})}});return}if(r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(Ne,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
4
+ If this is a self-signed certificate, you can choose to trust this certificate.
5
+ The server reported the certificate hash: ${p}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:h=>{h&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",p)}});return}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],h=r.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(Ne,{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,
6
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
7
+ Do you want to REPLACE your CURRENT host key ${h}
8
+ with the REPORTED host key: ${p}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#e.addAdvancedFormPairByName("ssh-fingerprint",n,p)}}):this.#r.open(Ne,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${p}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#e.addAdvancedFormPairByName("ssh-fingerprint",n,p)}});return}this.#r.open(Ne,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:r,cancelText:$localize`OK`},closed:p=>{}})}})}mapToTargetUrl(n){return _t(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=D("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=D(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=D(!1);#p=D(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-t/2,p=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+p);h?.addEventListener("blur",N=>{console.log("event blur",N)}),h?.addEventListener("beforeunload",N=>{console.log("event beforeunload",N),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ye(()=>this.#a.set(!1))).subscribe({next:w=>{console.log("res",w),w?.authid&&this.#p.set(w.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Re(o.formRef,Mn,5),t&2&&Ie()},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=Ae(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let p;p=$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:`,p=Ae(p);let h;h=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,h=Ae(h);let N;N=$localize`Edit target URL`;let w;w=$localize` Be careful, this will overwrite everything you have in your destination. `;let q;return q=$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,t,o,i,r,p,h,N,w,q,[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"],[3,"inputType","formControlName","customId"],[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"],["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(t,o){if(t&1){let i=b();s(0,"form",15,0),P("submit",function(){return F(i),g(o.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),C(6,Gn,4,3,"button",18),s(7,"spk-menu")(8,"button",19),m(9,"spk-icon"),a(),X(10,20),s(11,"button",21),P("click",function(){return F(i),g(o.openTargetUrlDialog())}),m(12,"spk-icon"),a(),H(),a()(),y(),a(),C(13,Ln,3,0,"p"),a(),C(14,Bn,9,1)(15,vo,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),P("click",function(){return F(i),g(o.goBack())}),E(18,6),m(19,"spk-icon"),y(),a(),s(20,"button",25),E(21,7),m(22,"spk-icon"),y(),a()()(),C(23,bo,15,4,"spk-dialog",26)}if(t&2){let i;u("formGroup",o.destinationForm),l(6),T(o.destinationCount()>0?6:-1),l(7),T(o.destinationCount()>0?13:-1),l(),T(o.destinationCount()===0?14:-1),l(),T(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(o.targetUrlDialogOpen()?23:-1)}},dependencies:[ze,Be,de,Ke,Le,Fe,Ue,ct,We,Xe,ut,Wt,Lt,ue,Kt,ce,Ge,st,Vt,rt,me,at,jt,je,mt,zt],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{_t as a,Se as b,Zt as c,en as d,Rt as e,qt as f,Mt as g,Ot as h,Oe as i,$t as j,Yt as k,wt as l,he as m};
@@ -1 +1 @@
1
- import{$a as de,Ab as le,Bb as y,Cb as g,O as ue,Q as I,Sa as B,T as O,Ta as ce,V as T,W as P,aa as ae,ab as $,g as oe,sc as X}from"./chunk-XGARKXE4.js";var Ce=null;function q(){return Ce}function ln(e){Ce??=e}var fe=class{};var Fe=new O(""),ye=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>P(Me),providedIn:"platform"})}return e})();var Me=(()=>{class e extends ye{_location;_history;_doc=P(Fe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return q().getBaseHref(this._doc)}onPopState(n){let i=q().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=q().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,r){this._history.pushState(n,i,r)}replaceState(n,i,r){this._history.replaceState(n,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Ee(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function he(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function L(e){return e&&e[0]!=="?"?`?${e}`:e}var ie=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>P(Be),providedIn:"root"})}return e})(),Te=new O(""),Be=(()=>{class e extends ie{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,i){super(),this._platformLocation=n,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??P(Fe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Ee(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+L(this._platformLocation.search),r=this._platformLocation.hash;return r&&n?`${i}${r}`:i}pushState(n,i,r,s){let o=this.prepareExternalUrl(r+L(s));this._platformLocation.pushState(n,i,o)}replaceState(n,i,r,s){let o=this.prepareExternalUrl(r+L(s));this._platformLocation.replaceState(n,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(i){return new(i||e)(T(ye),T(Te,8))};static \u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Re=(()=>{class e{_subject=new oe;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=Ne(he(ge(i))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+L(i))}normalize(n){return e.stripTrailingSlash(Pe(this._basePath,ge(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",r=null){this._locationStrategy.pushState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+L(i)),r)}replaceState(n,i="",r=null){this._locationStrategy.replaceState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+L(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(r=>r(n,i))}subscribe(n,i,r){return this._subject.subscribe({next:n,error:i??void 0,complete:r??void 0})}static normalizeQueryParams=L;static joinWithSlash=Ee;static stripTrailingSlash=he;static \u0275fac=function(i){return new(i||e)(T(ie))};static \u0275prov=I({token:e,factory:()=>Oe(),providedIn:"root"})}return e})();function Oe(){return new Re(T(ie))}function Pe(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function ge(e){return e.replace(/\/index.html$/,"")}function Ne(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var we=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(we||{});var F=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(F||{}),c=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(c||{}),E=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(E||{}),w={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function ke(e){return y(e)[g.LocaleId]}function $e(e,t,n){let i=y(e),r=[i[g.DayPeriodsFormat],i[g.DayPeriodsStandalone]],s=A(r,t);return A(s,n)}function xe(e,t,n){let i=y(e),r=[i[g.DaysFormat],i[g.DaysStandalone]],s=A(r,t);return A(s,n)}function Ue(e,t,n){let i=y(e),r=[i[g.MonthsFormat],i[g.MonthsStandalone]],s=A(r,t);return A(s,n)}function ze(e,t){let i=y(e)[g.Eras];return A(i,t)}function x(e,t){let n=y(e);return A(n[g.DateFormat],t)}function U(e,t){let n=y(e);return A(n[g.TimeFormat],t)}function z(e,t){let i=y(e)[g.DateTimeFormat];return A(i,t)}function b(e,t){let n=y(e),i=n[g.NumberSymbols][t];if(typeof i>"u"){if(t===w.CurrencyDecimal)return n[g.NumberSymbols][w.Decimal];if(t===w.CurrencyGroup)return n[g.NumberSymbols][w.Group]}return i}function Ve(e,t){return y(e)[g.NumberFormats][t]}function Ae(e){if(!e[g.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[g.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function je(e){let t=y(e);return Ae(t),(t[g.ExtraData][2]||[]).map(i=>typeof i=="string"?J(i):[J(i[0]),J(i[1])])}function Ge(e,t,n){let i=y(e);Ae(i);let r=[i[g.ExtraData][0],i[g.ExtraData][1]],s=A(r,t)||[];return A(s,n)||[]}function A(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<"u")return e[n];throw new Error("Locale data API: locale data undefined")}function J(e){let[t,n]=e.split(":");return{hours:+t,minutes:+n}}var He=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,V={},Ze=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function Ye(e,t,n,i){let r=nt(e);t=_(n,t)||t;let o=[],u;for(;t;)if(u=Ze.exec(t),u){o=o.concat(u.slice(1));let f=o.pop();if(!f)break;t=f}else{o.push(t);break}let D=r.getTimezoneOffset();i&&(D=_e(i,D),r=tt(r,i,!0));let l="";return o.forEach(f=>{let a=Qe(f);l+=a?a(r,n,D):f==="''"?"'":f.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Y(e,t,n){let i=new Date(0);return i.setFullYear(e,t,n),i.setHours(0,0,0),i}function _(e,t){let n=ke(e);if(V[n]??={},V[n][t])return V[n][t];let i="";switch(t){case"shortDate":i=x(e,E.Short);break;case"mediumDate":i=x(e,E.Medium);break;case"longDate":i=x(e,E.Long);break;case"fullDate":i=x(e,E.Full);break;case"shortTime":i=U(e,E.Short);break;case"mediumTime":i=U(e,E.Medium);break;case"longTime":i=U(e,E.Long);break;case"fullTime":i=U(e,E.Full);break;case"short":let r=_(e,"shortTime"),s=_(e,"shortDate");i=j(z(e,E.Short),[r,s]);break;case"medium":let o=_(e,"mediumTime"),u=_(e,"mediumDate");i=j(z(e,E.Medium),[o,u]);break;case"long":let D=_(e,"longTime"),l=_(e,"longDate");i=j(z(e,E.Long),[D,l]);break;case"full":let f=_(e,"fullTime"),a=_(e,"fullDate");i=j(z(e,E.Full),[f,a]);break}return i&&(V[n][t]=i),i}function j(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,i){return t!=null&&i in t?t[i]:n})),e}function S(e,t,n="-",i,r){let s="";(e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,s=n));let o=String(e);for(;o.length<t;)o="0"+o;return i&&(o=o.slice(o.length-t)),s+o}function We(e,t){return S(e,3).substring(0,t)}function p(e,t,n=0,i=!1,r=!1){return function(s,o){let u=Ke(e,s);if((n>0||u>-n)&&(u+=n),e===3)u===0&&n===-12&&(u=12);else if(e===6)return We(u,t);let D=b(o,w.MinusSign);return S(u,t,D,i,r)}}function Ke(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}function d(e,t,n=F.Format,i=!1){return function(r,s){return Xe(r,s,e,t,n,i)}}function Xe(e,t,n,i,r,s){switch(n){case 2:return Ue(t,r,i)[e.getMonth()];case 1:return xe(t,r,i)[e.getDay()];case 0:let o=e.getHours(),u=e.getMinutes();if(s){let l=je(t),f=Ge(t,r,i),a=l.findIndex(m=>{if(Array.isArray(m)){let[h,C]=m,R=o>=h.hours&&u>=h.minutes,v=o<C.hours||o===C.hours&&u<C.minutes;if(h.hours<C.hours){if(R&&v)return!0}else if(R||v)return!0}else if(m.hours===o&&m.minutes===u)return!0;return!1});if(a!==-1)return f[a]}return $e(t,r,i)[o<12?0:1];case 3:return ze(t,i)[e.getFullYear()<=0?0:1];default:let D=n;throw new Error(`unexpected translation type ${D}`)}}function G(e){return function(t,n,i){let r=-1*i,s=b(n,w.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(e){case 0:return(r>=0?"+":"")+S(o,2,s)+S(Math.abs(r%60),2,s);case 1:return"GMT"+(r>=0?"+":"")+S(o,1,s);case 2:return"GMT"+(r>=0?"+":"")+S(o,2,s)+":"+S(Math.abs(r%60),2,s);case 3:return i===0?"Z":(r>=0?"+":"")+S(o,2,s)+":"+S(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}var qe=0,Z=4;function Je(e){let t=Y(e,qe,1).getDay();return Y(e,0,1+(t<=Z?Z:Z+7)-t)}function Se(e){let t=e.getDay(),n=t===0?-3:Z-t;return Y(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Q(e,t=!1){return function(n,i){let r;if(t){let s=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,o=n.getDate();r=1+Math.floor((o+s)/7)}else{let s=Se(n),o=Je(s.getFullYear()),u=s.getTime()-o.getTime();r=1+Math.round(u/6048e5)}return S(r,e,b(i,w.MinusSign))}}function H(e,t=!1){return function(n,i){let s=Se(n).getFullYear();return S(s,e,b(i,w.MinusSign),t)}}var ee={};function Qe(e){if(ee[e])return ee[e];let t;switch(e){case"G":case"GG":case"GGG":t=d(3,c.Abbreviated);break;case"GGGG":t=d(3,c.Wide);break;case"GGGGG":t=d(3,c.Narrow);break;case"y":t=p(0,1,0,!1,!0);break;case"yy":t=p(0,2,0,!0,!0);break;case"yyy":t=p(0,3,0,!1,!0);break;case"yyyy":t=p(0,4,0,!1,!0);break;case"Y":t=H(1);break;case"YY":t=H(2,!0);break;case"YYY":t=H(3);break;case"YYYY":t=H(4);break;case"M":case"L":t=p(1,1,1);break;case"MM":case"LL":t=p(1,2,1);break;case"MMM":t=d(2,c.Abbreviated);break;case"MMMM":t=d(2,c.Wide);break;case"MMMMM":t=d(2,c.Narrow);break;case"LLL":t=d(2,c.Abbreviated,F.Standalone);break;case"LLLL":t=d(2,c.Wide,F.Standalone);break;case"LLLLL":t=d(2,c.Narrow,F.Standalone);break;case"w":t=Q(1);break;case"ww":t=Q(2);break;case"W":t=Q(1,!0);break;case"d":t=p(2,1);break;case"dd":t=p(2,2);break;case"c":case"cc":t=p(7,1);break;case"ccc":t=d(1,c.Abbreviated,F.Standalone);break;case"cccc":t=d(1,c.Wide,F.Standalone);break;case"ccccc":t=d(1,c.Narrow,F.Standalone);break;case"cccccc":t=d(1,c.Short,F.Standalone);break;case"E":case"EE":case"EEE":t=d(1,c.Abbreviated);break;case"EEEE":t=d(1,c.Wide);break;case"EEEEE":t=d(1,c.Narrow);break;case"EEEEEE":t=d(1,c.Short);break;case"a":case"aa":case"aaa":t=d(0,c.Abbreviated);break;case"aaaa":t=d(0,c.Wide);break;case"aaaaa":t=d(0,c.Narrow);break;case"b":case"bb":case"bbb":t=d(0,c.Abbreviated,F.Standalone,!0);break;case"bbbb":t=d(0,c.Wide,F.Standalone,!0);break;case"bbbbb":t=d(0,c.Narrow,F.Standalone,!0);break;case"B":case"BB":case"BBB":t=d(0,c.Abbreviated,F.Format,!0);break;case"BBBB":t=d(0,c.Wide,F.Format,!0);break;case"BBBBB":t=d(0,c.Narrow,F.Format,!0);break;case"h":t=p(3,1,-12);break;case"hh":t=p(3,2,-12);break;case"H":t=p(3,1);break;case"HH":t=p(3,2);break;case"m":t=p(4,1);break;case"mm":t=p(4,2);break;case"s":t=p(5,1);break;case"ss":t=p(5,2);break;case"S":t=p(6,1);break;case"SS":t=p(6,2);break;case"SSS":t=p(6,3);break;case"Z":case"ZZ":case"ZZZ":t=G(0);break;case"ZZZZZ":t=G(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=G(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=G(2);break;default:return null}return ee[e]=t,t}function _e(e,t){e=e.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function et(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function tt(e,t,n){let i=n?-1:1,r=e.getTimezoneOffset(),s=_e(t,r);return et(e,i*(s-r))}function nt(e){if(De(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[r,s=1,o=1]=e.split("-").map(u=>+u);return Y(r,s-1,o)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let i;if(i=e.match(He))return it(i)}let t=new Date(e);if(!De(t))throw new Error(`Unable to convert "${e}" into a date`);return t}function it(e){let t=new Date(0),n=0,i=0,r=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),r.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,u=Number(e[5]||0)-i,D=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,o,u,D,l),t}function De(e){return e instanceof Date&&!isNaN(e.valueOf())}var rt=/^(\d+)?\.((\d+)(-(\d+))?)?$/,pe=22,W=".",N="0",st=";",ot=",",te="#";function ut(e,t,n,i,r,s,o=!1){let u="",D=!1;if(!isFinite(e))u=b(n,w.Infinity);else{let l=lt(e);o&&(l=dt(l));let f=t.minInt,a=t.minFrac,m=t.maxFrac;if(s){let M=s.match(rt);if(M===null)throw new Error(`${s} is not a valid digit info`);let re=M[1],K=M[3],se=M[5];re!=null&&(f=ne(re)),K!=null&&(a=ne(K)),se!=null?m=ne(se):K!=null&&a>m&&(m=a)}ft(l,a,m);let h=l.digits,C=l.integerLen,R=l.exponent,v=[];for(D=h.every(M=>!M);C<f;C++)h.unshift(0);for(;C<0;C++)h.unshift(0);C>0?v=h.splice(C,h.length):(v=h,h=[0]);let k=[];for(h.length>=t.lgSize&&k.unshift(h.splice(-t.lgSize,h.length).join(""));h.length>t.gSize;)k.unshift(h.splice(-t.gSize,h.length).join(""));h.length&&k.unshift(h.join("")),u=k.join(b(n,i)),v.length&&(u+=b(n,r)+v.join("")),R&&(u+=b(n,w.Exponential)+"+"+R)}return e<0&&!D?u=t.negPre+u+t.negSuf:u=t.posPre+u+t.posSuf,u}function at(e,t,n){let i=Ve(t,we.Decimal),r=ct(i,b(t,w.MinusSign));return ut(e,r,t,w.Group,w.Decimal,n)}function ct(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=e.split(st),r=i[0],s=i[1],o=r.indexOf(W)!==-1?r.split(W):[r.substring(0,r.lastIndexOf(N)+1),r.substring(r.lastIndexOf(N)+1)],u=o[0],D=o[1]||"";n.posPre=u.substring(0,u.indexOf(te));for(let f=0;f<D.length;f++){let a=D.charAt(f);a===N?n.minFrac=n.maxFrac=f+1:a===te?n.maxFrac=f+1:n.posSuf+=a}let l=u.split(ot);if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){let f=r.length-n.posPre.length-n.posSuf.length,a=s.indexOf(te);n.negPre=s.substring(0,a).replace(/'/g,""),n.negSuf=s.slice(a+f).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function dt(e){if(e.digits[0]===0)return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(t===0?e.digits.push(0,0):t===1&&e.digits.push(0),e.integerLen+=2),e}function lt(e){let t=Math.abs(e)+"",n=0,i,r,s,o,u;for((r=t.indexOf(W))>-1&&(t=t.replace(W,"")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;t.charAt(s)===N;s++);if(s===(u=t.length))i=[0],r=1;else{for(u--;t.charAt(u)===N;)u--;for(r-=s,i=[],o=0;s<=u;s++,o++)i[o]=Number(t.charAt(s))}return r>pe&&(i=i.splice(0,pe-1),n=r-1,r=1),{digits:i,exponent:n,integerLen:r}}function ft(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let i=e.digits,r=i.length-e.integerLen,s=Math.min(Math.max(t,r),n),o=s+e.integerLen,u=i[o];if(o>0){i.splice(Math.max(e.integerLen,o));for(let a=o;a<i.length;a++)i[a]=0}else{r=Math.max(0,r),e.integerLen=1,i.length=Math.max(1,o=s+1),i[0]=0;for(let a=1;a<o;a++)i[a]=0}if(u>=5)if(o-1<0){for(let a=0;a>o;a--)i.unshift(0),e.integerLen++;i.unshift(1),e.integerLen++}else i[o-1]++;for(;r<Math.max(0,s);r++)i.push(0);let D=s!==0,l=t+e.integerLen,f=i.reduceRight(function(a,m,h,C){return m=m+a,C[h]=m<10?m:m-10,D&&(C[h]===0&&h>=l?C.pop():D=!1),m>=10?1:0},0);f&&(i.unshift(f),e.integerLen++)}function ne(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function fn(e,t,n){return le(e,t,n)}function hn(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let i=n.indexOf("="),[r,s]=i==-1?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===t)return decodeURIComponent(s)}return null}var gn=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(n,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||e)(B(ce))};static \u0275dir=de({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ae]})}return e})();function be(e,t){return new ue(2100,!1)}var ht="mediumDate",gt=new O(""),Dt=new O(""),Dn=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,i,r){this.locale=n,this.defaultTimezone=i,this.defaultOptions=r}transform(n,i,r,s){if(n==null||n===""||n!==n)return null;try{let o=i??this.defaultOptions?.dateFormat??ht,u=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ye(n,o,s||this.locale,u)}catch(o){throw be(e,o.message)}}static \u0275fac=function(i){return new(i||e)(B(X,16),B(gt,24),B(Dt,24))};static \u0275pipe=$({name:"date",type:e,pure:!0})}return e})();var pn=(()=>{class e{transform(n){return JSON.stringify(n,null,2)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=$({name:"json",type:e,pure:!1})}return e})();var mn=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,i,r){if(!pt(n))return null;r||=this._locale;try{let s=mt(n);return at(s,r,i)}catch(s){throw be(e,s.message)}}static \u0275fac=function(i){return new(i||e)(B(X,16))};static \u0275pipe=$({name:"number",type:e,pure:!0})}return e})();function pt(e){return!(e==null||e===""||e!==e)}function mt(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var Ct="browser",Ft="server";function Cn(e){return e===Ct}function Fn(e){return e===Ft}var me=class{};export{q as a,ln as b,fe as c,Fe as d,ie as e,Re as f,fn as g,hn as h,gn as i,Dn as j,pn as k,mn as l,Ct as m,Cn as n,Fn as o,me as p};
1
+ import{Bb as le,Cb as y,Db as g,P as ue,R as I,Ta as B,U as O,Ua as ce,W as T,X as P,ab as de,ba as ae,bb as $,i as oe,tc as X}from"./chunk-GM25ACCR.js";var Ce=null;function q(){return Ce}function ln(e){Ce??=e}var fe=class{};var Fe=new O(""),ye=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>P(Me),providedIn:"platform"})}return e})();var Me=(()=>{class e extends ye{_location;_history;_doc=P(Fe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return q().getBaseHref(this._doc)}onPopState(n){let i=q().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=q().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,i,r){this._history.pushState(n,i,r)}replaceState(n,i,r){this._history.replaceState(n,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function Ee(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function he(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function L(e){return e&&e[0]!=="?"?`?${e}`:e}var ie=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||e)};static \u0275prov=I({token:e,factory:()=>P(Be),providedIn:"root"})}return e})(),Te=new O(""),Be=(()=>{class e extends ie{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,i){super(),this._platformLocation=n,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??P(Fe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Ee(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+L(this._platformLocation.search),r=this._platformLocation.hash;return r&&n?`${i}${r}`:i}pushState(n,i,r,s){let o=this.prepareExternalUrl(r+L(s));this._platformLocation.pushState(n,i,o)}replaceState(n,i,r,s){let o=this.prepareExternalUrl(r+L(s));this._platformLocation.replaceState(n,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(i){return new(i||e)(T(ye),T(Te,8))};static \u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Re=(()=>{class e{_subject=new oe;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=Ne(he(ge(i))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+L(i))}normalize(n){return e.stripTrailingSlash(Pe(this._basePath,ge(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",r=null){this._locationStrategy.pushState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+L(i)),r)}replaceState(n,i="",r=null){this._locationStrategy.replaceState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+L(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(r=>r(n,i))}subscribe(n,i,r){return this._subject.subscribe({next:n,error:i??void 0,complete:r??void 0})}static normalizeQueryParams=L;static joinWithSlash=Ee;static stripTrailingSlash=he;static \u0275fac=function(i){return new(i||e)(T(ie))};static \u0275prov=I({token:e,factory:()=>Oe(),providedIn:"root"})}return e})();function Oe(){return new Re(T(ie))}function Pe(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function ge(e){return e.replace(/\/index.html$/,"")}function Ne(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}var we=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(we||{});var F=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(F||{}),c=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(c||{}),E=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(E||{}),w={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function ke(e){return y(e)[g.LocaleId]}function $e(e,t,n){let i=y(e),r=[i[g.DayPeriodsFormat],i[g.DayPeriodsStandalone]],s=A(r,t);return A(s,n)}function xe(e,t,n){let i=y(e),r=[i[g.DaysFormat],i[g.DaysStandalone]],s=A(r,t);return A(s,n)}function Ue(e,t,n){let i=y(e),r=[i[g.MonthsFormat],i[g.MonthsStandalone]],s=A(r,t);return A(s,n)}function ze(e,t){let i=y(e)[g.Eras];return A(i,t)}function x(e,t){let n=y(e);return A(n[g.DateFormat],t)}function U(e,t){let n=y(e);return A(n[g.TimeFormat],t)}function z(e,t){let i=y(e)[g.DateTimeFormat];return A(i,t)}function b(e,t){let n=y(e),i=n[g.NumberSymbols][t];if(typeof i>"u"){if(t===w.CurrencyDecimal)return n[g.NumberSymbols][w.Decimal];if(t===w.CurrencyGroup)return n[g.NumberSymbols][w.Group]}return i}function Ve(e,t){return y(e)[g.NumberFormats][t]}function Ae(e){if(!e[g.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[g.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function je(e){let t=y(e);return Ae(t),(t[g.ExtraData][2]||[]).map(i=>typeof i=="string"?J(i):[J(i[0]),J(i[1])])}function Ge(e,t,n){let i=y(e);Ae(i);let r=[i[g.ExtraData][0],i[g.ExtraData][1]],s=A(r,t)||[];return A(s,n)||[]}function A(e,t){for(let n=t;n>-1;n--)if(typeof e[n]<"u")return e[n];throw new Error("Locale data API: locale data undefined")}function J(e){let[t,n]=e.split(":");return{hours:+t,minutes:+n}}var He=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,V={},Ze=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function Ye(e,t,n,i){let r=nt(e);t=_(n,t)||t;let o=[],u;for(;t;)if(u=Ze.exec(t),u){o=o.concat(u.slice(1));let f=o.pop();if(!f)break;t=f}else{o.push(t);break}let D=r.getTimezoneOffset();i&&(D=_e(i,D),r=tt(r,i,!0));let l="";return o.forEach(f=>{let a=Qe(f);l+=a?a(r,n,D):f==="''"?"'":f.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Y(e,t,n){let i=new Date(0);return i.setFullYear(e,t,n),i.setHours(0,0,0),i}function _(e,t){let n=ke(e);if(V[n]??={},V[n][t])return V[n][t];let i="";switch(t){case"shortDate":i=x(e,E.Short);break;case"mediumDate":i=x(e,E.Medium);break;case"longDate":i=x(e,E.Long);break;case"fullDate":i=x(e,E.Full);break;case"shortTime":i=U(e,E.Short);break;case"mediumTime":i=U(e,E.Medium);break;case"longTime":i=U(e,E.Long);break;case"fullTime":i=U(e,E.Full);break;case"short":let r=_(e,"shortTime"),s=_(e,"shortDate");i=j(z(e,E.Short),[r,s]);break;case"medium":let o=_(e,"mediumTime"),u=_(e,"mediumDate");i=j(z(e,E.Medium),[o,u]);break;case"long":let D=_(e,"longTime"),l=_(e,"longDate");i=j(z(e,E.Long),[D,l]);break;case"full":let f=_(e,"fullTime"),a=_(e,"fullDate");i=j(z(e,E.Full),[f,a]);break}return i&&(V[n][t]=i),i}function j(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,i){return t!=null&&i in t?t[i]:n})),e}function S(e,t,n="-",i,r){let s="";(e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,s=n));let o=String(e);for(;o.length<t;)o="0"+o;return i&&(o=o.slice(o.length-t)),s+o}function We(e,t){return S(e,3).substring(0,t)}function p(e,t,n=0,i=!1,r=!1){return function(s,o){let u=Ke(e,s);if((n>0||u>-n)&&(u+=n),e===3)u===0&&n===-12&&(u=12);else if(e===6)return We(u,t);let D=b(o,w.MinusSign);return S(u,t,D,i,r)}}function Ke(e,t){switch(e){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}function d(e,t,n=F.Format,i=!1){return function(r,s){return Xe(r,s,e,t,n,i)}}function Xe(e,t,n,i,r,s){switch(n){case 2:return Ue(t,r,i)[e.getMonth()];case 1:return xe(t,r,i)[e.getDay()];case 0:let o=e.getHours(),u=e.getMinutes();if(s){let l=je(t),f=Ge(t,r,i),a=l.findIndex(m=>{if(Array.isArray(m)){let[h,C]=m,R=o>=h.hours&&u>=h.minutes,v=o<C.hours||o===C.hours&&u<C.minutes;if(h.hours<C.hours){if(R&&v)return!0}else if(R||v)return!0}else if(m.hours===o&&m.minutes===u)return!0;return!1});if(a!==-1)return f[a]}return $e(t,r,i)[o<12?0:1];case 3:return ze(t,i)[e.getFullYear()<=0?0:1];default:let D=n;throw new Error(`unexpected translation type ${D}`)}}function G(e){return function(t,n,i){let r=-1*i,s=b(n,w.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(e){case 0:return(r>=0?"+":"")+S(o,2,s)+S(Math.abs(r%60),2,s);case 1:return"GMT"+(r>=0?"+":"")+S(o,1,s);case 2:return"GMT"+(r>=0?"+":"")+S(o,2,s)+":"+S(Math.abs(r%60),2,s);case 3:return i===0?"Z":(r>=0?"+":"")+S(o,2,s)+":"+S(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}var qe=0,Z=4;function Je(e){let t=Y(e,qe,1).getDay();return Y(e,0,1+(t<=Z?Z:Z+7)-t)}function Se(e){let t=e.getDay(),n=t===0?-3:Z-t;return Y(e.getFullYear(),e.getMonth(),e.getDate()+n)}function Q(e,t=!1){return function(n,i){let r;if(t){let s=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,o=n.getDate();r=1+Math.floor((o+s)/7)}else{let s=Se(n),o=Je(s.getFullYear()),u=s.getTime()-o.getTime();r=1+Math.round(u/6048e5)}return S(r,e,b(i,w.MinusSign))}}function H(e,t=!1){return function(n,i){let s=Se(n).getFullYear();return S(s,e,b(i,w.MinusSign),t)}}var ee={};function Qe(e){if(ee[e])return ee[e];let t;switch(e){case"G":case"GG":case"GGG":t=d(3,c.Abbreviated);break;case"GGGG":t=d(3,c.Wide);break;case"GGGGG":t=d(3,c.Narrow);break;case"y":t=p(0,1,0,!1,!0);break;case"yy":t=p(0,2,0,!0,!0);break;case"yyy":t=p(0,3,0,!1,!0);break;case"yyyy":t=p(0,4,0,!1,!0);break;case"Y":t=H(1);break;case"YY":t=H(2,!0);break;case"YYY":t=H(3);break;case"YYYY":t=H(4);break;case"M":case"L":t=p(1,1,1);break;case"MM":case"LL":t=p(1,2,1);break;case"MMM":t=d(2,c.Abbreviated);break;case"MMMM":t=d(2,c.Wide);break;case"MMMMM":t=d(2,c.Narrow);break;case"LLL":t=d(2,c.Abbreviated,F.Standalone);break;case"LLLL":t=d(2,c.Wide,F.Standalone);break;case"LLLLL":t=d(2,c.Narrow,F.Standalone);break;case"w":t=Q(1);break;case"ww":t=Q(2);break;case"W":t=Q(1,!0);break;case"d":t=p(2,1);break;case"dd":t=p(2,2);break;case"c":case"cc":t=p(7,1);break;case"ccc":t=d(1,c.Abbreviated,F.Standalone);break;case"cccc":t=d(1,c.Wide,F.Standalone);break;case"ccccc":t=d(1,c.Narrow,F.Standalone);break;case"cccccc":t=d(1,c.Short,F.Standalone);break;case"E":case"EE":case"EEE":t=d(1,c.Abbreviated);break;case"EEEE":t=d(1,c.Wide);break;case"EEEEE":t=d(1,c.Narrow);break;case"EEEEEE":t=d(1,c.Short);break;case"a":case"aa":case"aaa":t=d(0,c.Abbreviated);break;case"aaaa":t=d(0,c.Wide);break;case"aaaaa":t=d(0,c.Narrow);break;case"b":case"bb":case"bbb":t=d(0,c.Abbreviated,F.Standalone,!0);break;case"bbbb":t=d(0,c.Wide,F.Standalone,!0);break;case"bbbbb":t=d(0,c.Narrow,F.Standalone,!0);break;case"B":case"BB":case"BBB":t=d(0,c.Abbreviated,F.Format,!0);break;case"BBBB":t=d(0,c.Wide,F.Format,!0);break;case"BBBBB":t=d(0,c.Narrow,F.Format,!0);break;case"h":t=p(3,1,-12);break;case"hh":t=p(3,2,-12);break;case"H":t=p(3,1);break;case"HH":t=p(3,2);break;case"m":t=p(4,1);break;case"mm":t=p(4,2);break;case"s":t=p(5,1);break;case"ss":t=p(5,2);break;case"S":t=p(6,1);break;case"SS":t=p(6,2);break;case"SSS":t=p(6,3);break;case"Z":case"ZZ":case"ZZZ":t=G(0);break;case"ZZZZZ":t=G(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=G(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=G(2);break;default:return null}return ee[e]=t,t}function _e(e,t){e=e.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function et(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function tt(e,t,n){let i=n?-1:1,r=e.getTimezoneOffset(),s=_e(t,r);return et(e,i*(s-r))}function nt(e){if(De(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[r,s=1,o=1]=e.split("-").map(u=>+u);return Y(r,s-1,o)}let n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let i;if(i=e.match(He))return it(i)}let t=new Date(e);if(!De(t))throw new Error(`Unable to convert "${e}" into a date`);return t}function it(e){let t=new Date(0),n=0,i=0,r=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),r.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let o=Number(e[4]||0)-n,u=Number(e[5]||0)-i,D=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,o,u,D,l),t}function De(e){return e instanceof Date&&!isNaN(e.valueOf())}var rt=/^(\d+)?\.((\d+)(-(\d+))?)?$/,pe=22,W=".",N="0",st=";",ot=",",te="#";function ut(e,t,n,i,r,s,o=!1){let u="",D=!1;if(!isFinite(e))u=b(n,w.Infinity);else{let l=lt(e);o&&(l=dt(l));let f=t.minInt,a=t.minFrac,m=t.maxFrac;if(s){let M=s.match(rt);if(M===null)throw new Error(`${s} is not a valid digit info`);let re=M[1],K=M[3],se=M[5];re!=null&&(f=ne(re)),K!=null&&(a=ne(K)),se!=null?m=ne(se):K!=null&&a>m&&(m=a)}ft(l,a,m);let h=l.digits,C=l.integerLen,R=l.exponent,v=[];for(D=h.every(M=>!M);C<f;C++)h.unshift(0);for(;C<0;C++)h.unshift(0);C>0?v=h.splice(C,h.length):(v=h,h=[0]);let k=[];for(h.length>=t.lgSize&&k.unshift(h.splice(-t.lgSize,h.length).join(""));h.length>t.gSize;)k.unshift(h.splice(-t.gSize,h.length).join(""));h.length&&k.unshift(h.join("")),u=k.join(b(n,i)),v.length&&(u+=b(n,r)+v.join("")),R&&(u+=b(n,w.Exponential)+"+"+R)}return e<0&&!D?u=t.negPre+u+t.negSuf:u=t.posPre+u+t.posSuf,u}function at(e,t,n){let i=Ve(t,we.Decimal),r=ct(i,b(t,w.MinusSign));return ut(e,r,t,w.Group,w.Decimal,n)}function ct(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=e.split(st),r=i[0],s=i[1],o=r.indexOf(W)!==-1?r.split(W):[r.substring(0,r.lastIndexOf(N)+1),r.substring(r.lastIndexOf(N)+1)],u=o[0],D=o[1]||"";n.posPre=u.substring(0,u.indexOf(te));for(let f=0;f<D.length;f++){let a=D.charAt(f);a===N?n.minFrac=n.maxFrac=f+1:a===te?n.maxFrac=f+1:n.posSuf+=a}let l=u.split(ot);if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){let f=r.length-n.posPre.length-n.posSuf.length,a=s.indexOf(te);n.negPre=s.substring(0,a).replace(/'/g,""),n.negSuf=s.slice(a+f).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function dt(e){if(e.digits[0]===0)return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(t===0?e.digits.push(0,0):t===1&&e.digits.push(0),e.integerLen+=2),e}function lt(e){let t=Math.abs(e)+"",n=0,i,r,s,o,u;for((r=t.indexOf(W))>-1&&(t=t.replace(W,"")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;t.charAt(s)===N;s++);if(s===(u=t.length))i=[0],r=1;else{for(u--;t.charAt(u)===N;)u--;for(r-=s,i=[],o=0;s<=u;s++,o++)i[o]=Number(t.charAt(s))}return r>pe&&(i=i.splice(0,pe-1),n=r-1,r=1),{digits:i,exponent:n,integerLen:r}}function ft(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let i=e.digits,r=i.length-e.integerLen,s=Math.min(Math.max(t,r),n),o=s+e.integerLen,u=i[o];if(o>0){i.splice(Math.max(e.integerLen,o));for(let a=o;a<i.length;a++)i[a]=0}else{r=Math.max(0,r),e.integerLen=1,i.length=Math.max(1,o=s+1),i[0]=0;for(let a=1;a<o;a++)i[a]=0}if(u>=5)if(o-1<0){for(let a=0;a>o;a--)i.unshift(0),e.integerLen++;i.unshift(1),e.integerLen++}else i[o-1]++;for(;r<Math.max(0,s);r++)i.push(0);let D=s!==0,l=t+e.integerLen,f=i.reduceRight(function(a,m,h,C){return m=m+a,C[h]=m<10?m:m-10,D&&(C[h]===0&&h>=l?C.pop():D=!1),m>=10?1:0},0);f&&(i.unshift(f),e.integerLen++)}function ne(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function fn(e,t,n){return le(e,t,n)}function hn(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let i=n.indexOf("="),[r,s]=i==-1?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===t)return decodeURIComponent(s)}return null}var gn=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(n,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||e)(B(ce))};static \u0275dir=de({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ae]})}return e})();function be(e,t){return new ue(2100,!1)}var ht="mediumDate",gt=new O(""),Dt=new O(""),Dn=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(n,i,r){this.locale=n,this.defaultTimezone=i,this.defaultOptions=r}transform(n,i,r,s){if(n==null||n===""||n!==n)return null;try{let o=i??this.defaultOptions?.dateFormat??ht,u=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ye(n,o,s||this.locale,u)}catch(o){throw be(e,o.message)}}static \u0275fac=function(i){return new(i||e)(B(X,16),B(gt,24),B(Dt,24))};static \u0275pipe=$({name:"date",type:e,pure:!0})}return e})();var pn=(()=>{class e{transform(n){return JSON.stringify(n,null,2)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=$({name:"json",type:e,pure:!1})}return e})();var mn=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,i,r){if(!pt(n))return null;r||=this._locale;try{let s=mt(n);return at(s,r,i)}catch(s){throw be(e,s.message)}}static \u0275fac=function(i){return new(i||e)(B(X,16))};static \u0275pipe=$({name:"number",type:e,pure:!0})}return e})();function pt(e){return!(e==null||e===""||e!==e)}function mt(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new Error(`${e} is not a number`);return e}var Ct="browser",Ft="server";function Cn(e){return e===Ct}function Fn(e){return e===Ft}var me=class{};export{q as a,ln as b,fe as c,Fe as d,ie as e,Re as f,fn as g,hn as h,gn as i,Dn as j,pn as k,mn as l,Ct as m,Cn as n,Fn as o,me as p};
@@ -0,0 +1 @@
1
+ import{a as k}from"./chunk-6OYKPS4F.js";import"./chunk-5242ZMFS.js";import"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{e as S}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{a as T,g as M,h as f}from"./chunk-6WLXFV43.js";import"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{Eb as s,Fb as l,Gb as i,Oa as c,_a as D,jc as d,lb as r,ub as e,vb as n,wb as _}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -0,0 +1 @@
1
+ import{a as ve}from"./chunk-OELZQ6RK.js";import{s as Te}from"./chunk-QTTYDT3P.js";import{a as fe,f as ge,l as me,n as Ce,p as Pe,z as Ee}from"./chunk-6WLXFV43.js";import{b as _e}from"./chunk-DYCJPQSE.js";import{i as he}from"./chunk-2IDHF5MN.js";import{$b as de,A as ee,Ab as W,E as H,Gb as A,Hb as oe,Ib as le,Kb as k,Lb as h,Mb as ae,Nb as L,Oa as m,Va as q,Wb as K,X as j,Xb as ce,Yb as U,Zb as S,_a as te,ca as w,da as N,db as x,kc as $,lb as X,lc as pe,mb as ne,n as z,nb as b,oa as G,pa as E,qb as F,qc as ue,r as Y,sa as O,sb as ie,tb as se,ub as _,vb as g,wb as re,x as Z,yc as R,zb as Q,zc as I}from"./chunk-GM25ACCR.js";import{a as D,b as V}from"./chunk-7CGTOI24.js";var ye=["treeContainer"],we=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),be=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=W();_(0,"spk-button-group")(1,"button",13),k("click",function(){w(e);let i=h();return N(i.pathDiscoveryMethod.set("browse"))}),A(2,4),g(),_(3,"button",13),k("click",function(){w(e);let i=h();return N(i.pathDiscoveryMethod.set("path"))}),A(4,5),g()()}if(s&2){let e=h();m(),b("active",e.pathDiscoveryMethod()==="browse"),m(2),b("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&re(0,"spk-progress-bar",9)}function $e(s,t){s&1&&(_(0,"spk-icon",18),S(1,"caret-down"),g(),_(2,"spk-icon",16),S(3,"folder-open"),g())}function Be(s,t){s&1&&(_(0,"spk-icon"),S(1,"file"),g())}function De(s,t){s&1&&(_(0,"spk-icon",18),S(1,"caret-right"),g(),_(2,"spk-icon",16),S(3,"folder"),g())}function Ve(s,t){if(s&1&&x(0,$e,4,0)(1,Be,2,0,"spk-icon")(2,De,4,0),s&2){let e=h(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(_(0,"spk-icon",16),S(1,"desktop-tower"),g())}function je(s,t){s&1&&Q(0)}function Ge(s,t){if(s&1&&x(0,je,1,0,"ng-container",10),s&2){let e=h(2).$implicit,n=h().$implicit;h();let i=U(7);X("ngTemplateOutlet",i)("ngTemplateOutletContext",$(5,be,pe(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=W();_(0,"div",14,3),k("click",function(){w(e);let i=h().$implicit,r=h(2);return N(r.toggleNode(i.id,i))}),_(2,"div",15),x(3,Ve,3,1)(4,He,2,0,"spk-icon",16),g(),_(5,"div",17),k("click",function(i){w(e);let r=h().$implicit,o=h(2);return N(o.toggleSelectedNode(i,r))}),S(6),g()(),x(7,Ge,1,7,"ng-container")}if(s&2){let e=h().$implicit,n=h().$implicit,i=h();b("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),b("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),de(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&x(0,qe,8,17),s&2){let e=t.$implicit,n=h(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(_(0,"spk-list"),ie(1,Xe,1,1,null,null,We),g()),s&2){let e=t.$implicit;ne("padding-left",e.level*.25,"rem"),m(),se(e.children)}}function Ke(s,t){s&1&&Q(0)}function Ue(s,t){if(s&1){let e=W();_(0,"spk-toggle",19),k("click",function(){w(e);let i=h();return N(i._showHiddenNodes.set(!i._showHiddenNodes()))}),A(1,6),g()}if(s&2){let e=h();b("active",e._showHiddenNodes()),m(),oe(e.showFiles()?"files":"folders"),le(1)}}var xe=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(xe||{}),J=class s{#t=j(_e);#n=j(ve);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=G();excludes=G();_showHiddenNodes=O(!1);treeContainerRef=q("treeContainer");formRef=q("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#e=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=R(()=>this.#n.systemInfo()?.OSType==="Windows");filterGroups=this.#n.filterGroups();isByBackupSettings=R(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=R(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=xe;treeStructure=R(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(d=>d!==""&&d!=="/"),n=structuredClone(e);for(let d=0;d<n.length;d++){let p=n[d].slice(1);if(p.startsWith("{")&&p.endsWith("}")){let v=p.slice(1,-1),f=this.filterGroups?.FilterGroups[v];if(f&&f.length){let C=f.map(u=>`-${u}`);n.splice(d,1,...C)}}}let i=this.searchableTreeNodes(),r=new Map,o=this.rootPath(),P=this.accepts(),l=this.isWindows(),c=o?{id:o,resolvedpath:o,text:o,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};P&&(c.accepted=!0),r.set("/",c);for(let d of i){let a=d.id.replace(o??"",""),p=l?"\\":"/",v=a.split(p).filter(Boolean),f="",C=c;for(let u of v){if(f+="/"+u,!r.has(f)){let M=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,C,l),T={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:M,parentPath:f,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+"/":f,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};P&&(T.accepted=this.matchAccepts(P,T)),r.set(f,T),C.children.push(T)}C=r.get(f)}}return[c]});#o(t,e,n,i,r){if(i.evalState===-1)return-2;let o=0,P=t.filter(c=>!c.startsWith("-")&&!c.startsWith("+")),l=t.filter(c=>c.startsWith("-")||c.startsWith("+"));if(P.length===0)return o;for(let c=0;c<P.length;c++){let d=P[c];if(e?.startsWith(d)){o=1;break}}if(l.length===0)return o;for(let c=0;c<l.length;c++){let d=l[c],a=d.slice(1),p=d.startsWith("-")?"exclude":"include",v=r?"\\":"/";if((r?a.slice(2):a).startsWith(v)&&a.endsWith(v)){if(n!=="folder")continue;if(e===a){o=p==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${v}`)){if(n!=="folder")continue;let u=a.slice(1,-2);if(u==="")break;if(e?.includes(u+v)){o=p==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${v}]*]`)){if(n!=="file")continue;let u=a.slice(3,-7);if(new RegExp(u).test(e)){o=p==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let u=a.slice(1,-1),M=this.translateCSharpRegex(u);if(new RegExp(`${M}`).test(e)){o=p==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#i(e,a,!0)){o=p==="include"?1:-1;break}}if(a==="")continue;if(a===e){o=p==="include"?1:-1;break}if(this.#i(e,a,!0)){o=p==="include"?1:-1;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,r,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#i(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=I(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=I(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(r=>i.endsWith(r)):!1}currentPathEffect=I(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=I(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#r(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),r=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(o=>o!==e.id).join("\0")):i.some(o=>o.startsWith(r))?this.currentPath.set(i.filter(o=>o!==r).join("\0")):this.currentPath.set([...i,r].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#r(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#s(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),r=i.map(l=>l.split(e?"\\":"/").filter(c=>c.includes(".")?!1:c)),o=[this.rootPath()??"/"];r.forEach(l=>{l.forEach((c,d)=>{let a=l.slice(0,d+1).join(e?"\\":"/"),p=a;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+a),o.includes(p)||o.push(p)})}),this.isLoading.set(!0);let P=o.map(l=>this.#s(l).pipe(Y(c=>({status:"success",value:c,url:l})),ee(c=>z({status:"error",value:c,url:l}))));Z(P).pipe(H(()=>this.isLoading.set(!1))).subscribe({next:l=>{let c=l.filter(a=>a.status==="success"),d=l.filter(a=>a.status==="error");this.treeNodes.update(a=>{let p=c.flatMap(f=>f.value.map(C=>{let u=C.id,M=C.id.startsWith("%")&&C.id.endsWith("%")?C.resolvedpath+"/":C.id,T=u&&u.split("/").filter(Boolean).slice(0,-1).join("/"),B="/"+(u&&u.split("/").filter(Boolean).join("/")),Oe=i.findIndex(y=>this.multiSelect()?B.startsWith(y):B===y)>-1,Fe=i.findIndex(y=>y===u)>-1,Se=n.findIndex(y=>y===B)>-1;return V(D({},C),{cls:M.endsWith("/")||M.endsWith("\\")?"folder":"file",parentPath:T.startsWith("%")?T:"/"+T,isSelected:Oe&&!Se||Fe})})),v=[...new Map([...a,...p].map(f=>[f.id,f])).values()];return this.#l(),v})}})}#r(t=null,e="/"){this.isLoading.set(!0),this.#s(e).pipe(H(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.Files.map(r=>({text:r.Path.split("/").filter(o=>o!=="").pop(),id:r.Path,cls:r.Path.endsWith("/")||r.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:r.Path,hidden:!1})):n;this.treeNodes.update(r=>{let o=i.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return V(D({},l),{cls:c,parentPath:e})}),P=[...new Map([...r,...o].map(l=>[l.id,l])).values()];return this.hideShortcuts()?P.filter(l=>!l.id.startsWith("%")):P})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=te({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(K(n.treeContainerRef,ye,5),K(n.formRef,we,5)),e&2&&ce(2)},hostVars:2,hostBindings:function(e,n){e&2&&b("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ae(Ne),x(0,Ae,5,4,"spk-button-group"),_(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),_(3,"div",8,0),x(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,ue)(8,Ke,1,0,"ng-container",10),g(),x(9,Ue,2,3,"spk-toggle",11),g(),_(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),g()()),e&2){let i=U(7);F(n.multiSelect()?-1:0),m(),b("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),b("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),X("ngTemplateOutlet",i)("ngTemplateOutletContext",$(13,be,$(11,Re,n.treeStructure()))),m(),F(n.accepts()?-1:9),m(),b("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ge,Ee,fe,me,Ce,Pe,he,Te],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{J as a};
@@ -0,0 +1 @@
1
+ import{a as Ke}from"./chunk-YRQ33MKD.js";import{a as he,b as se}from"./chunk-NYZVIDDD.js";import{a as pe}from"./chunk-U34D3G4S.js";import{a as be}from"./chunk-6OYKPS4F.js";import"./chunk-5242ZMFS.js";import{a as le}from"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import{a as Be}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as Ie,e as ke}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-6WLXFV43.js";import{b as ae}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import{j as w,k as oe}from"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{$b as S,Ab as K,Eb as N,Fb as M,Gb as _,Hb as s,Ib as d,Jb as U,Kb as y,Lb as m,Oa as o,X as R,Zb as F,_a as b,_b as x,bc as Re,ca as D,da as $,db as C,fc as De,gc as $e,hc as X,lb as h,nb as f,nc as u,oc as g,pa as ie,pc as T,qb as E,r as B,rb as I,sa as G,sb as k,tb as v,ub as i,vb as t,wb as c,xb as A,yb as P,yc as fe}from"./chunk-GM25ACCR.js";import{a as te}from"./chunk-7CGTOI24.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 m}from"./chunk-D5WIWFNP.js";import{a as B}from"./chunk-WSLU6K4D.js";import{a as z}from"./chunk-UJZB6UQE.js";import{b as P,c as h}from"./chunk-CEOO3F5U.js";import{D as f,L as k,Q as d,W as o,l as g,p as u,ra as n,xc as S,yc as s}from"./chunk-XGARKXE4.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var $={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},_=class r{#i=o(m);#a=o(h);#r=o(P);#t=o(z);#e=o(B);#o=n(!1);#l=n(null);statusData=this.#l.asReadonly();lastState=null;serverState=S(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#t.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=s(()=>{this.#e.serverState()?.ActiveTask||this.#t.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;setConnectionMethod(e){this.#e.setConnectionMethod(e)}pollingInterval;#p=s(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.pollingInterval=setInterval(()=>{this.#n()},1e3):e?.ActiveTask||this.stopPollingProgress()});stopPollingProgress(){clearInterval(this.pollingInterval)}#n(){this.#o.set(!0),this.#a.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?g(e):this.#r.getApiV1TaskByTaskid({taskid:i}).pipe(u(t=>a(l({},e),{task:t??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#t.getBackupById(t)),this.#l.set(a(l({},e),{progress:this.#s(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?$[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-t,R=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#i.transform(p)}) to go ${R}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{_ as a};
1
+ import{a as m}from"./chunk-ZVBVR6H4.js";import{a as B}from"./chunk-OQNO5JCJ.js";import{a as z}from"./chunk-KEHATBLP.js";import{b as P,c as h}from"./chunk-DYCJPQSE.js";import{E as f,M as k,R as d,X as o,n as g,r as u,sa as n,yc as S,zc as s}from"./chunk-GM25ACCR.js";import{a as l,b as a}from"./chunk-7CGTOI24.js";var $={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},_=class r{#i=o(m);#a=o(h);#r=o(P);#t=o(z);#e=o(B);#o=n(!1);#l=n(null);statusData=this.#l.asReadonly();lastState=null;serverState=S(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>a(l({},i),{backup:i.Item1?this.#t.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});serverStateEffect=s(()=>{this.#e.serverState()?.ActiveTask||this.#t.getBackups(!0)});isFetching=this.#o.asReadonly();connectionStatus=this.#e.connectionStatus;setConnectionMethod(e){this.#e.setConnectionMethod(e)}pollingInterval;#p=s(()=>{let e=this.#e.serverState();e?.ActiveTask&&this.pollingInterval===void 0?this.pollingInterval=setInterval(()=>{this.#n()},1e3):e?.ActiveTask||this.stopPollingProgress()});stopPollingProgress(){clearInterval(this.pollingInterval)}#n(){this.#o.set(!0),this.#a.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?g(e):this.#r.getApiV1TaskByTaskid({taskid:i}).pipe(u(t=>a(l({},e),{task:t??null})))}),f(()=>this.#o.set(!1))).subscribe({next:e=>{let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#t.getBackupById(t)),this.#l.set(a(l({},e),{progress:this.#s(e),statusText:this.#c(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.stopPollingProgress()}})}#s(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#c(e){let i="Running \u2026";if(e.task&&e&&(i=e.Phase?$[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,c=e.TotalFileCount-e.ProcessedFileCount,p=e.TotalFileSize-e.ProcessedFileSize-t,R=e.BackendSpeed<0?"":` at ${this.#i.transform(e.BackendSpeed)}/s`;i=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${c} files (${this.#i.transform(p)}) to go ${R}`}return i}static \u0275fac=function(i){return new(i||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{_ as a};
@@ -0,0 +1 @@
1
+ import{g as c}from"./chunk-ZJWHMCU4.js";import{m as v}from"./chunk-2EOGI5U4.js";import"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import"./chunk-YRQ33MKD.js";import"./chunk-UO57IKTF.js";import{a as E}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as y}from"./chunk-6OYKPS4F.js";import"./chunk-5242ZMFS.js";import"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as L,c as M,e as N,f as I}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{q as G,v as W}from"./chunk-6WLXFV43.js";import"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{Eb as F,Fb as r,Lb as u,Oa as R,X as T,_a as f,db as C,ic as $,jc as p,kc as l,lb as _,qb as A,ub as o,vb as i,wb as n,zc as P}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var h=()=>["/restore-from-files/destination"],K=()=>["/restore-from-files/encryption"],X=()=>["/restore-from-files/select-files"],w=()=>["/restore-from-files/options"],b=e=>["/restore-draft",e],x=e=>["/restore-draft",e,"options"],z=e=>["/restore",e],B=e=>["/restore",e,"options"];function j(e,a){e&1&&(o(0,"div",8),F(1,0),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,1),n(5,"spk-radio"),r(),i(),o(6,"div",8),F(7,2),n(8,"spk-radio"),r(),i(),o(9,"div",8),F(10,3),n(11,"spk-radio"),r(),i()),e&2&&(_("routerLink",p(4,h)),R(3),_("routerLink",p(5,K)),R(3),_("routerLink",p(6,X)),R(3),_("routerLink",p(7,w)))}function U(e,a){if(e&1&&(o(0,"div",8),F(1,4),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,5),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,b,t.backupId())),R(3),_("routerLink",l(4,x,t.backupId()))}}function q(e,a){if(e&1&&(o(0,"div",8),F(1,6),n(2,"spk-radio"),r(),i(),o(3,"div",8),F(4,7),n(5,"spk-radio"),r(),i()),e&2){let t=u();_("routerLink",l(2,z,t.backupId())),R(3),_("routerLink",l(4,B,t.backupId()))}}var O=class e{#t=T(L);#e=T(c);#i=E(this.#t.params);#o=E(this.#t.url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;paramsChanged=P(()=>{let a=this.#i()?.id,t=!!this.#o()?.find(d=>d.path==="restore-draft"),s=!!this.#o()?.find(d=>d.path==="restore-from-files");this.#e.init(a,s,s||t)});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=f({type:e,selectors:[["app-restore-flow"]],features:[$([c,v])],decls:7,vars:1,consts:()=>{let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let d;d=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let k;k=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let D;D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[a,t,s,d,g,k,D,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(t,s){t&1&&(n(0,"app-status-bar"),o(1,"spk-stepper"),C(2,j,12,8)(3,U,6,6)(4,q,6,6),i(),o(5,"section"),n(6,"router-outlet"),i()),t&2&&(R(2),A(s.isFileRestore()?2:s.isDraft()?3:4))},dependencies:[W,G,y,M,N,I],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{O as default};