@duplicati/ngclient 0.0.59 → 0.0.61

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 (82) hide show
  1. package/{chunk-WNGVUHIX.js → chunk-2HC23GJF.js} +1 -1
  2. package/{chunk-JQUPEFDH.js → chunk-2T3PBPBO.js} +1 -1
  3. package/chunk-34MR2IQN.js +1 -0
  4. package/{chunk-OKMKAFJO.js → chunk-3CXGKNYN.js} +1 -1
  5. package/chunk-47KLTONZ.js +1 -0
  6. package/chunk-4C3R2PTH.js +1 -0
  7. package/{chunk-FW56L7EH.js → chunk-4MGFY2JV.js} +1 -1
  8. package/chunk-55N3Z4WC.js +1 -0
  9. package/{chunk-XZ2Z3I76.js → chunk-5NMYYKKU.js} +1 -1
  10. package/{chunk-SGBX6SKP.js → chunk-7R4NNENA.js} +1 -1
  11. package/{chunk-VMEJ2INK.js → chunk-7YT4Y7C3.js} +1 -1
  12. package/{chunk-23D2KKGK.js → chunk-AX4MPJ65.js} +1 -1
  13. package/{chunk-3UJYR3C3.js → chunk-B6UDSTOM.js} +1 -1
  14. package/{chunk-KBOYFSOY.js → chunk-BSZZLSIX.js} +1 -1
  15. package/{chunk-NW7VZHBJ.js → chunk-BUARZS4A.js} +1 -1
  16. package/{chunk-OIJ4GD7L.js → chunk-EQS5S7RI.js} +1 -1
  17. package/{chunk-JNHK2HQC.js → chunk-EXAIEGUA.js} +1 -1
  18. package/{chunk-HQ5RBM4W.js → chunk-FCXKPHH2.js} +1 -1
  19. package/chunk-G2NEYTH2.js +1 -0
  20. package/{chunk-CPSIM3A5.js → chunk-GE3T3AG3.js} +1 -1
  21. package/chunk-GROK2C3O.js +1 -0
  22. package/{chunk-4IQIYT3R.js → chunk-GRR3LTVK.js} +1 -1
  23. package/chunk-HLEETTI2.js +1 -0
  24. package/{chunk-FQKYQMUA.js → chunk-HSJMMQHL.js} +1 -1
  25. package/{chunk-F76JBXBH.js → chunk-HWBFYM4U.js} +1 -1
  26. package/chunk-I3KS7JEN.js +1 -0
  27. package/{chunk-XG3VY7EY.js → chunk-IHYJHBCC.js} +1 -1
  28. package/{chunk-ETMZA3IQ.js → chunk-INMFVRL6.js} +1 -1
  29. package/{chunk-T7HBYYKH.js → chunk-IQDBKRQV.js} +1 -1
  30. package/chunk-J6XRJHJ3.js +1 -0
  31. package/chunk-J76HBC5J.js +1 -0
  32. package/chunk-JWZZL2QQ.js +6 -0
  33. package/{chunk-EB76BK3U.js → chunk-KBC4N47O.js} +1 -1
  34. package/chunk-KWC4F7OI.js +1 -0
  35. package/{chunk-YZWMWYPX.js → chunk-L7W4ZJTP.js} +1 -1
  36. package/{chunk-3YZ3SEGY.js → chunk-LREVYYY4.js} +1 -1
  37. package/{chunk-XCGZAJSF.js → chunk-M27H5SJL.js} +1 -1
  38. package/chunk-MSK2MH2K.js +1 -0
  39. package/{chunk-DSHXBMXU.js → chunk-MYCIO3QE.js} +1 -1
  40. package/{chunk-QBFOFC2S.js → chunk-N3GBABZB.js} +1 -1
  41. package/{chunk-RMEEJUB4.js → chunk-N4NGBPMJ.js} +1 -1
  42. package/{chunk-HYRUU7RC.js → chunk-NJSJNACP.js} +1 -1
  43. package/{chunk-S4KMY7LU.js → chunk-O2MZ5CAQ.js} +1 -1
  44. package/{chunk-VPWPYB3Z.js → chunk-O53NVQ2A.js} +1 -1
  45. package/{chunk-GCHBD6DX.js → chunk-OIV6DYWR.js} +1 -1
  46. package/{chunk-DGRMASPQ.js → chunk-OROSSCXB.js} +1 -1
  47. package/chunk-PCWXZ2CU.js +1 -0
  48. package/{chunk-IQHACOOA.js → chunk-PD4M6YP7.js} +1 -1
  49. package/{chunk-W4Z2WCQT.js → chunk-PIVMNQL6.js} +1 -1
  50. package/{chunk-6Z44FGYG.js → chunk-PMCSEYJK.js} +1 -1
  51. package/chunk-QPLDE6B2.js +1 -0
  52. package/{chunk-WLAPUWZH.js → chunk-SANIFXXF.js} +1 -1
  53. package/{chunk-7BFB2JZ7.js → chunk-TSQCXGD7.js} +1 -1
  54. package/{chunk-VHPPFUTX.js → chunk-U2NGUTAO.js} +1 -1
  55. package/{chunk-CFESGUGK.js → chunk-VGQ6X3AL.js} +6 -6
  56. package/chunk-WCXAIVYX.js +1 -0
  57. package/{chunk-SQBOV6A2.js → chunk-YT3L2PHL.js} +1 -1
  58. package/chunk-ZNI74FWA.js +1 -0
  59. package/{chunk-BNW7MJ4U.js → chunk-ZTSITRHY.js} +1 -1
  60. package/chunk-ZUGIRXAF.js +1 -0
  61. package/index.html +1 -1
  62. package/main-OAVKSP2O.js +1 -0
  63. package/package.json +1 -1
  64. package/chunk-4YJMUITD.js +0 -1
  65. package/chunk-6FMUWDFQ.js +0 -1
  66. package/chunk-7CHRY23V.js +0 -6
  67. package/chunk-7EROSQ6G.js +0 -1
  68. package/chunk-7NOLIW3Y.js +0 -1
  69. package/chunk-AKDOPLUE.js +0 -1
  70. package/chunk-BV5HWLOE.js +0 -1
  71. package/chunk-D352OHOH.js +0 -1
  72. package/chunk-E2E7PU5Q.js +0 -1
  73. package/chunk-EHTLINLH.js +0 -1
  74. package/chunk-NA2TSIGD.js +0 -1
  75. package/chunk-NILIJMJS.js +0 -1
  76. package/chunk-NROZTSQC.js +0 -1
  77. package/chunk-PQEMNH5E.js +0 -1
  78. package/chunk-S52BCEO2.js +0 -1
  79. package/chunk-V6A4XGAP.js +0 -1
  80. package/chunk-XLGJTP25.js +0 -1
  81. package/chunk-XRV2G4UG.js +0 -1
  82. package/main-XKSLPMUE.js +0 -1
