@duplicati/ngclient 0.0.67 → 0.0.69

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 (61) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-3ENWJFPQ.js +1 -0
  3. package/chunk-3LFQ2CMA.js +6 -0
  4. package/{chunk-J6XRJHJ3.js → chunk-76QDT3DT.js} +1 -1
  5. package/chunk-B6F7BTCY.js +1 -0
  6. package/chunk-BA7KFJXF.js +1 -0
  7. package/chunk-CLWDOASW.js +1 -0
  8. package/chunk-CM2VLNFJ.js +1 -0
  9. package/chunk-CO7Y3BIG.js +6 -0
  10. package/chunk-DOUFB6IZ.js +1 -0
  11. package/chunk-F7726SNN.js +1 -0
  12. package/{chunk-34N3NDDX.js → chunk-FC7IHW5V.js} +1 -1
  13. package/chunk-GZNEVVHC.js +1 -0
  14. package/chunk-H4ZYUOCD.js +1 -0
  15. package/{chunk-GROK2C3O.js → chunk-HVNIDQ3I.js} +1 -1
  16. package/chunk-ICAVTIBO.js +1 -0
  17. package/chunk-IZGVBNDM.js +1 -0
  18. package/chunk-K6NJFA6G.js +1 -0
  19. package/chunk-KMQU3ZBK.js +1 -0
  20. package/chunk-KYCK75MH.js +1 -0
  21. package/chunk-L5E5U6M6.js +1 -0
  22. package/chunk-LULH26OZ.js +1 -0
  23. package/{chunk-WCXAIVYX.js → chunk-M3TDZOXH.js} +1 -1
  24. package/chunk-ME7OGY7M.js +3 -0
  25. package/chunk-N7TLL5YI.js +1 -0
  26. package/chunk-OIRMDOOF.js +1 -0
  27. package/chunk-OTS7WJON.js +1 -0
  28. package/chunk-PU2Q3GL6.js +1 -0
  29. package/chunk-VRLSXAI3.js +1 -0
  30. package/{chunk-55N3Z4WC.js → chunk-VTEOBYNY.js} +1 -1
  31. package/chunk-VX3YYMRB.js +1 -0
  32. package/chunk-XA2AVFI2.js +1 -0
  33. package/chunk-YJYS7OZI.js +1 -0
  34. package/index.html +1 -1
  35. package/main-ZA53CUZQ.js +1 -0
  36. package/package.json +1 -1
  37. package/chunk-47KLTONZ.js +0 -1
  38. package/chunk-4C3R2PTH.js +0 -1
  39. package/chunk-4LKWOYIM.js +0 -1
  40. package/chunk-4N2WKEQR.js +0 -1
  41. package/chunk-4OETIYIQ.js +0 -1
  42. package/chunk-737NFYPO.js +0 -1
  43. package/chunk-CP57LBQ6.js +0 -1
  44. package/chunk-EXAIEGUA.js +0 -1
  45. package/chunk-FDU72LLR.js +0 -1
  46. package/chunk-HLEETTI2.js +0 -1
  47. package/chunk-HWBFYM4U.js +0 -1
  48. package/chunk-I3KS7JEN.js +0 -1
  49. package/chunk-IDRVDCZF.js +0 -1
  50. package/chunk-IJZSE545.js +0 -1
  51. package/chunk-JWZZL2QQ.js +0 -6
  52. package/chunk-KWC4F7OI.js +0 -1
  53. package/chunk-PCWXZ2CU.js +0 -1
  54. package/chunk-PMCSEYJK.js +0 -6
  55. package/chunk-QPLDE6B2.js +0 -1
  56. package/chunk-QZ4DM36I.js +0 -3
  57. package/chunk-RUBPUVDQ.js +0 -1
  58. package/chunk-VFTH7UVW.js +0 -1
  59. package/chunk-WCTVFZUZ.js +0 -1
  60. package/chunk-ZNI74FWA.js +0 -1
  61. package/main-UAJKIVXK.js +0 -1