package/chunk-7CHRY23V.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as Qe}from"./chunk-XZ2Z3I76.js";import{a as Be}from"./chunk-3UJYR3C3.js";import{a as Pt,b as Ht}from"./chunk-DNHLTHLR.js";import{b as Y}from"./chunk-QBFOFC2S.js";import{a as mt}from"./chunk-IQHACOOA.js";import{a as be,b as ae,c as Ee,d as se,e as ye,f as ut,g as Ut,h as Pe,i as Ge,k as _t,l as Ne,m as Ve,n as Bt,o as Ae,p as oe,q as dt,r as Oe}from"./chunk-DGRMASPQ.js";import{b as We}from"./chunk-S4KMY7LU.js";import{a as De,c as re}from"./chunk-7NOLIW3Y.js";import{a as le,b as Ft,d as Kt,e as zt,g as Le,i as gt,l as pe,n as Ct,o as Xt,q as ce,r as me,w as Ue,x as qe}from"./chunk-BNW7MJ4U.js";import{c as Lt}from"./chunk-HYRUU7RC.js";import{ia as ct}from"./chunk-NW7VZHBJ.js";import{Ab as v,Bb as a,Cb as r,Db as u,Eb as j,F as et,Fb as W,Gb as ze,Hb as k,Jc as K,Lc as pt,Nb as S,Ob as T,Pb as M,Qa as s,Qb as nt,Rb as ot,Sb as Ie,T as Re,Tb as g,Ub as p,Xa as O,Xb as H,Ya as fe,Z as x,Zb as q,_b as X,db as ne,dc as Se,ea as C,ec as Te,fa as f,fc as he,gc as m,hc as L,ic as G,ja as Mt,jb as d,jc as yt,lc as wt,mc as Rt,nc as bt,q as Je,qa as tt,qc as Gt,ra as st,rc as Xe,sb as c,sc as Vt,tc as it,ub as $e,xb as F,xc as lt,yb as $,zb as I}from"./chunk-CFESGUGK.js";import{a as A,c as vt}from"./chunk-C6Q5SG76.js";function nn(e,n){if(e&1&&(a(0,"p"),m(1),r()),e&2){let t=p();s(),L(t._data().message)}}var on={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},He=class e{data=st();_data=K(()=>A(A({},on),this.data()));closed=tt();close(n="confirm"){this.closed.emit(n==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,o){t&1&&(a(0,"header",0)(1,"h3"),m(2),r()(),a(3,"div",1),d(4,nn,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),g("click",function(){return o.close("cancel")}),m(7),r(),a(8,"button",4),g("click",function(){return o.close("confirm")}),m(9),r()()),t&2&&(s(2),L(o._data().title),s(2),F(o._data().message?4:-1),s(3),L(o._data().cancelText),s(2),L(o._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var ft=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=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var xe=class e{#e=x(We);s3Providers=Y(this.getS3Config("Providers"));s3Regions=Y(this.getS3Config("Regions"));s3RegionHosts=Y(this.getS3Config("RegionHosts"));s3StorageClasses=Y(this.getS3Config("StorageClasses"));storjSatellites=Y(this.getStorjConfig("Satellites"));storjAuthenticationMethods=Y(this.getStorjConfig("AuthenticationMethods"));openstackProviders=Y(this.getOpenstackConfig("Providers"));openstackVersions=Y(this.getOpenstackConfig("Versions"));gcsLocations=Y(this.getGcsConfig("Locations"));gcsStorageClasses=Y(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Je(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Je(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Je(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Je(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=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){return e==null?"":":"+e.toString()}function ue(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(_=>_.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function b(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function St(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function Nt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(_=>_.customKey===t||_.key===t)?.mapper.from(t,new URL("http://localhost"),e);let l=new URL(i);if(!n)throw new Error("Invalid target path");return ve.find(_=>_.customKey===t||_.key===t)?.mapper.from(t,l,e)}var D=new oe,ve=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>D.control(e??"")}},mapper:{to:e=>{let n=b([...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],_=i.startsWith("%")?i:"/"+i;return A({destinationType:e,custom:{path:_}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>D.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(xe).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(xe).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(xe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(xe).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>D.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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>D.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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>D.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=b([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return A({destinationType:e,dynamic:A({"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=>D.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(xe).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(xe).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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],l=b([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([_])=>_!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ke(n)+ue(o)+l}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Ke(n)+ue(o)+i}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=b([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.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=b([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>D.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,_={"auth-username":i,"auth-password":l},h=e.dynamic["use-ssl"],N=b([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([y])=>y!=="use-ssl"),...Object.entries(_)]);return`${e.destinationType}${h?"s":""}://${t+Ke(n)+ue(o)+N}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(xe).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&${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},R(e,n))}}];var jt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Tt=class e{generate(n,t=jt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=jt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var rn=["formRef"];function an(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),L(t.DisplayName)}}function sn(e,n){if(e&1&&u(0,"spk-progress-bar",38),e&2){let t=p(3);$e("warn",t.calculatePasswordStrength()===1)("tertiary",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function ln(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function pn(e,n){e&1&&(S(0,7,1),u(1,"spk-icon"),T())}function cn(e,n){e&1&&(S(0,7,2),u(1,"spk-icon"),T())}function mn(e,n){e&1&&(S(0,10,1),u(1,"spk-icon",40),T())}function un(e,n){e&1&&(S(0,10,2),u(1,"spk-icon"),T())}function _n(e,n){if(e&1){let t=k();a(0,"button",39),g("click",function(){C(t);let i=p(3);return f(i.copyPassword())}),S(1,10),d(2,mn,2,0)(3,un,2,0),T(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function dn(e,n){e&1&&(a(0,"spk-alert",37),M(1,11),r())}function Fn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),S(3,6),u(4,"sup"),T(),r(),u(5,"input",30),r(),d(6,sn,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),u(8,"input",32),d(9,ln,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),g("click",function(){C(t);let i=p(2);return f(i.showPassword.set(!i.showPassword()))}),S(12,7),d(13,pn,2,0)(14,cn,2,0),T(),r(),a(15,"button",35),g("click",function(){C(t);let i=p(2);return f(i.generatePassword())}),S(16,8),u(17,"spk-icon"),T(),r(),d(18,_n,4,1,"button",36),r(),d(19,dn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function gn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),u(3,"input",26),I(4,an,2,2,"spk-option",27,$),r(),d(6,Fn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function Cn(e,n){if(e&1&&(a(0,"button",22),S(1,12),u(2,"spk-icon"),T(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function fn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),S(2,13),u(3,"spk-icon"),T(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Ze=new oe,Wt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ze.group({name:Ze.control(e.name,[Ee.required]),description:Ze.control(e.description),encryption:Ze.control(e.encryption,[Ht()]),password:Ze.control(e.password,[Pt(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:Ze.control(e.repeatPassword,[Pt(n=>n?.value.encryption!=="",[Ee.required])])}),Ot={Key:"",DisplayName:"None"},At=class e{#e=x(re);#t=x(De);#o=x(Tt);#i=x(_e);#n=x(mt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=O(!1);copiedPassword=O(!1);showCopyPassword=O(!1);encryptionEffect=pt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=K(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[Ot,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,rn,5),t&2&&Te()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let _;_=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`Encryption`;let N;N=$localize`Encryption`;let y;y=$localize`Password`;let Q;Q=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ie(Z);let U;U=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let te;te=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,te=Ie(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let P;P=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,l,_,N,B,Z,U,J,te,E,P,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",y,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",Q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",14,0),g("submit",function(){return C(i),f(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),S(6,2),u(7,"sup"),T(),r(),u(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),M(11,3),r(),u(12,"textarea",19),r(),d(13,gn,7,2),a(14,"div",20)(15,"button",21),g("click",function(){return C(i),f(o.exit())}),S(16,4),u(17,"spk-icon"),T(),r(),d(18,Cn,3,1,"button",22)(19,fn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Oe,Pe,ae,se,ye,Ne,Ae,pe,me,Le,le,ce,Xt,Ft,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Sn=["formRef"],Tn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),hn=e=>({$implicit:e});function Dn(e,n){if(e&1&&(a(0,"spk-option",17),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function En(e,n){if(e&1&&(a(0,"spk-option",17),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),L(t.name)}}function yn(e,n){if(e&1){let t=k();S(0,7,1),a(1,"button",29,2),g("click",function(){let i=C(t).$implicit,l=p();return f(l.addNewOption(i))}),r(),T()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function Pn(e,n){e&1&&ze(0)}function Nn(e,n){if(e&1&&d(0,Pn,1,0,"ng-container",30),e&2){let t=n.$implicit,o=n.$index;p();let i=he(35);c("ngTemplateOutlet",i)("ngTemplateOutletContext",Xe(5,hn,Vt(2,Tn,o,t)))}}function An(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function On(e,n){if(e&1&&(a(0,"app-file-tree",33)(1,"label",39),m(2),d(3,An,3,1,"spk-tooltip",40),r(),u(4,"input",41),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name)}}function kn(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xn(e,n){if(e&1&&(a(0,"app-file-tree",34)(1,"label",39),m(2),d(3,kn,3,1,"spk-tooltip",40),r(),u(4,"input",41),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name)}}function $n(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function In(e,n){e&1&&(a(0,"spk-icon",42),m(1,"link"),r())}function vn(e,n){e&1&&(a(0,"spk-icon",42),m(1,"textbox"),r())}function Mn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",39),m(2),d(3,$n,3,1,"spk-tooltip",40),r(),u(4,"input",41),d(5,In,2,0,"spk-icon",42)(6,vn,2,0,"spk-icon",42),r()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function wn(e,n){if(e&1){let t=k();a(0,"span",46),g("click",function(){C(t);let i=p(2).$implicit,l=p();return f(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Rn(e,n){e&1&&(a(0,"spk-icon",42),m(1,"password"),r())}function bn(e,n){if(e&1){let t=k();a(0,"spk-icon",47),g("click",function(){C(t);let i=p(2).$implicit;return f(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Gn(e,n){if(e&1){let t=k();a(0,"spk-icon",47),g("click",function(){C(t);let i=p(2).$implicit;return f(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function Vn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",39),m(2),r(),u(3,"input",43),d(4,wn,2,0,"span",44)(5,Rn,2,0,"spk-icon",42)(6,bn,2,0,"spk-icon",45)(7,Gn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Ln(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Un(e,n){if(e&1&&(a(0,"spk-option",17),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function Bn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",39),m(2),d(3,Ln,3,1,"spk-tooltip",40),r(),u(4,"input",48),I(5,Un,2,2,"spk-option",17,$),r()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name),s(),v(o.formView.options)}}function Kn(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zn(e,n){if(e&1&&(a(0,"spk-option",17),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function Xn(e,n){if(e&1&&(a(0,"div",35)(1,"label",39),m(2),d(3,Kn,3,1,"spk-tooltip",40),r(),a(4,"div",49)(5,"spk-form-field"),u(6,"input",50),a(7,"spk-icon",42),m(8,"resize"),r()(),a(9,"spk-select"),u(10,"label")(11,"input",51),I(12,zn,2,2,"spk-option",17,$),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),q("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function Hn(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function jn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",39),m(2),d(3,Hn,3,1,"spk-tooltip",40),r(),u(4,"input",52),a(5,"spk-icon",42),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name)}}function Wn(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function qn(e,n){if(e&1&&(a(0,"spk-toggle",36)(1,"label",39),m(2),d(3,Wn,3,1,"spk-tooltip",40),r(),u(4,"input",53),r()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name)}}function Qn(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Yn(e,n){e&1&&(a(0,"spk-option",55),m(1,"None"),r()),e&2&&c("value","None")}function Zn(e,n){if(e&1&&(a(0,"spk-option",17),m(1),u(2,"spk-checkbox",56),r()),e&2){let t=p().$implicit;c("value",t),s(),G(" ",t," ")}}function Jn(e,n){if(e&1&&d(0,Yn,2,1,"spk-option",55)(1,Zn,3,2,"spk-option",17),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function eo(e,n){if(e&1&&(a(0,"spk-select",37)(1,"label",39),m(2),d(3,Qn,3,1,"spk-tooltip",40),r(),u(4,"input",54),I(5,Jn,2,1,null,null,$),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("formControlName",o.formView.name),s(),v(o.formView.options)}}function to(e,n){if(e&1&&(a(0,"spk-tooltip",40)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function no(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",39),m(2),d(3,to,3,1,"spk-tooltip",40),r(),u(4,"input",41),r()),e&2){let t,o=p().$implicit;s(),q("for","destination-",o.formGroupName,"-",o.index,""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),q("id","destination-",o.formGroupName,"-",o.index,""),H("formControlName",o.formView.name)}}function oo(e,n){if(e&1){let t=k();a(0,"div",31),j(1,32),d(2,On,5,14,"app-file-tree",33)(3,xn,5,10,"app-file-tree",34)(4,Mn,7,10,"spk-form-field")(5,Vn,8,11,"spk-form-field")(6,Bn,7,9,"spk-select")(7,Xn,14,9,"div",35)(8,jn,7,9,"spk-form-field")(9,qn,5,9,"spk-toggle",36)(10,eo,7,7,"spk-select",37)(11,no,5,9,"spk-form-field"),W(),a(12,"button",38),g("click",function(){let i=C(t).$implicit,l=p();return f(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Me=new oe,io=["Bytes","KB","MB","GB","TB","PB"],ro=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],qt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Me.group({remoteVolumeSize:Me.group({size:Me.control(e.remoteVolumeSize),unit:Me.control(e.size)}),backupRetention:Me.control(e.backupRetention),advancedOptions:Me.group({})}),Or=(e,n)=>Me.group({name:Me.control(e),value:Me.control(n)}),kt=class e{#e=x(_e);#t=x(re);#o=x(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(io);rentationOptions=O(ro);oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.rentationOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-options"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Sn,5),t&2&&Te()},decls:43,vars:5,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize`Remote volume size`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK:Read more${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let _;_=$localize` Advanced options ${"\uFFFD#26\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#27\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#27\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#29\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*31:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#27\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*31:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_MENU:`,_=Ie(_);let h;h=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let N;return N=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,_,h,N,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",10,0),g("submit",function(){return C(i),f(o.submit())}),a(2,"h3",11),M(3,3),r(),a(4,"div",12)(5,"div",13)(6,"spk-form-field")(7,"label",14),M(8,4),r(),u(9,"input",15),r(),a(10,"spk-select"),u(11,"input",16),I(12,Dn,2,2,"spk-option",17,$),r()(),a(14,"p"),S(15,5),u(16,"a",18),T(),r()(),a(17,"spk-select",19)(18,"label",14),M(19,6),r(),u(20,"input",20),I(21,En,2,2,"spk-option",17,$),r(),a(23,"app-toggle-card",21),j(24,22),S(25,7),a(26,"spk-menu")(27,"button",23),u(28,"spk-icon"),r(),j(29,24),I(30,yn,3,1,"button",25,$),W(),r(),T(),W(),I(32,Nn,1,7,"ng-container",null,$),r(),d(34,oo,15,2,"ng-template",null,1,lt),a(36,"div",26)(37,"button",27),g("click",function(){return C(i),f(o.goBack())}),S(38,8),u(39,"spk-icon"),T(),r(),a(40,"button",28),S(41,9),u(42,"spk-icon"),T(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(12),v(o.sizeOptions()),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.rentationOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),$e("loader",o.isSubmitting()))},dependencies:[Oe,Pe,ae,Ge,be,se,ye,Ne,Ae,Ve,ct,Ct,me,Le,le,pe,Ue,gt,ce,qe,Qe,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ao=["formRef"];function so(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),L(t.label)}}function lo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),M(3,8),r(),a(4,"input",28,1),g("focus",function(){C(t);let i=he(5);return f(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),u(9,"label",30),a(10,"input",31,2),g("focus",function(){C(t);let i=he(11);return f(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),j(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),M(18,9),r(),u(19,"input",35),r(),a(20,"spk-select",36),u(21,"input",37),I(22,so,2,2,"spk-option",38,$),r()(),a(24,"app-toggle-card",39),j(25,40),M(26,10),W(),a(27,"div",41)(28,"spk-toggle",21),S(29,11),u(30,"input",42),T(),r(),a(31,"spk-toggle",21),S(32,12),u(33,"input",43),T(),r(),a(34,"spk-toggle",21),S(35,13),u(36,"input",44),T(),r(),a(37,"spk-toggle",21),S(38,14),u(39,"input",45),T(),r(),a(40,"spk-toggle",21),S(41,15),u(42,"input",46),T(),r(),a(43,"spk-toggle",21),S(44,16),u(45,"input",47),T(),r(),a(46,"spk-toggle",21),S(47,17),u(48,"input",48),T(),r()()(),W()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new oe,Qt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Yt=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=x(_e);#t=x(re);#o=x(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Qt;displayFn(n){let t=Qt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,ao,5),t&2&&Te()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let h;h=$localize`Run again every`;let N;N=$localize`Allowed days`;let y;y=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,_,h,N,y,Q,B,Z,U,J,te,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",18,0),g("submit",function(){return C(i),f(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),S(6,4),u(7,"input",22),T(),r(),a(8,"p"),M(9,5),r()(),d(10,lo,49,2),a(11,"div",23)(12,"button",24),g("click",function(){return C(i),f(o.goBack())}),S(13,6),u(14,"spk-icon"),T(),r(),a(15,"button",25),S(16,7),u(17,"spk-icon"),T(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,ae,Ge,be,se,ye,Ne,Ae,Ve,pe,me,ce,Ue,le,Le,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function po(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),L(t.key)}}function co(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),L(t.key)}}function mo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),g("ngModelChange",function(i){C(t);let l=p(2);return f(l.updateStateExpression(i))}),r(),I(2,co,2,2,"spk-option",2,$),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function uo(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),g("ngModelChange",function(i){C(t);let l=p(2);return f(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function _o(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),g("ngModelChange",function(i){C(t);let l=p();return f(l.updateStateType(i))}),r(),I(2,po,2,2,"spk-option",2,$),r(),d(4,mo,4,3,"spk-select",0)(5,uo,2,1,"spk-form-field"),a(6,"div",3),g("click",function(){C(t);let i=p();return f(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var Zt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],Fo=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ht=class e{path=st.required();pathChange=tt();remove=tt();expressionOptions=O(Zt);fileGroupOptions=O(Fo);pathState=O(null);typeState=K(()=>{let n=this.pathState();return n?n.type:null});pathEffect=pt(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+";return t.startsWith("/")&&t.endsWith("/")?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith("*/")?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith("[^\\/]*]")?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1);if(o==="Folder"){let i=n.expression.endsWith("/"),l=n.expression.startsWith("/");return i&&l?`${t}${n.expression}`:i?`${t}${n.expression}/`:l?`${t}/${n.expression}`:`${t}/${n.expression}/`}return o==="FolderNameIncludes"?`${t}*${n.expression}*/`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\/]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=Zt.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,_o,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[dt,ae,se,Ut,me,ce,le,pe],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var go=["formRef"];function Co(e,n){if(e&1){let t=k();a(0,"app-filter",42),g("pathChange",function(i){let l=C(t).$index,_=p(2);return f(_.patchPathAt(i,l))})("remove",function(){let i=C(t).$index,l=p(2);return f(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function fo(e,n){if(e&1&&I(0,Co,1,1,"app-filter",41,$),e&2){let t=p();v(t.pathArray())}}function So(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function To(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),u(2,"input",43),r(),a(3,"spk-select"),u(4,"input",44),I(5,So,2,2,"spk-option",45,$),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var we=new oe,ho=["Bytes","KB","MB","GB","TB","PB"],Jt=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>we.group({path:we.control(e.path),excludes:we.group({hidden:we.control(e.excludes.hidden),system:we.control(e.excludes.system),temporary:we.control(e.excludes.temporary),filesLargerThan:we.group({size:we.control(null),unit:we.control(null)})})}),$t=class e{#e=x(_e);#t=x(re);#o=x(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=K(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(ho);pathSignal=Y(this.sourceDataForm.controls.path.valueChanges);pathArray=K(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+"))??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),l=this.pathArray().map((_,h)=>h===t?`${n}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,_)=>_!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,go,5),t&2&&Te()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let l;l=$localize`Temporary files`;let _;_=$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 y;y=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let Q;Q=$localize`Source Data`;let B;B=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let P;P=$localize`Choose if there’s any files you want to exclude.`;let z;z=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let w;w=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],_,h,N,y,Q,B,Z,U,J,te,E,P,z,w,ie,ge,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),g("submit",function(){return C(i),f(o.next())}),a(2,"div",18)(3,"h3",19),M(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),M(7,2),r(),u(8,"input",22),r(),a(9,"div",23)(10,"button",24),g("click",function(){return C(i),f(o.goBack())}),S(11,3),u(12,"spk-icon"),T(),r(),a(13,"button",25),S(14,4),u(15,"spk-icon"),T(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),j(20,28),M(21,6),W(),a(22,"p",29),M(23,7),r(),a(24,"div",30)(25,"spk-form-field"),u(26,"input",31),r(),a(27,"button",32),g("click",function(){return C(i),f(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),j(31,28),M(32,8),W(),a(33,"p",29),M(34,9),r(),a(35,"button",33),g("click",function(){return C(i),f(o.addFilter())}),M(36,10),r(),d(37,fo,2,0),r(),a(38,"app-toggle-card",34),j(39,28),M(40,11),W(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),S(44,13),u(45,"input",36),T(),r(),a(46,"spk-toggle",35),S(47,14),u(48,"input",37),T(),r(),a(49,"spk-toggle",35),S(50,15),u(51,"input",38),T(),r(),a(52,"spk-toggle",39),g("click",function(){return C(i),f(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,To,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),$e("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[dt,Pe,ae,Ge,be,se,ye,Oe,_t,Ne,Ae,Ve,pe,ce,le,Le,me,Ue,Qe,Be,ht],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var Fe=new oe,_e=class e{#e=x(re);#t=x(mt);#o=x(We);#i=x(ft);generalForm=Wt();sourceDataForm=Jt();scheduleForm=Yt();destinationForm=en();optionsForm=qt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=K(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=K(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=K(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=Y(this.sourceDataForm.valueChanges);destinationFormSignal=Y(this.destinationForm.valueChanges);generalFormSignal=Y(this.generalForm.valueChanges);encryptionFieldSignal=Y(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=Y(this.scheduleForm.valueChanges);destinationOptions=K(()=>this.#t.backendModules()??[]);httpOptions=K(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=K(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=K(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Ot,...n]});nonSelectedOptions=K(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(et(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(et(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(y=>`${y.Include?"":"-"}${y.Expression}`)??[],i=n.Settings?.find(y=>y.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(y=>y.Name==="--skip-files-larger-than")??null,_=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,N={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:_&&h?{size:parseInt(h),unit:_.toUpperCase()}:null}};this.sourceDataForm.patchValue(N)}mapDestinationToForm(n){let t=n.TargetURL?Nt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Nt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),_=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:_?_.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(_=>_.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,_=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],h=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(h=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let N=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([U,J])=>J).map(([U,J])=>U):[],y=i.path?.split("\0")??[],Q=this.mapFormsToSettings(),B=Object.entries(i.excludes??{}).filter(([U,J])=>J&&U!=="filesLargerThan").map(([U])=>U),Z=i.excludes?.filesLargerThan;return B.length&&Q.push({Name:"--exclude-files-attributes",Value:B.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&Q.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:_[0]??null,Sources:y.filter(U=>!U.startsWith("-")),Settings:Q,Filters:y.filter(U=>U.startsWith("-")).map((U,J)=>({Order:J,Include:!1,Expression:U.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:N}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},_=Object.entries(t.advancedOptions??{}).filter(([h,N])=>h&&N).map(([h,N])=>{let y=n.find(Q=>Q.name===h);return y?.type==="Size"?{Name:h,Value:`${N.size}${N.unit.toLowerCase()}`}:y?.type==="Integer"?{Name:h,Value:N.toString()}:y?.type==="Boolean"?{Name:h,Value:N.toString()}:{Name:h,Value:N}});return[...i,l,..._]}#a(n){return n.controls.map(t=>St(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,_=this.destinationOptions().find(E=>E.Key===l),h=this.httpOptions();if(!_||!_.Options)return;let N=i&&i.oauthField?i.oauthField:null,y=i&&i.customFields?i.customFields:{},Q=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:N,custom:[],dynamic:[],advanced:[]});let U=Fe.group({}),J=Fe.group({}),te=Fe.group({});y&&Object.entries(y).forEach(([E,P],z)=>{let ge=P,{formElement:w}=ge,ie=vt(ge,["formElement"]);U.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(A({order:900+z},ie)),de))});for(let E=0;E<_.Options.length;E++){let P=_.Options[E];if(P.Deprecated)continue;let z=Q.find(w=>w===P.Name||w.name===P.Name);if(z){let w=z&&typeof z!="string",ie=w?z?.defaultValue??P.DefaultValue:P.DefaultValue,ge={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,order:900+E},de=w?A(A({},ge),z):ge,at=t?.dynamic[P.Name]??ie??P.DefaultValue;this.createFormField(J,de,at),this.destinationFormPair.update(je=>(je.dynamic.push(de),je))}else{if(Z.find(Ce=>Ce===P.Name))continue;let ie=B.find(Ce=>Ce===P.Name||Ce.name===P.Name),ge=ie&&typeof ie!="string",de=t?.advanced[P.Name],V=de??P.DefaultValue,at={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,defaultValue:V,order:900+E},je=ge?A(A({},at),ie):at;o&&de&&(this.createFormField(te,je,V),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(je),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(je),Ce))}}for(let E=0;E<h.length;E++){let P=h[E],z=t?.advanced[P.name],w=z??P.defaultValue;o&&z&&(this.createFormField(te,P,w),this.selectedHttpOptions.update(ie=>(ie.push(P),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((P,z)=>P.order-z.order),dynamic:E.dynamic.sort((P,z)=>P.order-z.order),advanced:E.advanced.sort((P,z)=>P.order-z.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??n,customGroup:U,dynamicGroup:J,advancedGroup:te}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var Do=["formRef"],Eo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Et=e=>({$implicit:e}),yo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Po=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),No=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),Ao=()=>({maxWidth:"700px",width:"100%"});function Oo(e,n){e&1&&(S(0,2,2),u(1,"spk-icon"),T())}function ko(e,n){e&1&&M(0,2,3)}function xo(e,n){if(e&1){let t=k();S(0,2,1),a(1,"button",18),g("click",function(){C(t);let i=p();return f(i.testDestination())}),d(2,Oo,2,0)(3,ko,1,0),r(),T()}if(e&2){let t=p();s(),$e("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function $o(e,n){if(e&1){let t=k();a(0,"p",24),g("click",function(){C(t);let i=p();return f(i.removeDestinationFormGroup(i.destinationCount()-1))}),S(1,5),u(2,"span",25),T(),r()}}function Io(e,n){if(e&1){let t=k();a(0,"div",30),g("click",function(){let i=C(t).$implicit,l=p(2);return f(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),L(t.displayName),s(2),L(t.description)}}function vo(e,n){if(e&1){let t=k();a(0,"button",31),g("click",function(){let i=C(t).$implicit,l=p(2);return f(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),G(" ",t.displayName," ")}}function Mo(e,n){if(e&1&&(a(0,"div",26),I(1,Io,5,2,"div",27,$),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),j(6,17),I(7,vo,2,1,"button",29,$),W(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function wo(e,n){e&1&&ze(0)}function Ro(e,n){if(e&1&&d(0,wo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,Eo,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function bo(e,n){e&1&&ze(0)}function Go(e,n){if(e&1&&d(0,bo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,yo,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Vo(e,n){if(e&1){let t=k();S(0,7,1),a(1,"button",31),g("click",function(){let i=C(t).$implicit,l=p(2);return f(l.addAdvancedFormPair(i,0))}),r(),T()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function Lo(e,n){e&1&&ze(0)}function Uo(e,n){if(e&1&&d(0,Lo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,Po,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Bo(e,n){if(e&1){let t=k();S(0,8,1),a(1,"button",31),g("click",function(){let i=C(t).$implicit,l=p(2);return f(l.addHttpOption(i,0))}),r(),T()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function Ko(e,n){e&1&&ze(0)}function zo(e,n){if(e&1&&d(0,Ko,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,No,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Xo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ho(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,Xo,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name)}}function jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Wo(e,n){if(e&1&&(a(0,"app-file-tree",40)(1,"label",46),m(2),d(3,jo,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name)}}function qo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qo(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function Yo(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function Zo(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function Jo(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,qo,3,1,"spk-tooltip",47),r(),u(4,"input",49),d(5,Qo,2,0,"spk-icon",50)(6,Yo,2,0,"spk-icon",50)(7,Zo,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ei(e,n){if(e&1){let t=k();a(0,"span",54),g("click",function(){C(t);let i=p(2).$implicit,l=p(2);return f(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function ti(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function ni(e,n){if(e&1){let t=k();a(0,"spk-icon",55),g("click",function(){C(t);let i=p(2).$implicit;return f(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function oi(e,n){if(e&1){let t=k();a(0,"spk-icon",55),g("click",function(){C(t);let i=p(2).$implicit;return f(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function ii(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),u(3,"input",51),d(4,ei,2,0,"span",52)(5,ti,2,0,"spk-icon",50)(6,ni,2,0,"spk-icon",53)(7,oi,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function ri(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ai(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),yt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function si(e,n){if(e&1&&I(0,ai,2,3,"spk-option",56,$),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function li(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function pi(e,n){if(e&1&&I(0,li,2,2,"spk-option",56,$),e&2){let t=p(2).$implicit;v(t.formView.options)}}function ci(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,ri,3,1,"spk-tooltip",47),r(),u(4,"input",48),d(5,si,2,0)(6,pi,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function mi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ui(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),yt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function _i(e,n){if(e&1&&I(0,ui,2,3,"spk-option",56,$),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function di(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function Fi(e,n){if(e&1&&I(0,di,2,2,"spk-option",56,$),e&2){let t=p(2).$implicit;v(t.formView.options)}}function gi(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,mi,3,1,"spk-tooltip",47),r(),u(4,"input",57),d(5,_i,2,0)(6,Fi,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Ci(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function fi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),L(t)}}function Si(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,Ci,3,1,"spk-tooltip",47),r(),a(4,"div",58)(5,"spk-form-field"),u(6,"input",59),a(7,"spk-icon",50),m(8,"resize"),r()(),a(9,"spk-select"),u(10,"label")(11,"input",60),I(12,fi,2,2,"spk-option",56,$),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function Ti(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function hi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Ti,3,1,"spk-tooltip",47),r(),u(4,"input",61),a(5,"spk-icon",50),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name)}}function Di(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ei(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Di,3,1,"spk-tooltip",47),r(),u(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name)}}function yi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Pi(e,n){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function Ni(e,n){if(e&1&&(a(0,"spk-option",56),m(1),u(2,"spk-checkbox",65),r()),e&2){let t=p().$implicit;c("value",t),s(),G(" ",t," ")}}function Ai(e,n){if(e&1&&d(0,Pi,2,1,"spk-option",64)(1,Ni,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Oi(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,yi,3,1,"spk-tooltip",47),r(),u(4,"input",63),I(5,Ai,2,1,null,null,$),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("formControlName",o.formView.name),s(),v(o.formView.options)}}function ki(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xi(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,ki,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),X("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),G(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),X("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),H("formControlName",o.formView.name)}}function $i(e,n){if(e&1){let t=k();a(0,"button",66),g("click",function(){C(t);let i=p().$implicit,l=p(2);return f(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Ii(e,n){if(e&1&&(a(0,"div",37),j(1,38),d(2,Ho,5,16,"app-file-tree",39)(3,Wo,5,12,"app-file-tree",40)(4,Jo,8,13,"spk-form-field")(5,ii,8,13,"spk-form-field")(6,ci,7,14,"spk-select",41)(7,gi,7,14,"spk-select",42)(8,Si,14,11,"div",43)(9,hi,7,11,"spk-form-field")(10,Ei,5,11,"spk-toggle",44)(11,Oi,7,8,"spk-select",45)(12,xi,5,11,"spk-form-field"),W(),d(13,$i,3,0,"button",28),r()),e&2){let t=n.$implicit;$e("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function vi(e,n){if(e&1&&(j(0,19)(1,32),I(2,Ro,1,9,"ng-container",null,$),I(4,Go,1,9,"ng-container",null,$),a(6,"app-toggle-card",33),j(7,34),S(8,7),a(9,"spk-menu")(10,"button",35),u(11,"spk-icon"),r(),j(12,17),I(13,Vo,2,1,"button",29,$),W(),r(),T(),W(),I(15,Uo,1,9,"ng-container",null,$),r(),a(17,"app-toggle-card",33),j(18,34),S(19,8),a(20,"spk-menu")(21,"button",35),u(22,"spk-icon"),r(),j(23,17),I(24,Bo,2,1,"button",29,$),W(),r(),T(),W(),I(26,zo,1,9,"ng-container",null,$),r(),d(28,Ii,14,5,"ng-template",null,1,lt),W()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function Mi(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),bt("isOpenChange",function(i){C(t);let l=p();return Rt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),f(i)}),a(1,"header",68)(2,"h2"),M(3,9),r(),a(4,"spk-alert",69),M(5,10),r()(),a(6,"div",70)(7,"spk-form-field"),u(8,"textarea",71),r()(),a(9,"footer",72)(10,"button",21),g("click",function(){C(t);let i=p();return f(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),g("click",function(){C(t);let i=p();return f(i.closeTargetUrlDialog(!0))}),S(13,11),u(14,"spk-icon"),T(),r()()()}if(e&2){let t=p();wt("isOpen",t.targetUrlDialogOpen),c("options",Gt(3,Ao)),s(8),c("formControl",t.targetUrlCtrl)}}var wi=["Bytes","KB","MB","GB","TB","PB"],Dt=new oe,en=(e={destinations:[]})=>Dt.group({destinations:Dt.array(e.destinations)}),tn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Dt.group({destinationType:Dt.control(e),custom:n,dynamic:t,advanced:o}),It=class e{#e=x(re);#t=x(De);#o=x(Lt);#i=x(We);#n=x(_e);#r=x(zt);injector=x(Mt);formRef=fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(wi);successfulTest=O(!1);destinationTypeOptionsInFocus=O(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=O(ve.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=K(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=K(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=K(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ut;targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(He,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:_=>{_&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let _=l.split("incorrect-cert:")[1];this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${_}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:h=>{h&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",_)}})}if(l.startsWith("incorrect-host-key:")){let _=l.split('incorrect-host-key:"')[1].split('",')[0],h=l.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(He,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${h}
6
- with the REPORTED host key: ${_}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,_)}}):this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${_}`,confirmText:"Approve",cancelText:"Cancel"},closed:N=>{N&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,_)}})}}})}mapToTargetUrl(n){return St(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=O("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=O(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=O(!1);#p=O(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,_=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+_);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(et(()=>this.#a.set(!1))).subscribe({next:y=>{console.log("res",y),y?.authid&&this.#p.set(y.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Do,5),t&2&&Te()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=Ie(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let _;_=$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:`,_=Ie(_);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=Ie(h);let N;N=$localize`Edit target URL`;let y;y=$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",""],["fieldTemplate",""],n,t,o,i,l,_,h,N,y,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"],["spk-button","","type","button",1,"outlined"],["item","","type","button"],[1,"tile",3,"click"],["item","","type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"value"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",12,0),g("submit",function(){return C(i),f(o.next())}),a(2,"header")(3,"h3",13),S(4,2),a(5,"div",14),d(6,xo,4,3,"button",15),a(7,"spk-menu")(8,"button",16),u(9,"spk-icon"),r(),j(10,17),a(11,"button",18),g("click",function(){return C(i),f(o.openTargetUrlDialog())}),u(12,"spk-icon"),r(),W(),r()(),T(),r(),d(13,$o,3,0,"p"),r(),d(14,Mo,9,0)(15,vi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),g("click",function(){return C(i),f(o.goBack())}),S(18,3),u(19,"spk-icon"),T(),r(),a(20,"button",22),S(21,4),u(22,"spk-icon"),T(),r()()(),d(23,Mi,15,4,"spk-dialog",23)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Oe,Pe,ae,Ge,be,se,ye,_t,Ne,Ae,Ve,Bt,ct,pe,me,Ct,gt,ce,le,Ue,qe,Kt,Ft,Be,Qe],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}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{He as a,St as b,ve as c,en as d,tn as e,It as f,Wt as g,Ot as h,At as i,qt as j,Or as k,kt as l,Yt as m,xt as n,Jt as o,$t as p,_e as q};
package/chunk-7EROSQ6G.js DELETED
@@ -1 +0,0 @@
1
- import{Ca as k,Ga as ae,X as se,a as H,b as re,c as oe,e as f,za as ie}from"./chunk-NW7VZHBJ.js";import{$ as z,Ba as M,Ca as v,Da as E,Ea as q,Fa as K,Ga as W,Gc as ne,Ha as X,Ia as J,Ja as Q,Ka as ee,La as m,Pa as T,Q as g,T as d,Ta as te,W as _,Y as c,na as w,oa as N,ta as G,ua as L,va as Y,wa as S,xa as P}from"./chunk-CFESGUGK.js";import{a as I,b as Z}from"./chunk-C6Q5SG76.js";var j=class extends oe{supportsDOMEvents=!0},U=class r extends j{static makeCurrent(){re(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=ve();return e==null?null:Ee(e)}resetBaseElement(){D=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return se(document.cookie,n)}},D=null;function ve(){return D=D||document.querySelector("base"),D?D.getAttribute("href"):null}function Ee(r){return new URL(r,document.baseURI).pathname}var we=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),B=new _(""),pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new g(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(c(B),c(w))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),A=class{_doc;constructor(n){this._doc=n}manager},b="ng-app-id";function ce(r){for(let n of r)n.remove()}function le(r,n){let e=n.createElement("style");return e.textContent=r,e}function Se(r,n,e,t){let o=r.head?.querySelectorAll(`style[${b}="${n}"],link[${b}="${n}"]`);if(o)for(let s of o)s.removeAttribute(b),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var he=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=k(s),Se(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,le);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ce(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ce(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,le(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(b,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(f),c(L),c(P,8),c(S))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),x={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},V=/%COMP%/g,me="%COMP%",Me=`_nghost-${me}`,Te=`_ngcontent-${me}`,De=!0,Ce=new _("",{providedIn:"root",factory:()=>De});function Re(r){return Te.replace(V,r)}function be(r){return Me.replace(V,r)}function ye(r,n){return n.map(e=>e.replace(V,r))}var ue=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,l,u=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=l,this.nonce=u,this.platformIsServer=k(a),this.defaultRenderer=new C(e,i,l,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===M.ShadowDom&&(t=Z(I({},t),{encapsulation:M.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(t.encapsulation){case M.Emulated:s=new O(l,u,t,this.appId,p,i,a,h);break;case M.ShadowDom:return new $(l,u,e,t,i,a,this.nonce,h);default:s=new R(l,u,t,p,i,a,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static \u0275fac=function(t){return new(t||r)(c(pe),c(he),c(L),c(Ce),c(f),c(S),c(w),c(P))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),C=class{eventManager;doc;ngZone;platformIsServer;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(x[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(de(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(de(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new g(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=x[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=x[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(T.DashCase|T.Important)?n.style.setProperty(e,t,o&T.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&T.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=H().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function de(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var $=class extends C{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,l){super(n,s,i,l),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=ye(o.id,o.styles);for(let h of u){let y=document.createElement("style");a&&y.setAttribute("nonce",a),y.textContent=h,this.shadowRoot.appendChild(y)}let p=o.getExternalStyles?.();if(p)for(let h of p){let y=F(h,s);a&&y.setAttribute("nonce",a),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends C{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,l){super(n,s,i,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=l?ye(l,t.styles):t.styles,this.styleUrls=t.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,l){let u=o+"-"+t.id;super(n,e,t,s,i,a,l,u),this.contentAttr=Re(u),this.hostAttr=be(u)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Ae=(()=>{class r extends A{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),fe=["alt","control","meta","shift"],Oe={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Ie={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},_e=(()=>{class r extends A{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>H().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),fe.forEach(u=>{let p=t.indexOf(u);p>-1&&(t.splice(p,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let l={};return l.domEventName=o,l.fullKey=i,l}static matchEventFullKeyCode(e,t){let o=Oe[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),fe.forEach(i=>{if(i!==o){let a=Ie[i];a(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})();function vt(r,n){return ne(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:ke}}function Le(){U.makeCurrent()}function Pe(){return new N}function He(){return G(document),document}var ke=[{provide:S,useValue:ie},{provide:Y,useValue:Le,multi:!0},{provide:f,useFactory:He,deps:[]}];var xe=[{provide:z,useValue:"root"},{provide:N,useFactory:Pe,deps:[]},{provide:B,useClass:Ae,multi:!0,deps:[f,w,S]},{provide:B,useClass:_e,multi:!0,deps:[f]},ue,he,pe,{provide:te,useExisting:ue},{provide:ae,useClass:we,deps:[]},[]];var Et=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var je=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Ue),o},providedIn:"root"})}return r})(),Ue=(()=>{class r extends je{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return E(t,"HTML")?v(t):ee(this._doc,String(t)).toString();case m.STYLE:return E(t,"Style")?v(t):t;case m.SCRIPT:if(E(t,"Script"))return v(t);throw new g(5200,!1);case m.URL:return E(t,"URL")?v(t):Q(String(t));case m.RESOURCE_URL:if(E(t,"ResourceURL"))return v(t);throw new g(5201,!1);default:throw new g(5202,!1)}}bypassSecurityTrustHtml(e){return q(e)}bypassSecurityTrustStyle(e){return K(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return X(e)}bypassSecurityTrustResourceUrl(e){return J(e)}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{vt as a,Et as b,je as c};
package/chunk-7NOLIW3Y.js DELETED
@@ -1 +0,0 @@
1
- import{b as jr}from"./chunk-7EROSQ6G.js";import{j as mt,n as ze}from"./chunk-NW7VZHBJ.js";import{$b as Er,A as fe,B as ct,C as ee,D as sr,Db as Tr,Dc as ke,F as je,G as H,H as lt,Hc as _e,I as ar,K as ur,M as cr,N as x,O as lr,Oa as mr,Oc as Pr,P as S,Q as w,Ra as j,T as b,Tb as Or,Ua as gt,V as hr,Va as yr,W as P,X as ht,Y as dt,Z as g,_ as dr,a as tr,aa as Ne,ab as Cr,ac as Ur,ba as k,bc as xr,c as rr,cb as Sr,da as Le,db as Rr,e as ot,f as st,fb as $e,g as B,h as M,ha as ft,ia as fr,ib as wr,j as V,ja as pr,k as T,kb as br,l as d,la as gr,lb as Ir,m as de,ma as te,n as nr,nb as Ar,o as ir,ob as Dr,q as m,r as Pe,ra as vr,rb as Mr,s as O,sa as pt,t as at,u as or,v as ut,x as X,z as J,zc as vt}from"./chunk-CFESGUGK.js";import{a as l,b as I}from"./chunk-C6Q5SG76.js";var p="primary",Oe=Symbol("RouteTitle"),wt=class{params;constructor(r){this.params=r||{}}has(r){return Object.prototype.hasOwnProperty.call(this.params,r)}get(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e[0]:e}return null}getAll(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ae(t){return new wt(t)}function Sn(t,r,e){let n=e.path.split("/");if(n.length>t.length||e.pathMatch==="full"&&(r.hasChildren()||n.length<t.length))return null;let i={};for(let o=0;o<n.length;o++){let s=n[o],u=t[o];if(s[0]===":")i[s.substring(1)]=u;else if(s!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:i}}function Rn(t,r){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!$(t[e],r[e]))return!1;return!0}function $(t,r){let e=t?bt(t):void 0,n=r?bt(r):void 0;if(!e||!n||e.length!=n.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Vr(t[i],r[i]))return!1;return!0}function bt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Vr(t,r){if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;let e=[...t].sort(),n=[...r].sort();return e.every((i,o)=>n[o]===i)}else return t===r}function Hr(t){return t.length>0?t[t.length-1]:null}function W(t){return nr(t)?t:Ir(t)?T(Promise.resolve(t)):d(t)}var wn={exact:Gr,subset:Qr},Wr={exact:bn,subset:In,ignored:()=>!0};function Nr(t,r,e){return wn[e.paths](t.root,r.root,e.matrixParams)&&Wr[e.queryParams](t.queryParams,r.queryParams)&&!(e.fragment==="exact"&&t.fragment!==r.fragment)}function bn(t,r){return $(t,r)}function Gr(t,r,e){if(!Q(t.segments,r.segments)||!Be(t.segments,r.segments,e)||t.numberOfChildren!==r.numberOfChildren)return!1;for(let n in r.children)if(!t.children[n]||!Gr(t.children[n],r.children[n],e))return!1;return!0}function In(t,r){return Object.keys(r).length<=Object.keys(t).length&&Object.keys(r).every(e=>Vr(t[e],r[e]))}function Qr(t,r,e){return Kr(t,r,r.segments,e)}function Kr(t,r,e,n){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!Q(i,e)||r.hasChildren()||!Be(i,e,n))}else if(t.segments.length===e.length){if(!Q(t.segments,e)||!Be(t.segments,e,n))return!1;for(let i in r.children)if(!t.children[i]||!Qr(t.children[i],r.children[i],n))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!Q(t.segments,i)||!Be(t.segments,i,n)||!t.children[p]?!1:Kr(t.children[p],r,o,n)}}function Be(t,r,e){return r.every((n,i)=>Wr[e](t[i].parameters,n.parameters))}var z=class{root;queryParams;fragment;_queryParamMap;constructor(r=new v([],{}),e={},n=null){this.root=r,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){return Mn.serialize(this)}},v=class{segments;children;parent=null;constructor(r,e){this.segments=r,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Ve(this)}},G=class{path;parameters;_parameterMap;constructor(r,e){this.path=r,this.parameters=e}get parameterMap(){return this._parameterMap??=ae(this.parameters),this._parameterMap}toString(){return Yr(this)}};function An(t,r){return Q(t,r)&&t.every((e,n)=>$(e.parameters,r[n].parameters))}function Q(t,r){return t.length!==r.length?!1:t.every((e,n)=>e.path===r[n].path)}function Dn(t,r){let e=[];return Object.entries(t.children).forEach(([n,i])=>{n===p&&(e=e.concat(r(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==p&&(e=e.concat(r(i,n)))}),e}var Kt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>new Se,providedIn:"root"})}return t})(),Se=class{parse(r){let e=new At(r);return new z(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(r){let e=`/${pe(r.root,!0)}`,n=En(r.queryParams),i=typeof r.fragment=="string"?`#${Tn(r.fragment)}`:"";return`${e}${n}${i}`}},Mn=new Se;function Ve(t){return t.segments.map(r=>Yr(r)).join("/")}function pe(t,r){if(!t.hasChildren())return Ve(t);if(r){let e=t.children[p]?pe(t.children[p],!1):"",n=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&n.push(`${i}:${pe(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=Dn(t,(n,i)=>i===p?[pe(t.children[p],!1)]:[`${i}:${pe(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${Ve(t)}/${e[0]}`:`${Ve(t)}/(${e.join("//")})`}}function Zr(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Fe(t){return Zr(t).replace(/%3B/gi,";")}function Tn(t){return encodeURI(t)}function It(t){return Zr(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function He(t){return decodeURIComponent(t)}function Lr(t){return He(t.replace(/\+/g,"%20"))}function Yr(t){return`${It(t.path)}${On(t.parameters)}`}function On(t){return Object.entries(t).map(([r,e])=>`;${It(r)}=${It(e)}`).join("")}function En(t){let r=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(i=>`${Fe(e)}=${Fe(i)}`).join("&"):`${Fe(e)}=${Fe(n)}`).filter(e=>e);return r.length?`?${r.join("&")}`:""}var Un=/^[^\/()?;#]+/;function yt(t){let r=t.match(Un);return r?r[0]:""}var xn=/^[^\/()?;=#]+/;function Pn(t){let r=t.match(xn);return r?r[0]:""}var jn=/^[^=?&#]+/;function Nn(t){let r=t.match(jn);return r?r[0]:""}var Ln=/^[^&#]+/;function $n(t){let r=t.match(Ln);return r?r[0]:""}var At=class{url;remaining;constructor(r){this.url=r,this.remaining=r}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],this.parseChildren())}parseQueryParams(){let r={};if(this.consumeOptional("?"))do this.parseQueryParam(r);while(this.consumeOptional("&"));return r}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let r=[];for(this.peekStartsWith("(")||r.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),r.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(r.length>0||Object.keys(e).length>0)&&(n[p]=new v(r,e)),n}parseSegment(){let r=yt(this.remaining);if(r===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(r),new G(He(r),this.parseMatrixParams())}parseMatrixParams(){let r={};for(;this.consumeOptional(";");)this.parseParam(r);return r}parseParam(r){let e=Pn(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let i=yt(this.remaining);i&&(n=i,this.capture(n))}r[He(e)]=He(n)}parseQueryParam(r){let e=Nn(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=$n(this.remaining);s&&(n=s,this.capture(n))}let i=Lr(e),o=Lr(n);if(r.hasOwnProperty(i)){let s=r[i];Array.isArray(s)||(s=[s],r[i]=s),s.push(o)}else r[i]=o}parseParens(r){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=yt(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new w(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):r&&(o=p);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[p]:new v([],s),this.consumeOptional("//")}return e}peekStartsWith(r){return this.remaining.startsWith(r)}consumeOptional(r){return this.peekStartsWith(r)?(this.remaining=this.remaining.substring(r.length),!0):!1}capture(r){if(!this.consumeOptional(r))throw new w(4011,!1)}};function Xr(t){return t.segments.length>0?new v([],{[p]:t}):t}function Jr(t){let r={};for(let[n,i]of Object.entries(t.children)){let o=Jr(i);if(n===p&&o.segments.length===0&&o.hasChildren())for(let[s,u]of Object.entries(o.children))r[s]=u;else(o.segments.length>0||o.hasChildren())&&(r[n]=o)}let e=new v(t.segments,r);return kn(e)}function kn(t){if(t.numberOfChildren===1&&t.children[p]){let r=t.children[p];return new v(t.segments.concat(r.segments),r.children)}return t}function K(t){return t instanceof z}function _n(t,r,e=null,n=null){let i=en(t);return tn(i,r,e,n)}function en(t){let r;function e(o){let s={};for(let a of o.children){let c=e(a);s[a.outlet]=c}let u=new v(o.url,s);return o===t&&(r=u),u}let n=e(t.root),i=Xr(n);return r??i}function tn(t,r,e,n){let i=t;for(;i.parent;)i=i.parent;if(r.length===0)return Ct(i,i,i,e,n);let o=zn(r);if(o.toRoot())return Ct(i,i,new v([],{}),e,n);let s=Fn(o,i,t),u=s.processChildren?me(s.segmentGroup,s.index,o.commands):nn(s.segmentGroup,s.index,o.commands);return Ct(i,s.segmentGroup,u,e,n)}function We(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Re(t){return typeof t=="object"&&t!=null&&t.outlets}function Ct(t,r,e,n,i){let o={};n&&Object.entries(n).forEach(([a,c])=>{o[a]=Array.isArray(c)?c.map(h=>`${h}`):`${c}`});let s;t===r?s=e:s=rn(t,r,e);let u=Xr(Jr(s));return new z(u,o,i)}function rn(t,r,e){let n={};return Object.entries(t.children).forEach(([i,o])=>{o===r?n[i]=e:n[i]=rn(o,r,e)}),new v(t.segments,n)}var Ge=class{isAbsolute;numberOfDoubleDots;commands;constructor(r,e,n){if(this.isAbsolute=r,this.numberOfDoubleDots=e,this.commands=n,r&&n.length>0&&We(n[0]))throw new w(4003,!1);let i=n.find(Re);if(i&&i!==Hr(n))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function zn(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Ge(!0,0,t);let r=0,e=!1,n=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let u={};return Object.entries(o.outlets).forEach(([a,c])=>{u[a]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:u}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((u,a)=>{a==0&&u==="."||(a==0&&u===""?e=!0:u===".."?r++:u!=""&&i.push(u))}),i):[...i,o]},[]);return new Ge(e,r,n)}var ie=class{segmentGroup;processChildren;index;constructor(r,e,n){this.segmentGroup=r,this.processChildren=e,this.index=n}};function Fn(t,r,e){if(t.isAbsolute)return new ie(r,!0,0);if(!e)return new ie(r,!1,NaN);if(e.parent===null)return new ie(e,!0,0);let n=We(t.commands[0])?0:1,i=e.segments.length-1+n;return qn(e,i,t.numberOfDoubleDots)}function qn(t,r,e){let n=t,i=r,o=e;for(;o>i;){if(o-=i,n=n.parent,!n)throw new w(4005,!1);i=n.segments.length}return new ie(n,!1,i-o)}function Bn(t){return Re(t[0])?t[0].outlets:{[p]:t}}function nn(t,r,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return me(t,r,e);let n=Vn(t,r,e),i=e.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,n.pathIndex),{});return o.children[p]=new v(t.segments.slice(n.pathIndex),t.children),me(o,0,i)}else return n.match&&i.length===0?new v(t.segments,{}):n.match&&!t.hasChildren()?Dt(t,r,e):n.match?me(t,0,i):Dt(t,r,e)}function me(t,r,e){if(e.length===0)return new v(t.segments,{});{let n=Bn(e),i={};if(Object.keys(n).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=me(t.children[p],r,e);return new v(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=nn(t.children[o],r,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function Vn(t,r,e){let n=0,i=r,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(n>=e.length)return o;let s=t.segments[i],u=e[n];if(Re(u))break;let a=`${u}`,c=n<e.length-1?e[n+1]:null;if(i>0&&a===void 0)break;if(a&&c&&typeof c=="object"&&c.outlets===void 0){if(!kr(a,c,s))return o;n+=2}else{if(!kr(a,{},s))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function Dt(t,r,e){let n=t.segments.slice(0,r),i=0;for(;i<e.length;){let o=e[i];if(Re(o)){let a=Hn(o.outlets);return new v(n,a)}if(i===0&&We(e[0])){let a=t.segments[r];n.push(new G(a.path,$r(e[0]))),i++;continue}let s=Re(o)?o.outlets[p]:`${o}`,u=i<e.length-1?e[i+1]:null;s&&u&&We(u)?(n.push(new G(s,$r(u))),i+=2):(n.push(new G(s,{})),i++)}return new v(n,{})}function Hn(t){let r={};return Object.entries(t).forEach(([e,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(r[e]=Dt(new v([],{}),0,n))}),r}function $r(t){let r={};return Object.entries(t).forEach(([e,n])=>r[e]=`${n}`),r}function kr(t,r,e){return t==e.path&&$(r,e.parameters)}var ye="imperative",C=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(C||{}),E=class{id;url;constructor(r,e){this.id=r,this.url=e}},we=class extends E{type=C.NavigationStart;navigationTrigger;restoredState;constructor(r,e,n="imperative",i=null){super(r,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},F=class extends E{urlAfterRedirects;type=C.NavigationEnd;constructor(r,e,n){super(r,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},D=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(D||{}),Mt=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Mt||{}),_=class extends E{reason;code;type=C.NavigationCancel;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Z=class extends E{reason;code;type=C.NavigationSkipped;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}},be=class extends E{error;target;type=C.NavigationError;constructor(r,e,n,i){super(r,e),this.error=n,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Qe=class extends E{urlAfterRedirects;state;type=C.RoutesRecognized;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Tt=class extends E{urlAfterRedirects;state;type=C.GuardsCheckStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ot=class extends E{urlAfterRedirects;state;shouldActivate;type=C.GuardsCheckEnd;constructor(r,e,n,i,o){super(r,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Et=class extends E{urlAfterRedirects;state;type=C.ResolveStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ut=class extends E{urlAfterRedirects;state;type=C.ResolveEnd;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},xt=class{route;type=C.RouteConfigLoadStart;constructor(r){this.route=r}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Pt=class{route;type=C.RouteConfigLoadEnd;constructor(r){this.route=r}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},jt=class{snapshot;type=C.ChildActivationStart;constructor(r){this.snapshot=r}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Nt=class{snapshot;type=C.ChildActivationEnd;constructor(r){this.snapshot=r}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Lt=class{snapshot;type=C.ActivationStart;constructor(r){this.snapshot=r}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$t=class{snapshot;type=C.ActivationEnd;constructor(r){this.snapshot=r}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Ie=class{},ue=class{url;navigationBehaviorOptions;constructor(r,e){this.url=r,this.navigationBehaviorOptions=e}};function Wn(t,r){return t.providers&&!t._injector&&(t._injector=Sr(t.providers,r,`Route: ${t.path}`)),t._injector??r}function N(t){return t.outlet||p}function Gn(t,r){let e=t.filter(n=>N(n)===r);return e.push(...t.filter(n=>N(n)!==r)),e}function Ee(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let r=t.parent;r;r=r.parent){let e=r.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var kt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Ee(this.route?.snapshot)??this.rootInjector}constructor(r){this.rootInjector=r,this.children=new tt(this.rootInjector)}},tt=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let i=this.getOrCreateContext(e);i.outlet=n,this.contexts.set(e,i)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new kt(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(n){return new(n||t)(dt(Ne))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ke=class{_root;constructor(r){this._root=r}get root(){return this._root.value}parent(r){let e=this.pathFromRoot(r);return e.length>1?e[e.length-2]:null}children(r){let e=_t(r,this._root);return e?e.children.map(n=>n.value):[]}firstChild(r){let e=_t(r,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(r){let e=zt(r,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==r)}pathFromRoot(r){return zt(r,this._root).map(e=>e.value)}};function _t(t,r){if(t===r.value)return r;for(let e of r.children){let n=_t(t,e);if(n)return n}return null}function zt(t,r){if(t===r.value)return[r];for(let e of r.children){let n=zt(t,e);if(n.length)return n.unshift(r),n}return[]}var A=class{value;children;constructor(r,e){this.value=r,this.children=e}toString(){return`TreeNode(${this.value})`}};function ne(t){let r={};return t&&t.children.forEach(e=>r[e.value.outlet]=e),r}var Ze=class extends Ke{snapshot;constructor(r,e){super(r),this.snapshot=e,Zt(this,r)}toString(){return this.snapshot.toString()}};function on(t){let r=Qn(t),e=new M([new G("",{})]),n=new M({}),i=new M({}),o=new M({}),s=new M(""),u=new Y(e,n,o,s,i,p,t,r.root);return u.snapshot=r.root,new Ze(new A(u,[]),r)}function Qn(t){let r={},e={},n={},i="",o=new oe([],r,n,i,e,p,t,null,{});return new Xe("",new A(o,[]))}var Y=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(r,e,n,i,o,s,u,a){this.urlSubject=r,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=u,this._futureSnapshot=a,this.title=this.dataSubject?.pipe(m(c=>c[Oe]))??d(void 0),this.url=r,this.params=e,this.queryParams=n,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(m(r=>ae(r))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(m(r=>ae(r))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ye(t,r,e="emptyOnly"){let n,{routeConfig:i}=t;return r!==null&&(e==="always"||i?.path===""||!r.component&&!r.routeConfig?.loadComponent)?n={params:l(l({},r.params),t.params),data:l(l({},r.data),t.data),resolve:l(l(l(l({},t.data),r.data),i?.data),t._resolvedData)}:n={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&an(i)&&(n.resolve[Oe]=i.title),n}var oe=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Oe]}constructor(r,e,n,i,o,s,u,a,c){this.url=r,this.params=e,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=s,this.component=u,this.routeConfig=a,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ae(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ae(this.queryParams),this._queryParamMap}toString(){let r=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${r}', path:'${e}')`}},Xe=class extends Ke{url;constructor(r,e){super(e),this.url=r,Zt(this,e)}toString(){return sn(this._root)}};function Zt(t,r){r.value._routerState=t,r.children.forEach(e=>Zt(t,e))}function sn(t){let r=t.children.length>0?` { ${t.children.map(sn).join(", ")} } `:"";return`${t.value}${r}`}function St(t){if(t.snapshot){let r=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$(r.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),r.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),$(r.params,e.params)||t.paramsSubject.next(e.params),Rn(r.url,e.url)||t.urlSubject.next(e.url),$(r.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Ft(t,r){let e=$(t.params,r.params)&&An(t.url,r.url),n=!t.parent!=!r.parent;return e&&!n&&(!t.parent||Ft(t.parent,r.parent))}function an(t){return typeof t.title=="string"||t.title===null}var Kn=new P(""),Zn=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new te;deactivateEvents=new te;attachEvents=new te;detachEvents=new te;routerOutletData=vr(void 0);parentContexts=g(tt);location=g(yr);changeDetector=g(ke);inputBinder=g(rt,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:i}=e.name;if(n)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,u=this.parentContexts.getOrCreateContext(this.name).children,a=new qt(e,u,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:a,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=$e({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Le]})}return t})(),qt=class t{route;childContexts;parent;outletData;__ngOutletInjector(r){return new t(this.route,this.childContexts,r,this.outletData)}constructor(r,e,n,i){this.route=r,this.childContexts=e,this.parent=n,this.outletData=i}get(r,e){return r===Y?this.route:r===tt?this.childContexts:r===Kn?this.outletData:this.parent.get(r,e)}},rt=new P(""),_r=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:n}=e,i=Pe([n.queryParams,n.params,n.data]).pipe(x(([o,s,u],a)=>(u=l(l(l({},o),s),u),a===0?d(u):Promise.resolve(u)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(e);return}let s=Pr(n.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:u}of s.inputs)e.activatedComponentRef.setInput(u,o[u])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function Yn(t,r,e){let n=Ae(t,r._root,e?e._root:void 0);return new Ze(n,r)}function Ae(t,r,e){if(e&&t.shouldReuseRoute(r.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=r.value;let i=Xn(t,r,e);return new A(n,i)}else{if(t.shouldAttach(r.value)){let o=t.retrieve(r.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=r.value,s.children=r.children.map(u=>Ae(t,u)),s}}let n=Jn(r.value),i=r.children.map(o=>Ae(t,o));return new A(n,i)}}function Xn(t,r,e){return r.children.map(n=>{for(let i of e.children)if(t.shouldReuseRoute(n.value,i.value.snapshot))return Ae(t,n,i);return Ae(t,n)})}function Jn(t){return new Y(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var De=class{redirectTo;navigationBehaviorOptions;constructor(r,e){this.redirectTo=r,this.navigationBehaviorOptions=e}},un="ngNavigationCancelingError";function Je(t,r){let{redirectTo:e,navigationBehaviorOptions:n}=K(r)?{redirectTo:r,navigationBehaviorOptions:void 0}:r,i=cn(!1,D.Redirect);return i.url=e,i.navigationBehaviorOptions=n,i}function cn(t,r){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[un]=!0,e.cancellationCode=r,e}function ei(t){return ln(t)&&K(t.url)}function ln(t){return!!t&&t[un]}var ti=(t,r,e,n)=>m(i=>(new Bt(r,i.targetRouterState,i.currentRouterState,e,n).activate(t),i)),Bt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(r,e,n,i,o){this.routeReuseStrategy=r,this.futureState=e,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=o}activate(r){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,r),St(this.futureState.root),this.activateChildRoutes(e,n,r)}deactivateChildRoutes(r,e,n){let i=ne(e);r.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],n),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(i===o)if(i.component){let s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(r,e,s.children)}else this.deactivateChildRoutes(r,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(r,e){r.value.component&&this.routeReuseStrategy.shouldDetach(r.value.snapshot)?this.detachAndStoreRouteSubtree(r,e):this.deactivateRouteAndOutlet(r,e)}detachAndStoreRouteSubtree(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ne(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(n&&n.outlet){let s=n.outlet.detach(),u=n.children.onOutletDeactivated();this.routeReuseStrategy.store(r.value.snapshot,{componentRef:s,route:r,contexts:u})}}deactivateRouteAndOutlet(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ne(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(r,e,n){let i=ne(e);r.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],n),this.forwardEvent(new $t(o.value.snapshot))}),r.children.length&&this.forwardEvent(new Nt(r.value.snapshot))}activateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(St(i),i===o)if(i.component){let s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(r,e,s.children)}else this.activateChildRoutes(r,e,n);else if(i.component){let s=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let u=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(u.contexts),s.attachRef=u.componentRef,s.route=u.route.value,s.outlet&&s.outlet.attach(u.componentRef,u.route.value),St(u.route.value),this.activateChildRoutes(r,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(r,null,s.children)}else this.activateChildRoutes(r,null,n)}},et=class{path;route;constructor(r){this.path=r,this.route=this.path[this.path.length-1]}},se=class{component;route;constructor(r,e){this.component=r,this.route=e}};function ri(t,r,e){let n=t._root,i=r?r._root:null;return ge(n,i,e,[n.value])}function ni(t){let r=t.routeConfig?t.routeConfig.canActivateChild:null;return!r||r.length===0?null:{node:t,guards:r}}function le(t,r){let e=Symbol(),n=r.get(t,e);return n===e?typeof t=="function"&&!hr(t)?t:r.get(t):n}function ge(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ne(r);return t.children.forEach(s=>{ii(s,o[s.value.outlet],e,n.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,u])=>Ce(u,e.getContext(s),i)),i}function ii(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=r?r.value:null,u=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let a=oi(s,o,o.routeConfig.runGuardsAndResolvers);a?i.canActivateChecks.push(new et(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?ge(t,r,u?u.children:null,n,i):ge(t,r,e,n,i),a&&u&&u.outlet&&u.outlet.isActivated&&i.canDeactivateChecks.push(new se(u.outlet.component,s))}else s&&Ce(r,u,i),i.canActivateChecks.push(new et(n)),o.component?ge(t,null,u?u.children:null,n,i):ge(t,null,e,n,i);return i}function oi(t,r,e){if(typeof e=="function")return e(t,r);switch(e){case"pathParamsChange":return!Q(t.url,r.url);case"pathParamsOrQueryParamsChange":return!Q(t.url,r.url)||!$(t.queryParams,r.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ft(t,r)||!$(t.queryParams,r.queryParams);case"paramsChange":default:return!Ft(t,r)}}function Ce(t,r,e){let n=ne(t),i=t.value;Object.entries(n).forEach(([o,s])=>{i.component?r?Ce(s,r.children.getContext(o),e):Ce(s,null,e):Ce(s,r,e)}),i.component?r&&r.outlet&&r.outlet.isActivated?e.canDeactivateChecks.push(new se(r.outlet.component,i)):e.canDeactivateChecks.push(new se(null,i)):e.canDeactivateChecks.push(new se(null,i))}function Ue(t){return typeof t=="function"}function si(t){return typeof t=="boolean"}function ai(t){return t&&Ue(t.canLoad)}function ui(t){return t&&Ue(t.canActivate)}function ci(t){return t&&Ue(t.canActivateChild)}function li(t){return t&&Ue(t.canDeactivate)}function hi(t){return t&&Ue(t.canMatch)}function hn(t){return t instanceof ir||t?.name==="EmptyError"}var qe=Symbol("INITIAL_VALUE");function ce(){return x(t=>Pe(t.map(r=>r.pipe(ee(1),cr(qe)))).pipe(m(r=>{for(let e of r)if(e!==!0){if(e===qe)return qe;if(e===!1||di(e))return e}return!0}),X(r=>r!==qe),ee(1)))}function di(t){return K(t)||t instanceof De}function fi(t,r){return O(e=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(I(l({},e),{guardsResult:!0})):pi(s,n,i,t).pipe(O(u=>u&&si(u)?gi(n,o,t,r):d(u)),m(u=>I(l({},e),{guardsResult:u})))})}function pi(t,r,e,n){return T(t).pipe(O(i=>Si(i.component,i.route,e,r,n)),H(i=>i!==!0,!0))}function gi(t,r,e,n){return T(r).pipe(fe(i=>or(mi(i.route.parent,n),vi(i.route,n),Ci(t,i.path,e),yi(t,i.route,e))),H(i=>i!==!0,!0))}function vi(t,r){return t!==null&&r&&r(new Lt(t)),d(!0)}function mi(t,r){return t!==null&&r&&r(new jt(t)),d(!0)}function yi(t,r,e){let n=r.routeConfig?r.routeConfig.canActivate:null;if(!n||n.length===0)return d(!0);let i=n.map(o=>ut(()=>{let s=Ee(r)??e,u=le(o,s),a=ui(u)?u.canActivate(r,t):k(s,()=>u(r,t));return W(a).pipe(H())}));return d(i).pipe(ce())}function Ci(t,r,e){let n=r[r.length-1],o=r.slice(0,r.length-1).reverse().map(s=>ni(s)).filter(s=>s!==null).map(s=>ut(()=>{let u=s.guards.map(a=>{let c=Ee(s.node)??e,h=le(a,c),f=ci(h)?h.canActivateChild(n,t):k(c,()=>h(n,t));return W(f).pipe(H())});return d(u).pipe(ce())}));return d(o).pipe(ce())}function Si(t,r,e,n,i){let o=r&&r.routeConfig?r.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(u=>{let a=Ee(r)??i,c=le(u,a),h=li(c)?c.canDeactivate(t,r,e,n):k(a,()=>c(t,r,e,n));return W(h).pipe(H())});return d(s).pipe(ce())}function Ri(t,r,e,n){let i=r.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let u=le(s,t),a=ai(u)?u.canLoad(r,e):k(t,()=>u(r,e));return W(a)});return d(o).pipe(ce(),dn(n))}function dn(t){return rr(S(r=>{if(typeof r!="boolean")throw Je(t,r)}),m(r=>r===!0))}function wi(t,r,e,n){let i=r.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let u=le(s,t),a=hi(u)?u.canMatch(r,e):k(t,()=>u(r,e));return W(a)});return d(o).pipe(ce(),dn(n))}var Me=class{segmentGroup;constructor(r){this.segmentGroup=r||null}},Te=class extends Error{urlTree;constructor(r){super(),this.urlTree=r}};function re(t){return de(new Me(t))}function bi(t){return de(new w(4e3,!1))}function Ii(t){return de(cn(!1,D.GuardRejected))}var Vt=class{urlSerializer;urlTree;constructor(r,e){this.urlSerializer=r,this.urlTree=e}lineralizeSegments(r,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return d(n);if(i.numberOfChildren>1||!i.children[p])return bi(`${r.redirectTo}`);i=i.children[p]}}applyRedirectCommands(r,e,n,i,o){if(typeof e!="string"){let u=e,{queryParams:a,fragment:c,routeConfig:h,url:f,outlet:y,params:L,data:R,title:q}=i,U=k(o,()=>u({params:L,data:R,queryParams:a,fragment:c,routeConfig:h,url:f,outlet:y,title:q}));if(U instanceof z)throw new Te(U);e=U}let s=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),r,n);if(e[0]==="/")throw new Te(s);return s}applyRedirectCreateUrlTree(r,e,n,i){let o=this.createSegmentGroup(r,e.root,n,i);return new z(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(r,e){let n={};return Object.entries(r).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let u=o.substring(1);n[i]=e[u]}else n[i]=o}),n}createSegmentGroup(r,e,n,i){let o=this.createSegments(r,e.segments,n,i),s={};return Object.entries(e.children).forEach(([u,a])=>{s[u]=this.createSegmentGroup(r,a,n,i)}),new v(o,s)}createSegments(r,e,n,i){return e.map(o=>o.path[0]===":"?this.findPosParam(r,o,i):this.findOrReturn(o,n))}findPosParam(r,e,n){let i=n[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(r,e){let n=0;for(let i of e){if(i.path===r.path)return e.splice(n),i;n++}return r}},Ht={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Ai(t,r,e,n,i){let o=fn(t,r,e);return o.matched?(n=Wn(r,n),wi(n,r,e,i).pipe(m(s=>s===!0?o:l({},Ht)))):d(o)}function fn(t,r,e){if(r.path==="**")return Di(e);if(r.path==="")return r.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Ht):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(r.matcher||Sn)(e,t,r);if(!i)return l({},Ht);let o={};Object.entries(i.posParams??{}).forEach(([u,a])=>{o[u]=a.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Di(t){return{matched:!0,parameters:t.length>0?Hr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function zr(t,r,e,n){return e.length>0&&Oi(t,e,n)?{segmentGroup:new v(r,Ti(n,new v(e,t.children))),slicedSegments:[]}:e.length===0&&Ei(t,e,n)?{segmentGroup:new v(t.segments,Mi(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function Mi(t,r,e,n){let i={};for(let o of e)if(nt(t,r,o)&&!n[N(o)]){let s=new v([],{});i[N(o)]=s}return l(l({},n),i)}function Ti(t,r){let e={};e[p]=r;for(let n of t)if(n.path===""&&N(n)!==p){let i=new v([],{});e[N(n)]=i}return e}function Oi(t,r,e){return e.some(n=>nt(t,r,n)&&N(n)!==p)}function Ei(t,r,e){return e.some(n=>nt(t,r,n))}function nt(t,r,e){return(t.hasChildren()||r.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Ui(t,r,e){return r.length===0&&!t.children[e]}var Wt=class{};function xi(t,r,e,n,i,o,s="emptyOnly"){return new Gt(t,r,e,n,i,s,o).recognize()}var Pi=31,Gt=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(r,e,n,i,o,s,u){this.injector=r,this.configLoader=e,this.rootComponentType=n,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=u,this.applyRedirects=new Vt(this.urlSerializer,this.urlTree)}noMatchError(r){return new w(4002,`'${r.segmentGroup}'`)}recognize(){let r=zr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(r).pipe(m(({children:e,rootSnapshot:n})=>{let i=new A(n,e),o=new Xe("",i),s=_n(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(r){let e=new oe([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,r,p,e).pipe(m(n=>({children:n,rootSnapshot:e})),J(n=>{if(n instanceof Te)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Me?this.noMatchError(n):n}))}processSegmentGroup(r,e,n,i,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(r,e,n,o):this.processSegment(r,e,n,n.segments,i,!0,o).pipe(m(s=>s instanceof A?[s]:[]))}processChildren(r,e,n,i){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return T(o).pipe(fe(s=>{let u=n.children[s],a=Gn(e,s);return this.processSegmentGroup(r,a,u,s,i)}),ur((s,u)=>(s.push(...u),s)),ct(null),ar(),O(s=>{if(s===null)return re(n);let u=pn(s);return ji(u),d(u)}))}processSegment(r,e,n,i,o,s,u){return T(e).pipe(fe(a=>this.processSegmentAgainstRoute(a._injector??r,e,a,n,i,o,s,u).pipe(J(c=>{if(c instanceof Me)return d(null);throw c}))),H(a=>!!a),J(a=>{if(hn(a))return Ui(n,i,o)?d(new Wt):re(n);throw a}))}processSegmentAgainstRoute(r,e,n,i,o,s,u,a){return N(n)!==s&&(s===p||!nt(i,o,n))?re(i):n.redirectTo===void 0?this.matchSegmentAgainstRoute(r,i,n,o,s,a):this.allowRedirects&&u?this.expandSegmentAgainstRouteUsingRedirect(r,i,e,n,o,s,a):re(i)}expandSegmentAgainstRouteUsingRedirect(r,e,n,i,o,s,u){let{matched:a,parameters:c,consumedSegments:h,positionalParamSegments:f,remainingSegments:y}=fn(e,i,o);if(!a)return re(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Pi&&(this.allowRedirects=!1));let L=new oe(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Fr(i),N(i),i.component??i._loadedComponent??null,i,qr(i)),R=Ye(L,u,this.paramsInheritanceStrategy);L.params=Object.freeze(R.params),L.data=Object.freeze(R.data);let q=this.applyRedirects.applyRedirectCommands(h,i.redirectTo,f,L,r);return this.applyRedirects.lineralizeSegments(i,q).pipe(O(U=>this.processSegment(r,n,e,U.concat(y),s,!1,u)))}matchSegmentAgainstRoute(r,e,n,i,o,s){let u=Ai(e,n,i,r,this.urlSerializer);return n.path==="**"&&(e.children={}),u.pipe(x(a=>a.matched?(r=n._injector??r,this.getChildConfig(r,n,i).pipe(x(({routes:c})=>{let h=n._loadedInjector??r,{parameters:f,consumedSegments:y,remainingSegments:L}=a,R=new oe(y,f,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Fr(n),N(n),n.component??n._loadedComponent??null,n,qr(n)),q=Ye(R,s,this.paramsInheritanceStrategy);R.params=Object.freeze(q.params),R.data=Object.freeze(q.data);let{segmentGroup:U,slicedSegments:he}=zr(e,y,L,c);if(he.length===0&&U.hasChildren())return this.processChildren(h,c,U,R).pipe(m(xe=>new A(R,xe)));if(c.length===0&&he.length===0)return d(new A(R,[]));let Cn=N(n)===o;return this.processSegment(h,c,U,he,Cn?p:o,!0,R).pipe(m(xe=>new A(R,xe instanceof A?[xe]:[])))}))):re(e)))}getChildConfig(r,e,n){return e.children?d({routes:e.children,injector:r}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):Ri(r,e,n,this.urlSerializer).pipe(O(i=>i?this.configLoader.loadChildren(r,e).pipe(S(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Ii(e))):d({routes:[],injector:r})}};function ji(t){t.sort((r,e)=>r.value.outlet===p?-1:e.value.outlet===p?1:r.value.outlet.localeCompare(e.value.outlet))}function Ni(t){let r=t.value.routeConfig;return r&&r.path===""}function pn(t){let r=[],e=new Set;for(let n of t){if(!Ni(n)){r.push(n);continue}let i=r.find(o=>n.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...n.children),e.add(i)):r.push(n)}for(let n of e){let i=pn(n.children);r.push(new A(n.value,i))}return r.filter(n=>!e.has(n))}function Fr(t){return t.data||{}}function qr(t){return t.resolve||{}}function Li(t,r,e,n,i,o){return O(s=>xi(t,r,e,n,s.extractedUrl,i,o).pipe(m(({state:u,tree:a})=>I(l({},s),{targetSnapshot:u,urlAfterRedirects:a}))))}function $i(t,r){return O(e=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(a=>a.route)),s=new Set;for(let a of o)if(!s.has(a))for(let c of gn(a))s.add(c);let u=0;return T(s).pipe(fe(a=>o.has(a)?ki(a,n,t,r):(a.data=Ye(a,a.parent,t).resolve,d(void 0))),S(()=>u++),lt(1),O(a=>u===s.size?d(e):V))})}function gn(t){let r=t.children.map(e=>gn(e)).flat();return[t,...r]}function ki(t,r,e,n){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!an(i)&&(o[Oe]=i.title),_i(o,t,r,n).pipe(m(s=>(t._resolvedData=s,t.data=Ye(t,t.parent,e).resolve,null)))}function _i(t,r,e,n){let i=bt(t);if(i.length===0)return d({});let o={};return T(i).pipe(O(s=>zi(t[s],r,e,n).pipe(H(),S(u=>{if(u instanceof De)throw Je(new Se,u);o[s]=u}))),lt(1),sr(o),J(s=>hn(s)?V:de(s)))}function zi(t,r,e,n){let i=Ee(r)??n,o=le(t,i),s=o.resolve?o.resolve(r,e):k(i,()=>o(r,e));return W(s)}function Rt(t){return x(r=>{let e=t(r);return e?T(e).pipe(m(()=>r)):d(r)})}var vn=(()=>{class t{buildTitle(e){let n,i=e.root;for(;i!==void 0;)n=this.getResolvedTitleForRoute(i)??n,i=i.children.find(o=>o.outlet===p);return n}getResolvedTitleForRoute(e){return e.data[Oe]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Fi),providedIn:"root"})}return t})(),Fi=(()=>{class t extends vn{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||t)(dt(jr))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yt=new P("",{providedIn:"root",factory:()=>({})}),qi=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Rr({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(n,i){n&1&&Tr(0,"router-outlet")},dependencies:[Zn],encapsulation:2})}return t})();function Xt(t){let r=t.children&&t.children.map(Xt),e=r?I(l({},t),{children:r}):l({},t);return!e.component&&!e.loadComponent&&(r||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=qi),e}var Jt=new P(""),Bi=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=g(vt);loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return d(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let n=W(e.loadComponent()).pipe(m(mn),S(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),je(()=>{this.componentLoaders.delete(e)})),i=new st(n,()=>new B).pipe(ot());return this.componentLoaders.set(e,i),i}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return d({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=Vi(n,this.compiler,e,this.onLoadEndListener).pipe(je(()=>{this.childrenLoaders.delete(n)})),s=new st(o,()=>new B).pipe(ot());return this.childrenLoaders.set(n,s),s}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vi(t,r,e,n){return W(t.loadChildren()).pipe(m(mn),O(i=>i instanceof Cr||Array.isArray(i)?d(i):T(r.compileModuleAsync(i))),m(i=>{n&&n(t);let o,s,u=!1;return Array.isArray(i)?(s=i,u=!0):(o=i.create(e).injector,s=o.get(Jt,[],{optional:!0,self:!0}).flat()),{routes:s.map(Xt),injector:o}}))}function Hi(t){return t&&typeof t=="object"&&"default"in t}function mn(t){return Hi(t)?t.default:t}var er=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Wi),providedIn:"root"})}return t})(),Wi=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Gi=new P("");var Qi=new P(""),Ki=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new B;transitionAbortSubject=new B;configLoader=g(Bi);environmentInjector=g(Ne);urlSerializer=g(Kt);rootContexts=g(tt);location=g(ze);inputBindingEnabled=g(rt,{optional:!0})!==null;titleStrategy=g(vn);options=g(Yt,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=g(er);createViewTransition=g(Gi,{optional:!0});navigationErrorHandler=g(Qi,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>d(void 0);rootComponentType=null;constructor(){let e=i=>this.events.next(new xt(i)),n=i=>this.events.next(new Pt(i));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;this.transitions?.next(I(l(l({},this.transitions.value),e),{id:n}))}setupNavigations(e,n,i){return this.transitions=new M({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:ye,restoredState:null,currentSnapshot:i.snapshot,targetSnapshot:null,currentRouterState:i,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(X(o=>o.id!==0),m(o=>I(l({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),x(o=>{let s=!1,u=!1;return d(o).pipe(x(a=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",D.SupersededByNewNavigation),V;this.currentTransition=o,this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?I(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&h!=="reload"){let f="";return this.events.next(new Z(a.id,this.urlSerializer.serialize(a.rawUrl),f,Mt.IgnoredSameUrlNavigation)),a.resolve(!1),V}if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return d(a).pipe(x(f=>{let y=this.transitions?.getValue();return this.events.next(new we(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),y!==this.transitions?.getValue()?V:Promise.resolve(f)}),Li(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),S(f=>{o.targetSnapshot=f.targetSnapshot,o.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation=I(l({},this.currentNavigation),{finalUrl:f.urlAfterRedirects});let y=new Qe(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(y)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:f,extractedUrl:y,source:L,restoredState:R,extras:q}=a,U=new we(f,this.urlSerializer.serialize(y),L,R);this.events.next(U);let he=on(this.rootComponentType).snapshot;return this.currentTransition=o=I(l({},a),{targetSnapshot:he,urlAfterRedirects:y,extras:I(l({},q),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=y,d(o)}else{let f="";return this.events.next(new Z(a.id,this.urlSerializer.serialize(a.extractedUrl),f,Mt.IgnoredByUrlHandlingStrategy)),a.resolve(!1),V}}),S(a=>{let c=new Tt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),m(a=>(this.currentTransition=o=I(l({},a),{guards:ri(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),o)),fi(this.environmentInjector,a=>this.events.next(a)),S(a=>{if(o.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Je(this.urlSerializer,a.guardsResult);let c=new Ot(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(c)}),X(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",D.GuardRejected),!1)),Rt(a=>{if(a.guards.canActivateChecks.length)return d(a).pipe(S(c=>{let h=new Et(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}),x(c=>{let h=!1;return d(c).pipe($i(this.paramsInheritanceStrategy,this.environmentInjector),S({next:()=>h=!0,complete:()=>{h||this.cancelNavigationTransition(c,"",D.NoDataFromResolver)}}))}),S(c=>{let h=new Ut(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(h)}))}),Rt(a=>{let c=h=>{let f=[];h.routeConfig?.loadComponent&&!h.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(h.routeConfig).pipe(S(y=>{h.component=y}),m(()=>{})));for(let y of h.children)f.push(...c(y));return f};return Pe(c(a.targetSnapshot.root)).pipe(ct(null),ee(1))}),Rt(()=>this.afterPreactivation()),x(()=>{let{currentSnapshot:a,targetSnapshot:c}=o,h=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return h?T(h).pipe(m(()=>o)):d(o)}),m(a=>{let c=Yn(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=o=I(l({},a),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),S(()=>{this.events.next(new Ie)}),ti(this.rootContexts,e.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),ee(1),S({next:a=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new F(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{s=!0}}),lr(this.transitionAbortSubject.pipe(S(a=>{throw a}))),je(()=>{!s&&!u&&this.cancelNavigationTransition(o,"",D.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),J(a=>{if(u=!0,ln(a))this.events.next(new _(o.id,this.urlSerializer.serialize(o.extractedUrl),a.message,a.cancellationCode)),ei(a)?this.events.next(new ue(a.url,a.navigationBehaviorOptions)):o.resolve(!1);else{let c=new be(o.id,this.urlSerializer.serialize(o.extractedUrl),a,o.targetSnapshot??void 0);try{let h=k(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(h instanceof De){let{message:f,cancellationCode:y}=Je(this.urlSerializer,h);this.events.next(new _(o.id,this.urlSerializer.serialize(o.extractedUrl),f,y)),this.events.next(new ue(h.redirectTo,h.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(h){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(h)}}return V}))}))}cancelNavigationTransition(e,n,i){let o=new _(e.id,this.urlSerializer.serialize(e.extractedUrl),n,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==n?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zi(t){return t!==ye}var Yi=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Xi),providedIn:"root"})}return t})(),Qt=class{shouldDetach(r){return!1}store(r,e){}shouldAttach(r){return!1}retrieve(r){return null}shouldReuseRoute(r,e){return r.routeConfig===e.routeConfig}},Xi=(()=>{class t extends Qt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=ft(t)))(i||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:()=>g(Ji),providedIn:"root"})}return t})(),Ji=(()=>{class t extends yn{location=g(ze);urlSerializer=g(Kt);options=g(Yt,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=g(er);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new z;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=on(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type==="popstate"&&e(n.url,n.state)})}handleRouterEvent(e,n){if(e instanceof we)this.stateMemento=this.createStateMemento();else if(e instanceof Z)this.rawUrlTree=n.initialUrl;else if(e instanceof Qe){if(this.urlUpdateStrategy==="eager"&&!n.extras.skipLocationChange){let i=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(n.targetBrowserUrl??i,n)}}else e instanceof Ie?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(n.targetBrowserUrl??this.rawUrlTree,n)):e instanceof _&&(e.code===D.GuardRejected||e.code===D.NoDataFromResolver)?this.restoreHistory(n):e instanceof be?this.restoreHistory(n,!0):e instanceof F&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,n){let i=e instanceof z?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(i)||n.extras.replaceUrl){let o=this.browserPageId,s=l(l({},n.extras.state),this.generateNgRouterState(n.id,o));this.location.replaceState(i,"",s)}else{let o=l(l({},n.extras.state),this.generateNgRouterState(n.id,this.browserPageId+1));this.location.go(i,"",o)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.currentUrlTree===e.finalUrl&&o===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=ft(t)))(i||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ve=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(ve||{});function eo(t,r){t.events.pipe(X(e=>e instanceof F||e instanceof _||e instanceof be||e instanceof Z),m(e=>e instanceof F||e instanceof Z?ve.COMPLETE:(e instanceof _?e.code===D.Redirect||e.code===D.SupersededByNewNavigation:!1)?ve.REDIRECTING:ve.FAILED),X(e=>e!==ve.REDIRECTING),ee(1)).subscribe(()=>{r()})}var to={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ro={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},it=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=g(br);stateManager=g(yn);options=g(Yt,{optional:!0})||{};pendingTasks=g(gr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=g(Ki);urlSerializer=g(Kt);location=g(ze);urlHandlingStrategy=g(er);_events=new B;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=g(Yi);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=g(Jt,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!g(rt,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new tr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let i=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof _&&n.code!==D.Redirect&&n.code!==D.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof F)this.navigated=!0;else if(n instanceof ue){let s=n.navigationBehaviorOptions,u=this.urlHandlingStrategy.merge(n.url,i.currentRawUrl),a=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Zi(i.source)},s);this.scheduleNavigation(u,ye,null,a,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}io(n)&&this._events.next(n)}catch(i){this.navigationTransitions.transitionAbortSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ye,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",n)},0)})}navigateToSyncWithBrowser(e,n,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let a=l({},i);delete a.navigationId,delete a.\u0275routerPageId,Object.keys(a).length!==0&&(o.state=a)}let u=this.parseUrl(e);this.scheduleNavigation(u,n,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Xt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:u,preserveFragment:a}=n,c=a?this.currentUrlTree.fragment:s,h=null;switch(u??this.options.defaultQueryParamsHandling){case"merge":h=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let f;try{let y=i?i.snapshot:this.routerState.snapshot.root;f=en(y)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),f=this.currentUrlTree.root}return tn(f,e,h,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,ye,null,n)}navigate(e,n={skipLocationChange:!1}){return no(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,n){let i;if(n===!0?i=l({},to):n===!1?i=l({},ro):i=n,K(e))return Nr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Nr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((n,[i,o])=>(o!=null&&(n[i]=o),n),{})}scheduleNavigation(e,n,i,o,s){if(this.disposed)return Promise.resolve(!1);let u,a,c;s?(u=s.resolve,a=s.reject,c=s.promise):c=new Promise((f,y)=>{u=f,a=y});let h=this.pendingTasks.add();return eo(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:u,reject:a,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(f=>Promise.reject(f))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function no(t){for(let r=0;r<t.length;r++)if(t[r]==null)throw new w(4008,!1)}function io(t){return!(t instanceof Ie)&&!(t instanceof ue)}var Br=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new B;constructor(e,n,i,o,s,u){this.router=e,this.route=n,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=u;let a=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=a==="a"||a==="area",this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof F&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(K(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,n,i,o,s){let u=this.urlTree;if(u===null||this.isAnchorElement&&(e!==0||n||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let a={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(u,a),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.href=e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e)):null;let n=this.href===null?null:mr(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(e,n){let i=this.renderer,o=this.el.nativeElement;n!==null?i.setAttribute(o,e,n):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:K(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(n){return new(n||t)(j(it),j(Y),fr("tabindex"),j(gt),j(pt),j(mt))};static \u0275dir=$e({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(n,i){n&1&&Or("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),n&2&&Mr("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",_e],skipLocationChange:[2,"skipLocationChange","skipLocationChange",_e],replaceUrl:[2,"replaceUrl","replaceUrl",_e],routerLink:"routerLink"},features:[wr,Le]})}return t})(),Zo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new te;constructor(e,n,i,o,s){this.router=e,this.element=n,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(u=>{u instanceof F&&this.update()})}ngAfterContentInit(){d(this.links.changes,d(null)).pipe(at()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=T(e).pipe(at()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){let n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let n=oo(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,n):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(n){return new(n||t)(j(it),j(pt),j(gt),j(ke),j(Br,8))};static \u0275dir=$e({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(n,i,o){if(n&1&&Er(o,Br,5),n&2){let s;Ur(s=xr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Le]})}return t})();function oo(t){return!!t.paths}var so=new P("");function Yo(t,...r){return dr([{provide:Jt,multi:!0,useValue:t},[],{provide:Y,useFactory:ao,deps:[it]},{provide:Ar,multi:!0,useFactory:co},r.map(e=>e.\u0275providers)])}function ao(t){return t.routerState.root}function uo(t,r){return{\u0275kind:t,\u0275providers:r}}function co(){let t=g(pr);return r=>{let e=t.get(Dr);if(r!==e.components[0])return;let n=t.get(it),i=t.get(lo);t.get(ho)===1&&n.initialNavigation(),t.get(fo,null,ht.Optional)?.setUpPreloading(),t.get(so,null,ht.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var lo=new P("",{factory:()=>new B}),ho=new P("",{providedIn:"root",factory:()=>1});var fo=new P("");function Xo(){return uo(8,[_r,{provide:rt,useExisting:_r}])}export{Y as a,Zn as b,it as c,Br as d,Zo as e,Yo as f,Xo as g};
package/chunk-AKDOPLUE.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-6Z44FGYG.js")},{path:"encryption",loadComponent:()=>import("./chunk-NA2TSIGD.js")},{path:"select-files",loadComponent:()=>import("./chunk-NILIJMJS.js")},{path:"options",loadComponent:()=>import("./chunk-XLGJTP25.js")}],o=t;export{o as default};
package/chunk-BV5HWLOE.js DELETED
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-XZ2Z3I76.js";import{a as Me}from"./chunk-3UJYR3C3.js";import{b as U}from"./chunk-QBFOFC2S.js";import{a as de,b as h,d as M,e as k,h as L,j as fe,l as $,o as y,p as D,r as A}from"./chunk-DGRMASPQ.js";import{b as I}from"./chunk-S4KMY7LU.js";import{a as P,c as d}from"./chunk-7NOLIW3Y.js";import{a as b,g as v,l as Ce,o as Re,p as Ne,q as Pe,r as Ie,w as he}from"./chunk-BNW7MJ4U.js";import{pa as K}from"./chunk-NW7VZHBJ.js";import{Ab as Se,Bb as r,C as ae,Cb as a,Db as l,Eb as X,F as O,Fb as z,Hb as x,J as le,Lc as H,Nb as c,Ob as u,Pb as m,Qa as S,Qb as Fe,Rb as me,T as _e,Tb as T,Ub as B,Xa as p,Z as _,db as N,ea as C,fa as R,gc as Y,jb as W,jc as Ee,p as re,pc as Te,sb as F,ub as pe,uc as ge,w as se,wc as Oe,xb as G,yb as ce,zb as ue}from"./chunk-CFESGUGK.js";var ke=new D,ye=()=>ke.group({passphrase:ke.control("")}),J=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);next(){let t=this.#e.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[{Name:"--no-encryption",Value:"true"}];e&&(o=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let s=i.ID;this.#e.getBackup(s),this.#o.navigate([`/restore-draft/${s}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let t;t=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let o;o=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,o,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",t,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){e&1&&(r(0,"form",3),T("submit",function(){return o.next()}),r(1,"spk-form-field")(2,"label",4),m(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),T("click",function(){return o.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&F("formGroup",o.encryptionForm)},dependencies:[A,L,h,M,k,$,y,Ce,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function be(n,t){n&1&&l(0,"spk-progress-bar",8)}function ve(n,t){if(n&1&&(r(0,"spk-option",14),Y(1),ge(2,"date"),a()),n&2){let e=t.$implicit;F("value",e.Version),S(),Ee("",e.Version,": ",Oe(2,3,e.Time,"medium"),"")}}function we(n,t){if(n&1){let e=x();l(0,"spk-progress-bar",8),r(1,"button",10),T("click",function(){C(e);let i=B(2);return R(i.abortLoading())}),m(2,4),a()}}function Ge(n,t){if(n&1&&(r(0,"app-file-tree",15)(1,"label",16),m(2,5),a(),l(3,"input",17),a()),n&2){let e=B(3);F("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function xe(n,t){if(n&1&&W(0,Ge,4,4,"app-file-tree",15),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Be(n,t){if(n&1&&(r(0,"spk-select",12),l(1,"input",13),ue(2,ve,3,6,"spk-option",14,ce),a(),W(4,we,3,0)(5,xe,1,1)),n&2){let e=B();F("displayFn",e.displayFn())("hideClearButton",!0),S(2),Se(e.versionOptions()),S(2),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()?4:-1),S(),G(e.showFileTree()?5:-1)}}var q=new D,De=()=>q.group({filesToRestore:q.control(""),selectedOption:q.control(null),passphrase:q.control(null)}),Z=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);#n=_(K);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=p(!1);backupSettings=p(null);backupSettingsEffect=H(()=>{let t=this.backupId(),e=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof e!="number"||!t)return;let i=this.versionOptions()?.find(s=>s.Version===e)?.Time??null;i&&(this.showFileTree.set(!1),setTimeout(()=>{let s={id:t+"",time:i};this.backupSettings.set(s),this.getRootPath(s)}))});rootPath=p(void 0);getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1};this.#t.getApiV1BackupByIdFiles(e).pipe(O(()=>{this.showFileTree.set(!0)})).subscribe({next:o=>{let i=o.Files[0].Path;this.rootPath.set(i)}})}isRepairing=p(!1);repairEffect=H(()=>{let t=this.#e.isDraft(),e=this.selectOptionSignal();if(t&&e){let o=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(O(()=>this.isRepairing.set(!1))).subscribe()}});abortLoading(){this.selectFilesForm.controls.selectedOption.setValue(null)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[Te([K])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let s;s=$localize`Cancel`;let w;return w=$localize`Path`,[["formRef",""],t,e,o,s,w,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",6,0),T("submit",function(){return C(i),R(o.next())}),r(2,"h3",7),m(3,1),a(),W(4,be,1,0,"spk-progress-bar",8)(5,Be,6,4),r(6,"div",9)(7,"button",10),T("click",function(){return C(i),R(o.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",11),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(F("formGroup",o.selectFilesForm),S(4),G(o.versionOptionsLoading()?4:5),S(5),Fe(o.isFileRestore()?"Back":"Exit"),me(8))},dependencies:[A,L,h,M,k,$,y,K,j,v,Pe,b,Ie,Re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var f=class n{#t=_(d);#e=_(I);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=De();optionsForm=Ae();encryptionForm=ye();optionsFormSignal=U(this.optionsForm.valueChanges);selectFilesFormSignal=U(this.selectFilesForm.valueChanges);selectOptionSignal=U(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isDraft=p(!1);isFileRestore=p(!1);init(t,e=!1,o=!1){this.backupId.set(t),this.isFileRestore.set(e),this.isDraft.set(o),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(t,!0)}updateTargetUrl(t){this.destinationTargetUrl.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.versionOptions()?.find(s=>s.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:o.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:s=>{console.error("restore error",s)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(t,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t}).pipe(re(12e3),le())]).pipe(ae(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,i])=>{this.versionOptions.set(i),this.backup.set(o),e&&i.length>0&&this.selectFilesForm.controls.selectedOption.setValue(i[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var V=new D,Ae=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ee=class n{#t=_(f);#e=_(d);#o=_(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-options"]],decls:39,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let o;o=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let s;s=$localize`How do you want to handle existing files?`;let w;w=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let g;g=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Permissions`;let oe;oe=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],t,e,o,i,s,w,g,te,oe,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",12,0),T("submit",function(){return C(i),R(o.submit())}),r(2,"h3",13),m(3,1),a(),r(4,"app-toggle-card",14),X(5,15),m(6,2),z(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),Y(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),X(18,15),m(19,5),z(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),X(27,15),m(28,8),z(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),T("click",function(){return C(i),R(o.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;F("formGroup",o.optionsForm),S(4),F("disallowToggle",!0),S(9),F("disabled",((i=o.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),F("disallowToggle",!0),S(19),pe("loader",o.isSubmitting())}},dependencies:[A,L,h,de,fe,M,k,$,y,Me,j,he,Ne,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ae as a,ee as b,ye as c,J as d,De as e,Z as f,f as g};