package/chunk-4OETIYIQ.js DELETED
@@ -1 +0,0 @@
1
- import{a as ke}from"./chunk-GE3T3AG3.js";import{b as ce,d as ue,g as de,i as Se,q as $}from"./chunk-OROSSCXB.js";import{b as C,c as _e}from"./chunk-O2MZ5CAQ.js";import{a as me,b as Te,e as ge,g as fe,i as L,l as Ce,o as Pe,p as Ee,q as Oe,r as Ae}from"./chunk-ZTSITRHY.js";import{a as De}from"./chunk-BSZZLSIX.js";import{pa as pe}from"./chunk-BUARZS4A.js";import{a as he}from"./chunk-O53NVQ2A.js";import{Ab as A,Bb as k,Cb as l,Db as s,Eb as B,G as m,Ib as ie,Kc as N,Mc as W,O as J,Ob as b,Pb as v,Qb as c,Ra as r,Tb as ne,U as Y,Ub as u,Vb as E,Ya as p,_,eb as P,fa as Q,ga as ee,hb as te,hc as g,ic as X,jc as oe,kb as z,kc as ae,l as q,lc as se,mc as h,nc as D,oc as R,q as Z,ra as y,tb as T,vb as S,vc as H,wc as le,xc as re,yb as V,zb as O}from"./chunk-VGQ6X3AL.js";import{a as M,b as I}from"./chunk-C6Q5SG76.js";var G=class o{#e=_(he);transform(e,...t){return this.#e.locale(),this.#e(e).fromNow()}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=te({name:"appRelativeTime",type:o,pure:!0})};function ye(o,e){if(o&1){let t=ie();l(0,"spk-radio",10),u("click",function(){let n=Q(t).$implicit,a=E();return ee(a.pauseOption.set(n.value))}),g(1),s()}if(o&2){let t=e.$implicit,i=E();S("active",i.pauseOption()===t.value),r(),oe(" ",t.label," ")}}var Be=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],x=class o{#e=_(C);pauseOptions=p(Be);closed=y();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let e=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:e}).pipe(m(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=P({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let e;e=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let i;i=$localize`If you pause transfers they could time out and cause retries or failures.`;let n;n=$localize`Cancel`;let a;return a=$localize` Update settings `,[e,t,i,n,a,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,i){t&1&&(l(0,"header",5)(1,"h3"),c(2,0),s()(),l(3,"div",6)(4,"div",7),A(5,ye,2,3,"spk-radio",8,O),s(),l(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return i.pauseTransfers.set(!i.pauseTransfers())}),c(9,1),s(),l(10,"spk-alert",11),c(11,2),s()()(),l(12,"footer",12)(13,"button",13),u("click",function(){return i.closed.emit()}),c(14,3),s(),l(15,"button",14),u("click",function(){return i.submit()}),c(16,4),s()()),t&2&&(r(5),k(i.pauseOptions()),r(3),S("active",i.pauseTransfers()),r(7),S("loader",i.isSubmitting()))},dependencies:[$,Ee,L,Te],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var be={Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,"PurgeFiles_Begin,":$localize`Listing remote files for purge …`,"PurgeFiles_Process,":$localize`Purging files …`,"PurgeFiles_Compact,":$localize`Compacting remote data …`,"PurgeFiles_Complete,":$localize`Purging files complete!`,Error:$localize`Error!`},w=class o{#e=1e3;#t=_(De);#n=_(_e);#_=_(C);#s=_(ke);#i=p(!1);#l=p(!1);#c=p(this.#e);#u=p(null);#r=p(!1);#o=p(!1);#a=p(null);#m=p(!1);statusData=this.#u.asReadonly();serverState=N(()=>{let e=this.#a();return e?(e.ProposedSchedule=e?.ProposedSchedule?.map(t=>{let i=t.Item1?this.#s.getBackupById(t.Item1):null;return I(M({},t),{backup:i})}),e):null});isFetching=this.#l.asReadonly();#p=null;#T=W(()=>{let e=this.#i(),t=this.#c();if(!e||!t||t<this.#e){this.#p&&window.clearInterval(this.#p);return}this.#p=window.setInterval(()=>{this.#S()},t)});start(){this.#r.set(!0),this.#d()}stop(){this.#r.set(!1)}startPollingProgress(){this.#S(),this.#i.set(!0)}stopPollingProgress(){this.#i.set(!1)}setProgressStatePollingInterval(e){if(e<this.#e){console.error(`Polling interval must be at least ${this.#e}ms`);return}this.#c.set(e)}serverStateEffect=W(()=>{if(this.#m()){this.stopPollingProgress();return}!this.#o()&&this.#r()?setTimeout(()=>{this.startPollingProgress(),this.#d()},1e3):this.stopPollingProgress()});calculateProgress(e){let t=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)t=0;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,n=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-i;t=(e.ProcessedFileSize+i)/e.TotalFileSize,e.ProcessedFileCount===0?t=0:t>=.9&&(t=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?t=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?t=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?t=.98:e.Phase==="Backup_Complete"||e.Phase==="Backup_WaitForUpload"?t=1:e.OverallProgress>0&&(t=e.OverallProgress);return t}constructStatusText(e){let t="Running \u2026";if(e.task&&e&&(t=e.Phase?be[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles"))if(e.StillCounting)t=`Counting (${e.TotalFileCount} files found, ${this.#t.transform(e.TotalFileSize)})`;else{let i=e.CurrentFilecomplete?0:e.CurrentFileoffset,n=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-i,d=e.BackendSpeed<0?"":` at ${this.#t.transform(e.BackendSpeed)}/s`;t=`${e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":""}${n} files (${this.#t.transform(a)}) to go ${d}`}return t}#d(){if(this.#o())return;this.#o.set(!0);let e=this.#a()?.LastEventID,t=e==null?{}:{lastEventId:e,longpoll:!0,duration:"299s"};this.#_.getApiV1Serverstate(t).pipe(m(()=>this.#o.set(!1))).subscribe({next:i=>{this.#a()?.LastDataUpdateID!==i.LastDataUpdateID&&this.#s.getBackups(),this.#a.set(i)}})}#S(){this.#l.set(!0),this.#n.getApiV1Progressstate().pipe(J(e=>{let t=e.TaskID??null;return t===null?q(e):this.#_.getApiV1TaskByTaskid({taskid:t}).pipe(Z(i=>I(M({},e),{task:i??null})))}),m(()=>this.#l.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,i=e.BackupID??null;if(t!==null&&i!==null){let n=this.#s.getBackupById(i);e.backup=n}e.task?.Status==="Completed"?this.#i.set(!1):this.#i.set(!0),this.#u.set(I(M({},e),{progress:this.calculateProgress(e),statusText:this.constructStatusText(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))},error:e=>{e.status===404&&this.#i.set(!1)}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=Y({token:o,factory:o.\u0275fac,providedIn:"root"})};function ve(o,e){if(o&1&&(l(0,"spk-option",14),g(1),s()),o&2){let t=e.$implicit;T("value",t),r(),X(t)}}function $e(o,e){if(o&1&&(l(0,"spk-option",14),g(1),s()),o&2){let t=e.$implicit;T("value",t),r(),X(t)}}var Le=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],K={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ne=Object.entries(K).reduce((o,[e,t])=>(o[t]=e,o),{}),F=class o{#e=_(C);closed=y();isSubmitting=p(!1);sizeOptions=p(Le);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("MByte/s");maxDownloadUnit=p("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e?.["max-upload-speed"]?.split(/(\d+)/),i=e?.["max-download-speed"]?.split(/(\d+)/),n=t[1]??"",a=i[1]??"",d=t[2]??"MB",f=i[2]??"MB",Me=n===""?10:parseInt(n),Ie=a===""?10:parseInt(a);console.log(n),this.maxUploadUnit.set(Ne[d]+"/s"),this.maxDownloadUnit.set(Ne[f]+"/s"),this.maxUploadActive.set(n!==""),this.maxDownloadActive.set(a!==""),this.maxUpload.set(Me),this.maxDownload.set(Ie)}})}blockDecimalKeys(e){if([".",","].includes(e.key))return e.preventDefault()}cleanupInputAfterPasting(e){e.preventDefault();let t=e.clipboardData?.getData("text/plain");if(!t)return;let i=t.replaceAll(/[\.,]/g,"");e.target.value=i}submit(){this.isSubmitting.set(!0);let e=this.maxUploadActive()?`${this.maxUpload()}${K[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${K[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":e,"max-download-speed":t}}).pipe(m(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=P({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:30,vars:14,consts:()=>{let e;e=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let i;i=$localize` Max download speed `;let n;n=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let a;a=$localize`Cancel`;let d;return d=$localize` Update settings `,[e,t,i,n,a,d,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"hideClearButton"],["type","text",3,"ngModelChange","ngModel"],[3,"value"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,i){t&1&&(l(0,"header",6)(1,"h3"),c(2,0),s()(),l(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return i.maxUploadActive.set(!i.maxUploadActive())}),c(7,1),s(),l(8,"spk-form-field")(9,"input",11),u("paste",function(a){return i.cleanupInputAfterPasting(a)})("keydown",function(a){return i.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(i.maxUpload,a)||(i.maxUpload=a),a}),s()(),l(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(a){return D(i.maxUploadUnit,a)||(i.maxUploadUnit=a),a}),s(),A(12,ve,2,2,"spk-option",14,O),s()(),l(14,"div",9)(15,"spk-checkbox",10),u("click",function(){return i.maxDownloadActive.set(!i.maxDownloadActive())}),c(16,2),s(),l(17,"spk-form-field")(18,"input",11),u("paste",function(a){return i.cleanupInputAfterPasting(a)})("keydown",function(a){return i.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(i.maxDownload,a)||(i.maxDownload=a),a}),s()(),l(19,"spk-select",12)(20,"input",13),R("ngModelChange",function(a){return D(i.maxDownloadUnit,a)||(i.maxDownloadUnit=a),a}),s(),A(21,$e,2,2,"spk-option",14,O),s()(),l(23,"p"),c(24,3),s()()(),l(25,"footer",15)(26,"button",16),u("click",function(){return i.closed.emit(!1)}),c(27,4),s(),l(28,"button",17),u("click",function(){return i.submit()}),c(29,5),s()()),t&2&&(r(6),S("active",i.maxUploadActive()),r(3),h("ngModel",i.maxUpload),T("disabled",!i.maxUploadActive()),r(),T("hideClearButton",!0),r(),h("ngModel",i.maxUploadUnit),r(),k(i.sizeOptions()),r(3),S("active",i.maxDownloadActive()),r(3),h("ngModel",i.maxDownload),T("disabled",!i.maxDownloadActive()),r(),T("hideClearButton",!0),r(),h("ngModel",i.maxDownloadUnit),r(),k(i.sizeOptions()),r(7),S("loader",i.isSubmitting()))},dependencies:[$,ce,Se,ue,de,Ae,Oe,Ce,L],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ge(o,e){if(o&1&&(l(0,"div"),g(1),s(),B(2,"spk-progress-bar",7)),o&2){let t=E();r(),ae("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),T("value",t.statusData().progress*100)}}function Ue(o,e){if(o&1&&(l(0,"div",4),g(1),H(2,"appRelativeTime"),H(3,"date"),s()),o&2){let t,i=E();r(),se(" ",(t=i.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",le(2,3,i.nextBackup().time)," at ",re(3,5,i.nextBackup().time,"shortTime")," ")}}function xe(o,e){o&1&&(l(0,"div",4),c(1,1),s())}function we(o,e){o&1&&(b(0,0,1),B(1,"spk-icon"),v())}function ze(o,e){o&1&&(b(0,0,2),B(1,"spk-icon"),v())}var Fe=new Date,j=class o{#e=_(C);#t=_(w);#n=_(ge);minsAgo=Fe.setMinutes(Fe.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=N(()=>this.serverState()?.ProgramState==="Running");isResuming=p(!1);nextBackup=N(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(F,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(m(()=>this.isResuming.set(!1))).subscribe()}ngOnInit(){this.#t.start()}ngOnDestroy(){this.#t.stop()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=P({type:o,selectors:[["app-status-bar"]],decls:13,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD*8:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*8:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*9:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*9:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,e=ne(e);let t;return t=$localize`Loading...`,[e,t,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,i){if(t&1&&(l(0,"div",2)(1,"div",3),z(2,Ge,3,3)(3,Ue,4,8,"div",4)(4,xe,2,0,"div",4),s(),l(5,"div",5)(6,"button",6),u("click",function(){return i.pauseResume()}),b(7,0),z(8,we,2,0)(9,ze,2,0),v(),s(),l(10,"button",6),u("click",function(){return i.openThrottleSettingsDialog()}),l(11,"spk-icon"),g(12,"speedometer"),s()()()()),t&2){let n;r(2),V(!((n=i.statusData())==null||n.task==null)&&n.task.Status&&((n=i.statusData())==null||n.task==null?null:n.task.Status)!=="Completed"?2:i.nextBackup().backup||i.nextBackup().time?3:4),r(4),S("loader",i.isResuming()),r(2),V(i.isRunning()?8:9)}},dependencies:[Pe,G,pe,me,fe],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{j as a};
package/chunk-737NFYPO.js DELETED
@@ -1 +0,0 @@
1
- import{a as k}from"./chunk-4OETIYIQ.js";import"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import"./chunk-O2MZ5CAQ.js";import{d as S}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as T,g as M,h as f}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Cb as e,Db as n,Eb as _,Ob as s,Pb as l,Qb as i,Ra as c,eb as D,rc as d,tb as r}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
package/chunk-CP57LBQ6.js DELETED
@@ -1 +0,0 @@
1
- import{a as ke}from"./chunk-4OETIYIQ.js";import{a as Te}from"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import{b as Se}from"./chunk-O2MZ5CAQ.js";import{d as R}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as H,g as b,h as Me,j as Ee,k as ge,n as Fe,o as Ce}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as ce,Bb as re,Cb as o,Db as i,Eb as r,Fb as F,Gb as C,Ib as pe,Ob as s,Pb as u,Qb as p,Ra as c,Rb as se,Sb as ue,Ub as P,Vb as d,_ as I,eb as ie,fa as k,ga as O,hc as S,jc as N,kb as g,qb as _e,rb as ae,rc as D,sc as T,tb as E,vb as A,vc as $,wc as f,xc as de,yb as m,zb as le}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var Oe=()=>[R,b,H,Ee,ge,Fe,import("./chunk-LREVYYY4.js").then(e=>e.DatePipe),import("./chunk-G2NEYTH2.js").then(e=>e.DurationFormatPipe),import("./chunk-34MR2IQN.js").then(e=>e.BytesPipe)],me=()=>["/add-backup"],Pe=()=>["/restore"],Ne=e=>["/backup",e],$e=e=>["/restore",e],fe=e=>["/backup",e,"export"],Ie=e=>["/backup",e,"database"],Ae=e=>["/backup",e,"commandline"],De=e=>["/backup",e,"log"];function Re(e,_){if(e&1&&(S(0," - "),F(1),p(2,21),C(),S(3),$(4,"durationFormat")),e&2){let t=d().$implicit;c(3),N(" ",f(4,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDuration)," ")}}function He(e,_){e&1&&(F(0),p(1,22),C())}function be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.SourceFilesSize)," ")}}function xe(e,_){e&1&&(F(0),p(1,23),C())}function Be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.TargetFilesSize)," ")}}function Le(e,_){e&1&&(F(0),p(1,24),C())}function ye(e,_){if(e&1&&(o(0,"spk-chip",37),p(1,25),i()),e&2){let t=d().$implicit;c(),se(t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount),ue(1)}}function Ge(e,_){e&1&&(o(0,"spk-chip",38),p(1,26),i())}function he(e,_){if(e&1){let t=pe();o(0,"div",36)(1,"div",31)(2,"h3"),S(3),o(4,"spk-icon"),S(5,"database"),i()(),o(6,"p")(7,"span"),p(8,8),i(),S(9),$(10,"date"),g(11,Re,5,3)(12,He,2,0,"ng-container"),i(),o(13,"p")(14,"span"),p(15,9),i(),g(16,be,2,3)(17,xe,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,10),i(),g(21,Be,2,3)(22,Le,2,0,"ng-container"),i()(),g(23,ye,2,1,"spk-chip",37)(24,Ge,2,0,"spk-chip",38),o(25,"div",39)(26,"button",40),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.startBackup(l.Backup==null?null:l.Backup.ID))}),s(27,11),r(28,"spk-icon"),u(),i(),o(29,"button",41)(30,"spk-icon"),S(31,"pencil-simple"),i()(),o(32,"spk-menu",42)(33,"button",32)(34,"spk-icon"),S(35,"dots-three-vertical"),i()(),F(36,43),o(37,"h3",44),S(38,"Operations"),i(),o(39,"button",45,0),s(41,12),r(42,"spk-icon"),u(),i(),o(43,"button",45,0),s(45,13),r(46,"spk-icon"),u(),i(),o(47,"button",46,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.deleteBackup(l.Backup==null?null:l.Backup.ID))}),s(49,14),r(50,"spk-icon"),u(),i(),r(51,"spk-divider"),o(52,"h3",44),S(53,"Advanced"),i(),o(54,"button",45,0),s(56,15),r(57,"spk-icon"),u(),i(),o(58,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(60,16),r(61,"spk-icon"),u(),i(),o(62,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(64,17),r(65,"spk-icon"),u(),i(),o(66,"button",45,0),s(68,18),r(69,"spk-icon"),u(),i(),r(70,"spk-divider"),o(71,"h3",44),S(72,"Reporting"),i(),o(73,"button",45,0),s(75,19),r(76,"spk-icon"),u(),i(),o(77,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(79,20),r(80,"spk-icon"),u(),i(),C(),i()()()}if(e&2){let t,n=_.$implicit,l=d(3);c(3),N(" ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:l.MISSING_BACKUP_NAME," "),c(6),N(" ",de(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,"short")," "),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?11:12),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?16:17),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?21:22),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?23:24),c(3),A("loader",l.startingBackup()),c(3),E("routerLink",T(20,Ne,n.Backup==null?null:n.Backup.ID)),c(3),E("right",!0),c(7),E("routerLink",T(22,$e,n.Backup==null?null:n.Backup.ID)),c(4),E("routerLink",T(24,fe,n.Backup==null?null:n.Backup.ID)),c(4),A("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(26,Ie,n.Backup==null?null:n.Backup.ID)),c(12),E("routerLink",T(28,Ae,n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(30,De,n.Backup==null?null:n.Backup.ID))}}function ve(e,_){if(e&1&&ce(0,he,81,32,"div",36,le),e&2){let t=d(2);re(t.backups())}}function Xe(e,_){e&1&&(F(0),p(1,27),C())}function we(e,_){if(e&1&&g(0,ve,2,0)(1,Xe,2,0,"ng-container"),e&2){let t=d();m(t.backups().length?0:1)}}function ze(e,_){e&1&&(o(0,"div",48),r(1,"spk-progress-bar",49),o(2,"div",31)(3,"h3"),p(4,28),i()()())}var x=class e{#e=I(Te);#n=I(Se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}verifyFiles(_){this.#n.postApiV1BackupByIdVerify({id:_}).subscribe()}compressBackup(_){this.#n.postApiV1BackupByIdCompact({id:_}).subscribe()}createErrorReport(_){this.#n.postApiV1BackupByIdCreatereport({id:_}).subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ie({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let t;t=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let M;M=$localize`Restores allow you to restore your data from the cloud.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;L=$localize`My backups`;let y;y=$localize`Last successful backup:`;let G;G=$localize`Source:`;let h;h=$localize`Destination:`;let v;v=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let X;X=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let w;w=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let z;z=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let K;K=$localize`${"\uFFFD#57\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let V;V=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let j;j=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let q;q=$localize`${"\uFFFD#69\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#69\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let U;U=$localize`${"\uFFFD#76\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let W;W=$localize`${"\uFFFD#80\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#80\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let J;J=$localize`took`;let Q;Q=$localize`N/A`;let Y;Y=$localize`N/A`;let Z;Z=$localize`N/A`;let ee;ee=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let ne;ne=$localize`No version yet`;let te;te=$localize`No backups founds`;let oe;return oe=$localize`Loading backups...`,[["option",""],_,t,n,l,M,B,L,y,G,h,v,X,w,z,K,V,j,q,U,W,J,Q,Y,Z,ee,ne,te,oe,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["menu",""],["title",""],["type","button",3,"routerLink"],[3,"click"],["type","button",3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(r(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",29),r(4,"img",30),o(5,"div",31)(6,"h3"),p(7,1),i(),o(8,"p"),p(9,2),i()(),o(10,"button",32),s(11,3),r(12,"spk-icon"),u(),i()(),o(13,"spk-card",29),r(14,"img",33),o(15,"div",31)(16,"h3"),p(17,4),i(),o(18,"p"),p(19,5),i()(),o(20,"button",32),s(21,6),r(22,"spk-icon"),u(),i()()(),o(23,"div",34)(24,"h2"),p(25,7),i(),o(26,"div",35),g(27,we,2,1)(28,ze,5,0),_e(29,27,Oe,null,28),i()()()),t&2&&(c(3),E("routerLink",D(3,me)),c(10),E("routerLink",D(4,Pe)),c(16),ae(!n.backupsLoading()))},dependencies:[R,ke,Me,b,H,Ce],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};
package/chunk-EXAIEGUA.js DELETED
@@ -1 +0,0 @@
1
- import{U as r,Ya as s,g as a}from"./chunk-VGQ6X3AL.js";var o=class n{#s=s(null);#e=s(!1);#n=window.self!==window.top;relayIsEnabled=this.#e.asReadonly();config=this.#s.asReadonly();configLoaded=this.#n?new a:null;isLoading=s(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.#e.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let i=e.data.replace("access:",""),t=JSON.parse(i);if(!t?.accessToken||!t?.clientId){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.clientId!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.accessToken!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}console.info("postMessage config set"),this.#s.set(t),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#s.set(e)}clearConfig(){this.#s.set(null)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};export{o as a};
package/chunk-FDU72LLR.js DELETED
@@ -1 +0,0 @@
1
- import{b as ae}from"./chunk-N3GBABZB.js";import{a as te}from"./chunk-4OETIYIQ.js";import{a as ee}from"./chunk-GE3T3AG3.js";import{b as j,d as H,g as J,q as Q}from"./chunk-OROSSCXB.js";import{b as W}from"./chunk-O2MZ5CAQ.js";import{a as z,d as q}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as Y,g as Z,l as x}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Cb as i,D as g,Db as a,Eb as l,G as u,Kc as C,Mc as h,O as k,Ob as r,Pb as p,Qb as T,Ra as s,Rb as L,Sb as U,Ub as A,Ya as c,_ as D,eb as y,hc as E,kb as v,mc as w,nc as X,oc as V,q as O,tb as F,vb as P,xb as G,yb as K}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(ee);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintainance`;let d;d=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"warn"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Q,j,H,J,te,Z,x,Y,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
package/chunk-HLEETTI2.js DELETED
@@ -1 +0,0 @@
1
- import{d as a,e as b,f as c}from"./chunk-JWZZL2QQ.js";import"./chunk-5NMYYKKU.js";import"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import"./chunk-N3GBABZB.js";import"./chunk-PD4M6YP7.js";import"./chunk-OROSSCXB.js";import"./chunk-O2MZ5CAQ.js";import"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
package/chunk-HWBFYM4U.js DELETED
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-GE3T3AG3.js";import{a as b,b as $,d as y,e as B,h,l as v,o as G,p as L,r as U}from"./chunk-OROSSCXB.js";import{b as N}from"./chunk-O2MZ5CAQ.js";import{c as E,d as R}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as K,c as w,g as X,l as x,w as V,y as z}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import{Cb as r,Db as n,Eb as l,G as g,Ob as I,Pb as M,Qb as u,Ra as F,Tb as O,Ub as f,Ya as m,_ as p,eb as S,hc as A,kb as D,rc as k,tb as d,vb as C,yb as P}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new L,T=class c{#e=p(w);#t=p(N);#o=p(j);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[U,h,$,b,y,B,v,G,R,z,x,K,X,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
package/chunk-I3KS7JEN.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-PMCSEYJK.js")},{path:"encryption",loadComponent:()=>import("./chunk-J6XRJHJ3.js")},{path:"select-files",loadComponent:()=>import("./chunk-GROK2C3O.js")},{path:"options",loadComponent:()=>import("./chunk-55N3Z4WC.js")}],o=t;export{o as default};
package/chunk-IDRVDCZF.js DELETED
@@ -1 +0,0 @@
1
- import{q as g}from"./chunk-JWZZL2QQ.js";import"./chunk-5NMYYKKU.js";import"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import{b as k}from"./chunk-N3GBABZB.js";import"./chunk-PD4M6YP7.js";import{a as I}from"./chunk-4OETIYIQ.js";import{a as N}from"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import{b as O}from"./chunk-O2MZ5CAQ.js";import{a as P,b as h,d as E,e as B}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{o as $,p as M,t as b}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Cb as s,D as m,Db as p,Eb as n,Mc as A,Ob as d,Pb as c,Ra as r,_ as F,eb as f,kb as C,qc as R,tb as u,tc as _,yb as D}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=F(P);#e=F(g);#a=F(N);#i=F(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(l=>l.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{T as default};
package/chunk-IJZSE545.js DELETED
@@ -1 +0,0 @@
1
- import{a as ye}from"./chunk-B6UDSTOM.js";import{b as ve,c as ee}from"./chunk-N3GBABZB.js";import{a as Ie}from"./chunk-INMFVRL6.js";import{a as fe}from"./chunk-4OETIYIQ.js";import"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import{b as Q}from"./chunk-O2MZ5CAQ.js";import{a as Pe,d as De}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as k,g as Y,k as Re,o as Z,v as Me}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import{a as $e}from"./chunk-BSZZLSIX.js";import{pa as J,sa as H}from"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as P,Bb as D,Cb as t,Db as n,Eb as s,Fb as x,Gb as b,Ib as j,Ob as T,Pb as A,Qb as r,Ra as i,Rb as p,Sb as F,Tb as y,Ub as R,Vb as E,Ya as L,_ as f,eb as I,fa as z,ga as V,hc as u,ic as M,jc as q,kb as O,lc as Ne,q as $,sa as W,tb as v,vb as S,vc as d,wc as c,xc as C,yb as g,zb as N}from"./chunk-VGQ6X3AL.js";import{a as w}from"./chunk-C6Q5SG76.js";function be(o,a){o&1&&s(0,"spk-progress-bar",31)}function Be(o,a){o&1&&s(0,"div",34)}function he(o,a){o&1&&s(0,"div",35)}function Ke(o,a){o&1&&s(0,"div",36)}function Ue(o,a){if(o&1&&u(0),o&2){let e=E().$implicit;q(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function Xe(o,a){if(o&1&&(t(0,"details",45)(1,"summary"),T(2,15),s(3,"spk-icon"),t(4,"div",46),s(5,"spk-icon",39),n(),A(),n(),t(6,"div",47)(7,"p"),r(8,16),d(9,"date"),n(),t(10,"p"),r(11,17),d(12,"date"),n(),t(13,"p"),r(14,18),d(15,"durationFormat"),n(),t(16,"p"),r(17,19),n(),s(18,"spk-divider"),t(19,"p"),r(20,20),n(),t(21,"p"),r(22,21),n()()(),t(23,"details",45)(24,"summary")(25,"spk-icon"),u(26,"file-archive"),n(),u(27," Compression phase "),t(28,"div",46)(29,"spk-icon",39),u(30,"caret-down"),n()()(),t(31,"div",47)(32,"p"),r(33,22),d(34,"date"),n(),t(35,"p"),r(36,23),d(37,"date"),n(),t(38,"p"),r(39,24),d(40,"durationFormat"),n(),s(41,"spk-divider"),t(42,"p"),r(43,25),d(44,"bytes"),n(),t(45,"p"),r(46,26),d(47,"bytes"),n(),t(48,"p"),r(49,27),d(50,"bytes"),n(),s(51,"spk-divider"),t(52,"p"),r(53,28),n(),t(54,"p"),r(55,29),n()()()),o&2){let e=E(2).$implicit;i(9),p(C(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),F(8),i(3),p(C(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),F(11),i(3),p(c(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),F(14),i(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),F(17),i(3),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),F(20),i(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),F(22),i(12),p(C(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),F(33),i(3),p(C(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),F(36),i(3),p(c(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),F(39),i(4),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(c(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),F(43),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(c(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),F(46),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(c(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),F(49),i(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),F(53),i(2),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),F(55)}}function we(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function ze(o,a){if(o&1&&(t(0,"details",45)(1,"summary"),T(2,30),s(3,"spk-icon"),t(4,"div",46),s(5,"spk-icon",39),n(),A(),n(),t(6,"div",47),P(7,we,3,3,"code",null,N),n()()),o&2){let e=E(2).$implicit;i(5),p(e.data.VerificationsActualLength),F(2),i(2),D(e.data.Verifications)}}function Ve(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function We(o,a){o&1&&(t(0,"p"),u(1,"No errors"),n())}function je(o,a){if(o&1&&(t(0,"code"),u(1),d(2,"json"),n()),o&2){let e=a.$implicit;i(),M(c(2,1,e))}}function qe(o,a){if(o&1&&(t(0,"section",40)(1,"app-toggle-card",41),x(2,42),t(3,"h3"),r(4,0),n(),b(),x(5,43),t(6,"p"),r(7,1),d(8,"date"),n(),t(9,"p"),r(10,2),d(11,"date"),n(),t(12,"p"),r(13,3),d(14,"durationFormat"),n(),b(),n(),t(15,"app-toggle-card",41),x(16,42),t(17,"h3"),r(18,4),n(),b(),x(19,43),t(20,"p"),r(21,5),d(22,"bytes"),n(),t(23,"p"),r(24,6),d(25,"bytes"),n(),t(26,"p"),r(27,7),d(28,"bytes"),n(),t(29,"p"),r(30,8),d(31,"bytes"),n(),t(32,"p"),r(33,9),n(),t(34,"p"),r(35,10),n(),t(36,"p"),r(37,11),n(),b(),n(),t(38,"div",44),s(39,"spk-divider"),O(40,Xe,56,39)(41,ze,9,1,"details",45),t(42,"details",45)(43,"summary"),T(44,12),s(45,"spk-icon"),t(46,"div",46),s(47,"spk-icon",39),n(),A(),n(),t(48,"div",47),P(49,Ve,3,3,"code",null,N),n()(),t(51,"details",45)(52,"summary"),T(53,13),s(54,"spk-icon"),t(55,"div",46),s(56,"spk-icon",39),n(),A(),n(),t(57,"div",47),O(58,We,2,0,"p"),P(59,je,3,3,"code",null,N),n()(),s(61,"spk-divider"),t(62,"details")(63,"summary"),T(64,14),s(65,"spk-icon"),t(66,"div",46),s(67,"spk-icon",39),n(),A(),n(),t(68,"code")(69,"button",48),u(70,"Copy"),n(),u(71),d(72,"json"),n()()()()),o&2){let e=E().$implicit;i(),v("disallowToggle",!0),i(7),p(C(8,22,e.data==null?null:e.data.BeginTime,"medium")),F(7),i(3),p(C(11,25,e.data==null?null:e.data.EndTime,"medium")),F(10),i(3),p(c(14,28,e.data==null?null:e.data.Duration)),F(13),i(),v("disallowToggle",!0),i(7),p(e.data==null?null:e.data.ExaminedFiles)(c(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),F(21),i(3),p(e.data==null?null:e.data.OpenedFiles)(c(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),F(24),i(3),p(e.data==null?null:e.data.AddedFiles)(c(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),F(27),i(3),p(e.data==null?null:e.data.ModifiedFiles)(c(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),F(30),i(2),p(e.data==null?null:e.data.DeletedFiles),F(33),i(2),p(e.data==null?null:e.data.TooLargeFiles),F(35),i(2),p(e.data==null?null:e.data.FilesWithError),F(37),i(3),g((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),i(),g((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),i(6),p(e.data==null?null:e.data.WarningsActualLength),F(44),i(2),D(e.data==null?null:e.data.Warnings),i(7),p(e.data==null?null:e.data.ErrorsActualLength),F(53),i(2),g((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),i(),D(e.data==null?null:e.data.Errors),i(12),q(" ",c(72,38,e.data)," ")}}function Je(o,a){if(o&1){let e=j();t(0,"article",32)(1,"header",33),R("click",function(){let m=z(e).$implicit,G=E();return V(G.toggleOpenEntry(m.id))}),O(2,Be,1,0,"div",34)(3,he,1,0,"div",35)(4,Ke,1,0,"div",36),t(5,"h3"),u(6),d(7,"date"),n(),t(8,"p"),u(9),O(10,Ue,1,1),n(),s(11,"div",37),t(12,"div",38)(13,"spk-icon",39),u(14,"caret-down"),n()()(),O(15,qe,73,40,"section",40),n()}if(o&2){let e=a.$implicit,l=E();i(2),g(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),i(4),M(C(7,7,e.timestamp,"medium")),i(3),q(" ",e.data==null?null:e.data.MainOperation," "),i(),g(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),i(3),S("open",e.id===l.openEntry()),i(2),g(e.id===l.openEntry()?15:-1)}}var ne=class o{#e=f(Q);backupId=W.required();openEntry=L(null);pagination=L({offset:0,pagesize:100});resource=ee({request:()=>w({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe($(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let m;m=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let G;G=$localize`Source files`;let oe;oe=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let ae;ae=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let le;le=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let _e;_e=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let re;re=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let se;se=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let pe;pe=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let B;B=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,B=y(B);let h;h=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,h=y(h);let K;K=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,K=y(K);let U;U=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,U=y(U);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let de;de=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ue;ue=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ce;ce=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Te;Te=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let X;return X=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,X=y(X),[a,e,l,m,G,oe,ae,le,_e,re,se,pe,B,h,K,U,Fe,de,ue,ce,ge,Ee,me,Oe,Ce,Le,Te,Ae,Ge,Se,X,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(O(0,be,1,0,"spk-progress-bar",31),P(1,Je,16,10,"article",32,N)),e&2&&(g(l.resource.isLoading()?0:-1),i(),D(l.resource.value()))},dependencies:[ye,Re,Z,Y,k,$e,J,Ie,H],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--warn-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--tertiary-500)}"],changeDetection:0})};function He(o,a){o&1&&s(0,"spk-progress-bar",0)}function Qe(o,a){if(o&1&&(t(0,"section",5)(1,"code"),u(2),d(3,"json"),n()()),o&2){let e=E().$implicit;i(2),M(c(3,1,e.data))}}function Ye(o,a){if(o&1){let e=j();t(0,"article",1)(1,"header",2),R("click",function(){let m=z(e).$implicit,G=E();return V(G.toggleOpenEntry(m.id))}),t(2,"h3"),u(3),d(4,"date"),n(),t(5,"div",3)(6,"spk-icon",4),u(7,"caret-down"),n()()(),O(8,Qe,4,3,"section",5),n()}if(o&2){let e=a.$implicit,l=E();i(3),Ne("",C(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),i(3),S("open",e.id===l.openEntry()),i(2),g(e.id===l.openEntry()?8:-1)}}var te=class o{#e=f(Q);backupId=W.required();openEntry=L(null);pagination=L({offset:0,pagesize:100});resource=ee({request:()=>w({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe($(e=>(console.log(e),e.map((l,m)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null})))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(O(0,He,1,0,"spk-progress-bar",0),P(1,Ye,9,9,"article",1,N)),e&2&&(g(l.resource.isLoading()?0:-1),i(),D(l.resource.value()))},dependencies:[H,Z,k,J],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function Ze(o,a){if(o&1&&s(0,"app-general-log",7),o&2){let e=E();v("backupId",e.backupId())}}function en(o,a){if(o&1&&s(0,"app-remote-log",7),o&2){let e=E();v("backupId",e.backupId())}}var ie=class o{#e=f(Pe);backupId=ve(this.#e.params.pipe($(a=>a.id)));activeTab=L("general");static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["app-log"]],decls:13,vars:6,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;return l=$localize` Destination `,[a,e,l,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"primary"],["tab","",3,"click"],[3,"backupId"]]},template:function(e,l){e&1&&(s(0,"app-status-bar"),t(1,"section")(2,"div",3)(3,"button",4),T(4,0),s(5,"spk-icon"),A(),n()(),t(6,"spk-tabs",5)(7,"button",6),R("click",function(){return l.activeTab.set("general")}),r(8,1),n(),t(9,"button",6),R("click",function(){return l.activeTab.set("destination")}),r(10,2),n()(),O(11,Ze,1,1,"app-general-log",7)(12,en,1,1,"app-remote-log",7),n()),e&2&&(i(7),S("active",l.activeTab()==="general"),i(2),S("active",l.activeTab()==="destination"),i(2),g(l.activeTab()==="general"?11:-1),i(),g(l.activeTab()==="destination"?12:-1))},dependencies:[Me,ne,te,De,fe,k,Y],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0})};export{ie as default};
package/chunk-JWZZL2QQ.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as Qe}from"./chunk-5NMYYKKU.js";import{a as Be}from"./chunk-B6UDSTOM.js";import{a as At,b as Wt}from"./chunk-DNHLTHLR.js";import{b as j}from"./chunk-N3GBABZB.js";import{a as mt}from"./chunk-PD4M6YP7.js";import{a as be,b as ae,c as Ee,d as se,e as ye,f as ut,g as Kt,h as Pe,i as Ge,k as _t,l as Ne,m as Ve,n as zt,o as Ae,p as oe,q as dt,r as Oe}from"./chunk-OROSSCXB.js";import{b as We}from"./chunk-O2MZ5CAQ.js";import{a as De,c as re}from"./chunk-J76HBC5J.js";import{a as le,b as Ft,d as Xt,e as Ht,g as Le,i as gt,l as pe,n as Ct,o as jt,q as ce,r as me,w as Ue,x as qe}from"./chunk-ZTSITRHY.js";import{c as Bt}from"./chunk-NJSJNACP.js";import{ia as ct}from"./chunk-BUARZS4A.js";import{$b as H,Ab as I,B as Pt,Bb as v,Cb as a,Db as r,Eb as u,Fb as q,G as et,Gb as Q,Hb as ze,Ib as k,Kc as B,Mc as pt,Ob as g,Pb as C,Qb as M,Ra as s,Rb as nt,Sb as ot,Tb as Ie,U as Re,Ub as f,Vb as p,Ya as O,Yb as W,Za as fe,_ as $,_b as Y,eb as ne,ec as Se,fa as S,fc as Te,ga as T,gc as he,hc as m,ic as U,jc as V,ka as Rt,kb as d,kc as Nt,l as yt,mc as bt,nc as Gt,oc as Vt,q as Je,ra as tt,rc as Lt,sa as st,sc as Xe,tb as c,tc as Ut,uc as it,vb as xe,yb as F,yc as lt,zb as x}from"./chunk-VGQ6X3AL.js";import{a as N,c as wt}from"./chunk-C6Q5SG76.js";function an(e,n){if(e&1&&(a(0,"p"),m(1),r()),e&2){let t=p();s(),U(t._data().message)}}var sn={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},He=class e{data=st();_data=B(()=>N(N({},sn),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,an,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),f("click",function(){return o.close("cancel")}),m(7),r(),a(8,"button",4),f("click",function(){return o.close("confirm")}),m(9),r()()),t&2&&(s(2),U(o._data().title),s(2),F(o._data().message?4:-1),s(3),U(o._data().cancelText),s(2),U(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 $e=class e{#e=$(We);s3Providers=j(this.getS3Config("Providers"));s3Regions=j(this.getS3Config("Regions"));s3RegionHosts=j(this.getS3Config("RegionHosts"));s3StorageClasses=j(this.getS3Config("StorageClasses"));storjSatellites=j(this.getStorjConfig("Satellites"));storjAuthenticationMethods=j(this.getStorjConfig("AuthenticationMethods"));openstackProviders=j(this.getOpenstackConfig("Providers"));openstackVersions=j(this.getOpenstackConfig("Versions"));gcsLocations=j(this.getGcsConfig("Locations"));gcsStorageClasses=j(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 b(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 G(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 Ot(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],_=i.startsWith("%")?i:"/"+i;return N({destinationType:e,custom:{path:_}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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($e).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($e).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(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($e).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get($e).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=b(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get($e).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get($e).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=G([...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)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},b(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=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},b(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"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([A])=>A!=="use-ssl"),...Object.entries(_)]);return`${e.destinationType}${h?"s":""}://${t+Ke(n)+ue(o)+P}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},b(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($e).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},b(e,n))}}];var qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Tt=class e{generate(n,t=qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var ln=["formRef"];function pn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),U(t.DisplayName)}}function cn(e,n){if(e&1&&u(0,"spk-progress-bar",38),e&2){let t=p(3);xe("warn",t.calculatePasswordStrength()===1)("tertiary",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function mn(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function un(e,n){e&1&&(g(0,7,1),u(1,"spk-icon"),C())}function _n(e,n){e&1&&(g(0,7,2),u(1,"spk-icon"),C())}function dn(e,n){e&1&&(g(0,10,1),u(1,"spk-icon",40),C())}function Fn(e,n){e&1&&(g(0,10,2),u(1,"spk-icon"),C())}function gn(e,n){if(e&1){let t=k();a(0,"button",39),f("click",function(){S(t);let i=p(3);return T(i.copyPassword())}),g(1,10),d(2,dn,2,0)(3,Fn,2,0),C(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Cn(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),g(3,6),u(4,"sup"),C(),r(),u(5,"input",30),r(),d(6,cn,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),u(8,"input",32),d(9,mn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),f("click",function(){S(t);let i=p(2);return T(i.showPassword.set(!i.showPassword()))}),g(12,7),d(13,un,2,0)(14,_n,2,0),C(),r(),a(15,"button",35),f("click",function(){S(t);let i=p(2);return T(i.generatePassword())}),g(16,8),u(17,"spk-icon"),C(),r(),d(18,gn,4,1,"button",36),r(),d(19,Cn,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 Sn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),u(3,"input",26),I(4,pn,2,2,"spk-option",27,x),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 Tn(e,n){if(e&1&&(a(0,"button",22),g(1,12),u(2,"spk-icon"),C(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function hn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),g(2,13),u(3,"spk-icon"),C(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Ze=new oe,Qt=(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,[Wt()]),password:Ze.control(e.password,[At(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:Ze.control(e.repeatPassword,[At(n=>n?.value.encryption!=="",[Ee.required])])}),$t={Key:"",DisplayName:"None"},kt=class e{#e=$(re);#t=$(De);#o=$(Tt);#i=$(_e);#n=$(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=B(()=>{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=[$t,...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,ln,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 P;P=$localize`Encryption`;let A;A=$localize`Password`;let R;R=$localize`Repeat password`;let z;z=$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 K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let 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 y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;return X=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,l,_,P,z,Z,K,J,te,E,y,X,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",R,"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),f("submit",function(){return S(i),T(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),g(6,2),u(7,"sup"),C(),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,Sn,7,2),a(14,"div",20)(15,"button",21),f("click",function(){return S(i),T(o.exit())}),g(16,4),u(17,"spk-icon"),C(),r(),d(18,Tn,3,1,"button",22)(19,hn,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,jt,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 Dn=["formRef"],En=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),yn=e=>({$implicit:e});function Pn(e,n){e&1&&(g(0,4,1),u(1,"spk-icon",16),C())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function An(e,n){e&1&&(a(0,"p",16),M(1,10),r())}function On(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),U(t.name)}}function kn(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",32,2),f("click",function(){let i=S(t).$implicit,l=p();return T(l.addNewOption(i))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function $n(e,n){e&1&&ze(0)}function xn(e,n){if(e&1&&d(0,$n,1,0,"ng-container",33),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",Xe(5,yn,Ut(2,En,o,t)))}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",36)(1,"label",42),m(2),d(3,In,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",42),m(2),d(3,Mn,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Rn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function bn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"link"),r())}function Gn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"textbox"),r())}function Vn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Rn,3,1,"spk-tooltip",43),r(),u(4,"input",44),d(5,bn,2,0,"spk-icon",45)(6,Gn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function Ln(e,n){if(e&1){let t=k();a(0,"span",49),f("click",function(){S(t);let i=p(2).$implicit,l=p();return T(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Un(e,n){e&1&&(a(0,"spk-icon",45),m(1,"password"),r())}function Bn(e,n){if(e&1){let t=k();a(0,"spk-icon",50),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Kn(e,n){if(e&1){let t=k();a(0,"spk-icon",50),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function zn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),r(),u(3,"input",46),d(4,Ln,2,0,"span",47)(5,Un,2,0,"spk-icon",45)(6,Bn,2,0,"spk-icon",48)(7,Kn,2,0,"spk-icon",48),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("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 Xn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Hn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function jn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",42),m(2),d(3,Xn,3,1,"spk-tooltip",43),r(),u(4,"input",51),I(5,Hn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function Wn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function qn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function Qn(e,n){if(e&1&&(a(0,"div",38)(1,"label",42),m(2),d(3,Wn,3,1,"spk-tooltip",43),r(),a(4,"div",52)(5,"spk-form-field"),u(6,"input",53),a(7,"spk-icon",45),m(8,"resize"),r()(),a(9,"spk-select"),u(10,"label")(11,"input",54),I(12,qn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Y("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Yn,3,1,"spk-tooltip",43),r(),u(4,"input",55),a(5,"spk-icon",45),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){if(e&1&&(a(0,"spk-toggle",39)(1,"label",42),m(2),d(3,Jn,3,1,"spk-tooltip",43),r(),u(4,"input",56),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function to(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function no(e,n){e&1&&(a(0,"spk-option",58),m(1,"None"),r()),e&2&&c("value","None")}function oo(e,n){if(e&1&&(a(0,"spk-option",19),m(1),u(2,"spk-checkbox",59),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function io(e,n){if(e&1&&d(0,no,2,1,"spk-option",58)(1,oo,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function ro(e,n){if(e&1&&(a(0,"spk-select",40)(1,"label",42),m(2),d(3,to,3,1,"spk-tooltip",43),r(),u(4,"input",57),I(5,io,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function ao(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function so(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,ao,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function lo(e,n){if(e&1){let t=k();a(0,"div",34),q(1,35),d(2,vn,5,14,"app-file-tree",36)(3,wn,5,10,"app-file-tree",37)(4,Vn,7,10,"spk-form-field")(5,zn,8,11,"spk-form-field")(6,jn,7,9,"spk-select")(7,Qn,14,9,"div",38)(8,Zn,7,9,"spk-form-field")(9,eo,5,9,"spk-toggle",39)(10,ro,7,7,"spk-select",40)(11,so,5,9,"spk-form-field"),Q(),a(12,"button",41),f("click",function(){let i=S(t).$implicit,l=p();return T(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,Yt=["Bytes","KB","MB","GB","TB","PB"],po=[{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"}],co=1024*1024*1024*2,mo=1024*1024*5,Zt=(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({})}),Rr=(e,n)=>Me.group({name:Me.control(e),value:Me.control(n)}),xt=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(Yt);retentionOptions=O(po);volumeSizeSignal=j(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Pt(300))??yt(null));volumeUnitSignal=j(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Pt(300))??yt(null));exceededVolumeSize=B(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Yt.indexOf(t));return o>co||o<mo});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-options"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Dn,5),t&2&&Te()},decls:46,vars:7,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let _;_=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,_=Ie(_);let h;h=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let A;return A=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,_,h,P,A,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",11,0),f("submit",function(){return S(i),T(o.submit())}),a(2,"h3",12),M(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),g(8,4),d(9,Pn,2,0,"spk-icon",16),C(),r(),u(10,"input",17),r(),a(11,"spk-select"),u(12,"input",18),I(13,Nn,2,2,"spk-option",19,x),r()(),d(15,An,2,0,"p",16),a(16,"p"),g(17,5),a(18,"a",20),u(19,"spk-icon",21),r(),C(),r()(),a(20,"spk-select",22)(21,"label",15),M(22,6),r(),u(23,"input",23),I(24,On,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),q(27,25),g(28,7),a(29,"spk-menu")(30,"button",26),u(31,"spk-icon"),r(),q(32,27),I(33,kn,3,1,"button",28,x),Q(),r(),C(),Q(),I(35,xn,1,7,"ng-container",null,x),r(),d(37,lo,15,2,"ng-template",null,1,lt),a(39,"div",29)(40,"button",30),f("click",function(){return S(i),T(o.goBack())}),g(41,8),u(42,"spk-icon"),C(),r(),a(43,"button",31),g(44,9),u(45,"spk-icon"),C(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),xe("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}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var uo=["formRef"];function _o(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),U(t.label)}}function Fo(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),f("focus",function(){S(t);let i=he(5);return T(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),f("focus",function(){S(t);let i=he(11);return T(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),q(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,_o,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),q(25,40),M(26,10),Q(),a(27,"div",41)(28,"spk-toggle",21),g(29,11),u(30,"input",42),C(),r(),a(31,"spk-toggle",21),g(32,12),u(33,"input",43),C(),r(),a(34,"spk-toggle",21),g(35,13),u(36,"input",44),C(),r(),a(37,"spk-toggle",21),g(38,14),u(39,"input",45),C(),r(),a(40,"spk-toggle",21),g(41,15),u(42,"input",46),C(),r(),a(43,"spk-toggle",21),g(44,16),u(45,"input",47),C(),r(),a(46,"spk-toggle",21),g(47,17),u(48,"input",48),C(),r()()(),Q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new oe,Jt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],en=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),It=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,uo,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 P;P=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let K;K=$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,P,A,R,z,Z,K,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),f("submit",function(){return S(i),T(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),g(6,4),u(7,"input",22),C(),r(),a(8,"p"),M(9,5),r()(),d(10,Fo,49,2),a(11,"div",23)(12,"button",24),f("click",function(){return S(i),T(o.goBack())}),g(13,6),u(14,"spk-icon"),C(),r(),a(15,"button",25),g(16,7),u(17,"spk-icon"),C(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,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 go(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),U(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(),U(t.key)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),f("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r(),I(2,Co,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function So(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),f("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function To(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),f("ngModelChange",function(i){S(t);let l=p();return T(l.updateStateType(i))}),r(),I(2,go,2,2,"spk-option",2,x),r(),d(4,fo,4,3,"spk-select",0)(5,So,2,1,"spk-form-field"),a(6,"div",3),f("click",function(){S(t);let i=p();return T(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],ho=[{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(tn);fileGroupOptions=O(ho);pathState=O(null);typeState=B(()=>{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=tn.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,To,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[dt,ae,se,Kt,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 Do=["formRef"];function Eo(e,n){if(e&1){let t=k();a(0,"app-filter",42),f("pathChange",function(i){let l=S(t).$index,_=p(2);return T(_.patchPathAt(i,l))})("remove",function(){let i=S(t).$index,l=p(2);return T(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function yo(e,n){if(e&1&&I(0,Eo,1,1,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Po(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function No(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,Po,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var we=new oe,Ao=["Bytes","KB","MB","GB","TB","PB"],nn=(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)})})}),vt=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=B(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(Ao);pathSignal=j(this.sourceDataForm.controls.path.valueChanges);pathArray=B(()=>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,Do,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 P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let A;A=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let R;R=$localize`Source Data`;let z;z=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let K;K=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let X;X=$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,P,A,R,z,Z,K,J,te,E,y,X,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),f("submit",function(){return S(i),T(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),f("click",function(){return S(i),T(o.goBack())}),g(11,3),u(12,"spk-icon"),C(),r(),a(13,"button",25),g(14,4),u(15,"spk-icon"),C(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),q(20,28),M(21,6),Q(),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),f("click",function(){return S(i),T(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),q(31,28),M(32,8),Q(),a(33,"p",29),M(34,9),r(),a(35,"button",33),f("click",function(){return S(i),T(o.addFilter())}),M(36,10),r(),d(37,yo,2,0),r(),a(38,"app-toggle-card",34),q(39,28),M(40,11),Q(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),g(44,13),u(45,"input",36),C(),r(),a(46,"spk-toggle",35),g(47,14),u(48,"input",37),C(),r(),a(49,"spk-toggle",35),g(50,15),u(51,"input",38),C(),r(),a(52,"spk-toggle",39),f("click",function(){return S(i),T(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,No,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),xe("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=$(re);#t=$(mt);#o=$(We);#i=$(ft);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=B(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=B(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=B(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=j(this.sourceDataForm.valueChanges);destinationFormSignal=j(this.destinationForm.valueChanges);generalFormSignal=j(this.generalForm.valueChanges);encryptionFieldSignal=j(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=j(this.scheduleForm.valueChanges);destinationOptions=B(()=>this.#t.backendModules()??[]);httpOptions=B(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=B(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=B(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[$t,...n]});nonSelectedOptions=B(()=>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(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,_=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:_&&h?{size:parseInt(h),unit:_.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?Ot(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Ot(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 P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([K,J])=>J).map(([K,J])=>K):[],A=i.path?.split("\0")??[],R=this.mapFormsToSettings(),z=Object.entries(i.excludes??{}).filter(([K,J])=>J&&K!=="filesLargerThan").map(([K])=>K),Z=i.excludes?.filesLargerThan;return z.length&&R.push({Name:"--exclude-files-attributes",Value:z.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&R.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:_[0]??null,Sources:A.filter(K=>!K.startsWith("-")),Settings:R,Filters:A.filter(K=>K.startsWith("-")).map((K,J)=>({Order:J,Include:!1,Expression:K.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},_=Object.entries(t.advancedOptions??{}).filter(([h,P])=>h&&P).map(([h,P])=>{let A=n.find(R=>R.name===h);return A?.type==="Size"?{Name:h,Value:`${P.size}${P.unit.toLowerCase()}`}:A?.type==="Integer"?{Name:h,Value:P.toString()}:A?.type==="Boolean"?{Name:h,Value:P.toString()}:{Name:h,Value:P}});return[...i,l,..._]}#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 P=i&&i.oauthField?i.oauthField:null,A=i&&i.customFields?i.customFields:{},R=i&&i.dynamicFields?i.dynamicFields:[],z=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let K=Fe.group({}),J=Fe.group({}),te=Fe.group({});A&&Object.entries(A).forEach(([E,y],X)=>{let ge=y,{formElement:w}=ge,ie=wt(ge,["formElement"]);K.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(N({order:900+X},ie)),de))});for(let E=0;E<_.Options.length;E++){let y=_.Options[E];if(y.Deprecated)continue;let X=R.find(w=>w===y.Name||w.name===y.Name);if(X){let w=X&&typeof X!="string",ie=w?X?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=w?N(N({},ge),X):ge,at=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,at),this.destinationFormPair.update(je=>(je.dynamic.push(de),je))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=z.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,at={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},je=ge?N(N({},at),ie):at;o&&de&&(this.createFormField(te,je,L),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 y=h[E],X=t?.advanced[y.name],w=X??y.defaultValue;o&&X&&(this.createFormField(te,y,w),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,X)=>y.order-X.order),dynamic:E.dynamic.sort((y,X)=>y.order-X.order),advanced:E.advanced.sort((y,X)=>y.order-X.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:K,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 Oo=["formRef"],ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Et=e=>({$implicit:e}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),xo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Io=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),vo=()=>({maxWidth:"700px",width:"100%"});function Mo(e,n){e&1&&(g(0,2,2),u(1,"spk-icon"),C())}function wo(e,n){e&1&&M(0,2,3)}function Ro(e,n){if(e&1){let t=k();g(0,2,1),a(1,"button",18),f("click",function(){S(t);let i=p();return T(i.testDestination())}),d(2,Mo,2,0)(3,wo,1,0),r(),C()}if(e&2){let t=p();s(),xe("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function bo(e,n){if(e&1){let t=k();a(0,"p",24),f("click",function(){S(t);let i=p();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,5),u(2,"span",25),C(),r()}}function Go(e,n){if(e&1){let t=k();a(0,"div",30),f("click",function(){let i=S(t).$implicit,l=p(2);return T(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),U(t.displayName),s(2),U(t.description)}}function Vo(e,n){if(e&1){let t=k();a(0,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),V(" ",t.displayName," ")}}function Lo(e,n){if(e&1&&(a(0,"div",26),I(1,Go,5,2,"div",27,x),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),q(6,17),I(7,Vo,2,1,"button",29,x),Q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function Uo(e,n){e&1&&ze(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,ko,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}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,$o,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){let t=k();g(0,7,1),a(1,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addAdvancedFormPair(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function Ho(e,n){e&1&&ze(0)}function jo(e,n){if(e&1&&d(0,Ho,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,xo,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Wo(e,n){if(e&1){let t=k();g(0,8,1),a(1,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addHttpOption(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function qo(e,n){e&1&&ze(0)}function Qo(e,n){if(e&1&&d(0,qo,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,Io,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,Yo,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(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){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(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}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 ni(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function oi(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function ii(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function ri(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",49),d(5,ni,2,0,"spk-icon",50)(6,oi,2,0,"spk-icon",50)(7,ii,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("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 ai(e,n){if(e&1){let t=k();a(0,"span",54),f("click",function(){S(t);let i=p(2).$implicit,l=p(2);return T(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function si(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function li(e,n){if(e&1){let t=k();a(0,"spk-icon",55),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function pi(e,n){if(e&1){let t=k();a(0,"spk-icon",55),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function ci(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),u(3,"input",51),d(4,ai,2,0,"span",52)(5,si,2,0,"spk-icon",50)(6,li,2,0,"spk-icon",53)(7,pi,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("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 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(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function _i(e,n){if(e&1&&I(0,ui,2,3,"spk-option",56,x),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(),U(t)}}function Fi(e,n){if(e&1&&I(0,di,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function gi(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,mi,3,1,"spk-tooltip",47),r(),u(4,"input",48),d(5,_i,2,0)(6,Fi,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("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.value),s(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Si(e,n){if(e&1&&I(0,fi,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function Ti(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function hi(e,n){if(e&1&&I(0,Ti,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Di(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,Ci,3,1,"spk-tooltip",47),r(),u(4,"input",57),d(5,Si,2,0)(6,hi,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Ei(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 yi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function Pi(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,Ei,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,yi,2,2,"spk-option",56,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ai(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Ni,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(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function Oi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Oi,3,1,"spk-tooltip",47),r(),u(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function $i(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){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function Ii(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(),V(" ",t," ")}}function vi(e,n){if(e&1&&d(0,xi,2,1,"spk-option",64)(1,Ii,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Mi(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,$i,3,1,"spk-tooltip",47),r(),u(4,"input",63),I(5,vi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function wi(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 Ri(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,wi,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function bi(e,n){if(e&1){let t=k();a(0,"button",66),f("click",function(){S(t);let i=p().$implicit,l=p(2);return T(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Gi(e,n){if(e&1&&(a(0,"div",37),q(1,38),d(2,Zo,5,16,"app-file-tree",39)(3,ei,5,12,"app-file-tree",40)(4,ri,8,13,"spk-form-field")(5,ci,8,13,"spk-form-field")(6,gi,7,14,"spk-select",41)(7,Di,7,14,"spk-select",42)(8,Pi,14,11,"div",43)(9,Ai,7,11,"spk-form-field")(10,ki,5,11,"spk-toggle",44)(11,Mi,7,8,"spk-select",45)(12,Ri,5,11,"spk-form-field"),Q(),d(13,bi,3,0,"button",28),r()),e&2){let t=n.$implicit;xe("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&&(q(0,19)(1,32),I(2,Bo,1,9,"ng-container",null,x),I(4,zo,1,9,"ng-container",null,x),a(6,"app-toggle-card",33),q(7,34),g(8,7),a(9,"spk-menu")(10,"button",35),u(11,"spk-icon"),r(),q(12,17),I(13,Xo,2,1,"button",29,x),Q(),r(),C(),Q(),I(15,jo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",33),q(18,34),g(19,8),a(20,"spk-menu")(21,"button",35),u(22,"spk-icon"),r(),q(23,17),I(24,Wo,2,1,"button",29,x),Q(),r(),C(),Q(),I(26,Qo,1,9,"ng-container",null,x),r(),d(28,Gi,14,5,"ng-template",null,1,lt),Q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function Li(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),Vt("isOpenChange",function(i){S(t);let l=p();return Gt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),T(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),f("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),f("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!0))}),g(13,11),u(14,"spk-icon"),C(),r()()()}if(e&2){let t=p();bt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,vo)),s(8),c("formControl",t.targetUrlCtrl)}}var Ui=["Bytes","KB","MB","GB","TB","PB"],Dt=new oe,on=(e={destinations:[]})=>Dt.group({destinations:Dt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Dt.group({destinationType:Dt.control(e),custom:n,dynamic:t,advanced:o}),Mt=class e{#e=$(re);#t=$(De);#o=$(Bt);#i=$(We);#n=$(_e);#r=$(Ht);injector=$(Rt);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=B(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(Ui);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=B(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=B(()=>{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=B(()=>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:P=>{P&&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:P=>{P&&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",P=>{console.log("event blur",P)}),h?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(et(()=>this.#a.set(!1))).subscribe({next:A=>{console.log("res",A),A?.authid&&this.#p.set(A.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Oo,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 P;P=$localize`Edit target URL`;let A;A=$localize` Be careful, this will overwrite everything you have in your destination. `;let R;return R=$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,P,A,R,[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),f("submit",function(){return S(i),T(o.next())}),a(2,"header")(3,"h3",13),g(4,2),a(5,"div",14),d(6,Ro,4,3,"button",15),a(7,"spk-menu")(8,"button",16),u(9,"spk-icon"),r(),q(10,17),a(11,"button",18),f("click",function(){return S(i),T(o.openTargetUrlDialog())}),u(12,"spk-icon"),r(),Q(),r()(),C(),r(),d(13,bo,3,0,"p"),r(),d(14,Lo,9,0)(15,Vi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),f("click",function(){return S(i),T(o.goBack())}),g(18,3),u(19,"spk-icon"),C(),r(),a(20,"button",22),g(21,4),u(22,"spk-icon"),C(),r()()(),d(23,Li,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,zt,ct,pe,me,Ct,gt,ce,le,Ue,qe,Xt,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,on as d,rn as e,Mt as f,Qt as g,$t as h,kt as i,Zt as j,Rr as k,xt as l,en as m,It as n,nn as o,vt as p,_e as q};
package/chunk-KWC4F7OI.js DELETED
@@ -1 +0,0 @@
1
- import{a as R,b as te}from"./chunk-DNHLTHLR.js";import{b as oe}from"./chunk-N3GBABZB.js";import{a as ee}from"./chunk-GE3T3AG3.js";import{a as G,b as L,c as S,d as K,e as U,h as z,l as j,o as V,p as q,r as H}from"./chunk-OROSSCXB.js";import{b as v}from"./chunk-O2MZ5CAQ.js";import{a as b,c as w,d as B}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as Q,f as W,g as J,l as Y,w as Z}from"./chunk-ZTSITRHY.js";import{c as h}from"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import{Cb as r,Db as n,Eb as a,G as E,Kc as O,O as M,Ob as l,Pb as c,Qb as f,Ra as s,Ub as P,Ya as g,_,eb as I,hc as k,kb as x,kc as y,rc as X,tb as C,vb as T,yb as D}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new q,N=class d{#o=_(v);#e=_(b);#t=_(w);#n=_(h);#i=_(ee);isExporting=g(!1);exportType=g("file");exportedCmd=g(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,te()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=oe(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#o.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=t=>{let o=Object.entries(t);return o?"?"+o.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let t=this.activeBackup()?.Backup?.Name??"Backup",o=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${t}.${o}`),this.#t.navigate(["/"])},error:e=>{console.log("err",e)}}):this.#o.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{console.log("res",e),this.exportedCmd.set(e.Command??null)},error:e=>{console.log("err",e)}})}downloadFile(e,i){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=i,o.click(),window.URL.revokeObjectURL(t)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,t,o,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,t){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return t.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return t.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return t.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let o;s(4),C("routerLink",X(11,ne)),s(3),T("loading",t.isExporting()),s(4),y("#",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.ID,": ",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.Name,""),s(),C("formGroup",t.exportForm),s(2),T("active",t.exportType()==="cmd"),s(3),T("active",t.exportType()==="file"),s(9),D(t.encryptionFieldSignal()?26:-1)}},dependencies:[H,z,L,G,K,U,j,V,B,W,Z,Q,Y,J],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{N as default};
package/chunk-PCWXZ2CU.js DELETED
@@ -1 +0,0 @@
1
- import{g as a,h as b,i as c}from"./chunk-JWZZL2QQ.js";import"./chunk-5NMYYKKU.js";import"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import"./chunk-N3GBABZB.js";import"./chunk-PD4M6YP7.js";import"./chunk-OROSSCXB.js";import"./chunk-O2MZ5CAQ.js";import"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};