@duplicati/ngclient 0.0.60 → 0.0.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/{chunk-WNGVUHIX.js → chunk-2HC23GJF.js} +1 -1
  2. package/{chunk-JQUPEFDH.js → chunk-2T3PBPBO.js} +1 -1
  3. package/chunk-34MR2IQN.js +1 -0
  4. package/{chunk-OKMKAFJO.js → chunk-3CXGKNYN.js} +1 -1
  5. package/chunk-47KLTONZ.js +1 -0
  6. package/chunk-4C3R2PTH.js +1 -0
  7. package/{chunk-FW56L7EH.js → chunk-4MGFY2JV.js} +1 -1
  8. package/chunk-55N3Z4WC.js +1 -0
  9. package/{chunk-XZ2Z3I76.js → chunk-5NMYYKKU.js} +1 -1
  10. package/{chunk-SGBX6SKP.js → chunk-7R4NNENA.js} +1 -1
  11. package/{chunk-VMEJ2INK.js → chunk-7YT4Y7C3.js} +1 -1
  12. package/{chunk-23D2KKGK.js → chunk-AX4MPJ65.js} +1 -1
  13. package/{chunk-3UJYR3C3.js → chunk-B6UDSTOM.js} +1 -1
  14. package/{chunk-KBOYFSOY.js → chunk-BSZZLSIX.js} +1 -1
  15. package/{chunk-NW7VZHBJ.js → chunk-BUARZS4A.js} +1 -1
  16. package/{chunk-HVNWOC2L.js → chunk-EQS5S7RI.js} +1 -1
  17. package/{chunk-JNHK2HQC.js → chunk-EXAIEGUA.js} +1 -1
  18. package/{chunk-HQ5RBM4W.js → chunk-FCXKPHH2.js} +1 -1
  19. package/chunk-G2NEYTH2.js +1 -0
  20. package/{chunk-CPSIM3A5.js → chunk-GE3T3AG3.js} +1 -1
  21. package/chunk-GROK2C3O.js +1 -0
  22. package/{chunk-4IQIYT3R.js → chunk-GRR3LTVK.js} +1 -1
  23. package/chunk-HLEETTI2.js +1 -0
  24. package/{chunk-FQKYQMUA.js → chunk-HSJMMQHL.js} +1 -1
  25. package/{chunk-F76JBXBH.js → chunk-HWBFYM4U.js} +1 -1
  26. package/chunk-I3KS7JEN.js +1 -0
  27. package/{chunk-XG3VY7EY.js → chunk-IHYJHBCC.js} +1 -1
  28. package/{chunk-ETMZA3IQ.js → chunk-INMFVRL6.js} +1 -1
  29. package/{chunk-T7HBYYKH.js → chunk-IQDBKRQV.js} +1 -1
  30. package/chunk-J6XRJHJ3.js +1 -0
  31. package/chunk-J76HBC5J.js +1 -0
  32. package/chunk-JWZZL2QQ.js +6 -0
  33. package/{chunk-EB76BK3U.js → chunk-KBC4N47O.js} +1 -1
  34. package/chunk-KWC4F7OI.js +1 -0
  35. package/{chunk-YZWMWYPX.js → chunk-L7W4ZJTP.js} +1 -1
  36. package/{chunk-3YZ3SEGY.js → chunk-LREVYYY4.js} +1 -1
  37. package/{chunk-XCGZAJSF.js → chunk-M27H5SJL.js} +1 -1
  38. package/chunk-MSK2MH2K.js +1 -0
  39. package/{chunk-DSHXBMXU.js → chunk-MYCIO3QE.js} +1 -1
  40. package/{chunk-QBFOFC2S.js → chunk-N3GBABZB.js} +1 -1
  41. package/{chunk-RMEEJUB4.js → chunk-N4NGBPMJ.js} +1 -1
  42. package/{chunk-HYRUU7RC.js → chunk-NJSJNACP.js} +1 -1
  43. package/{chunk-S4KMY7LU.js → chunk-O2MZ5CAQ.js} +1 -1
  44. package/{chunk-VPWPYB3Z.js → chunk-O53NVQ2A.js} +1 -1
  45. package/{chunk-GCHBD6DX.js → chunk-OIV6DYWR.js} +1 -1
  46. package/{chunk-DGRMASPQ.js → chunk-OROSSCXB.js} +1 -1
  47. package/chunk-PCWXZ2CU.js +1 -0
  48. package/{chunk-IQHACOOA.js → chunk-PD4M6YP7.js} +1 -1
  49. package/{chunk-W4Z2WCQT.js → chunk-PIVMNQL6.js} +1 -1
  50. package/{chunk-RT7TPOOL.js → chunk-PMCSEYJK.js} +1 -1
  51. package/chunk-QPLDE6B2.js +1 -0
  52. package/{chunk-WLAPUWZH.js → chunk-SANIFXXF.js} +1 -1
  53. package/{chunk-7BFB2JZ7.js → chunk-TSQCXGD7.js} +1 -1
  54. package/{chunk-VHPPFUTX.js → chunk-U2NGUTAO.js} +1 -1
  55. package/{chunk-CFESGUGK.js → chunk-VGQ6X3AL.js} +6 -6
  56. package/chunk-WCXAIVYX.js +1 -0
  57. package/{chunk-SQBOV6A2.js → chunk-YT3L2PHL.js} +1 -1
  58. package/chunk-ZNI74FWA.js +1 -0
  59. package/{chunk-BNW7MJ4U.js → chunk-ZTSITRHY.js} +1 -1
  60. package/chunk-ZUGIRXAF.js +1 -0
  61. package/index.html +1 -1
  62. package/main-OAVKSP2O.js +1 -0
  63. package/package.json +1 -1
  64. package/chunk-4YJMUITD.js +0 -1
  65. package/chunk-6FMUWDFQ.js +0 -1
  66. package/chunk-7CHRY23V.js +0 -6
  67. package/chunk-7EROSQ6G.js +0 -1
  68. package/chunk-7NOLIW3Y.js +0 -1
  69. package/chunk-CVWBR254.js +0 -1
  70. package/chunk-D352OHOH.js +0 -1
  71. package/chunk-E2E7PU5Q.js +0 -1
  72. package/chunk-EHTLINLH.js +0 -1
  73. package/chunk-I4RJTDW5.js +0 -1
  74. package/chunk-MAMM4M4D.js +0 -1
  75. package/chunk-NROZTSQC.js +0 -1
  76. package/chunk-PQEMNH5E.js +0 -1
  77. package/chunk-S52BCEO2.js +0 -1
  78. package/chunk-V6A4XGAP.js +0 -1
  79. package/chunk-W572RMSD.js +0 -1
  80. package/chunk-XRV2G4UG.js +0 -1
  81. package/chunk-Z6E2ZOXY.js +0 -1
  82. package/main-7MZWF3BX.js +0 -1
package/chunk-I4RJTDW5.js DELETED
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-XZ2Z3I76.js";import{a as Me}from"./chunk-3UJYR3C3.js";import{b as U}from"./chunk-QBFOFC2S.js";import{a as de,b as h,d as M,e as k,h as L,j as fe,l as $,o as y,p as D,r as A}from"./chunk-DGRMASPQ.js";import{b as I}from"./chunk-S4KMY7LU.js";import{a as P,c as d}from"./chunk-7NOLIW3Y.js";import{a as b,g as v,l as Ce,o as Re,p as Ne,q as Pe,r as Ie,w as he}from"./chunk-BNW7MJ4U.js";import{pa as K}from"./chunk-NW7VZHBJ.js";import{Ab as Se,Bb as r,C as ae,Cb as a,Db as l,Eb as X,F as O,Fb as z,Hb as x,J as le,Lc as H,Nb as c,Ob as u,Pb as m,Qa as S,Qb as Fe,Rb as me,T as _e,Tb as T,Ub as B,Xa as p,Z as _,db as N,ea as C,fa as R,gc as Y,jb as V,jc as Ee,p as re,pc as Te,sb as F,ub as pe,uc as ge,w as se,wc as Oe,xb as G,yb as ce,zb as ue}from"./chunk-CFESGUGK.js";var ke=new D,ye=()=>ke.group({passphrase:ke.control("")}),J=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);next(){let t=this.#e.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[{Name:"--no-encryption",Value:"true"}];e&&(o=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let s=i.ID;this.#e.getBackup(s),this.#o.navigate([`/restore-draft/${s}`])},error:i=>{console.error(i)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let t;t=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let o;o=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;return i=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,o,i,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",t,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){e&1&&(r(0,"form",3),T("submit",function(){return o.next()}),r(1,"spk-form-field")(2,"label",4),m(3,0),a(),l(4,"input",5),a(),r(5,"div",6)(6,"button",7),T("click",function(){return o.back()}),c(7,1),l(8,"spk-icon"),u(),a(),r(9,"button",8),c(10,2),l(11,"spk-icon"),u(),a()()()),e&2&&F("formGroup",o.encryptionForm)},dependencies:[A,L,h,M,k,$,y,Ce,b,v],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function be(n,t){n&1&&l(0,"spk-progress-bar",8)}function ve(n,t){if(n&1&&(r(0,"spk-option",14),Y(1),ge(2,"date"),a()),n&2){let e=t.$implicit;F("value",e.Version),S(),Ee("",e.Version,": ",Oe(2,3,e.Time,"medium"),"")}}function we(n,t){if(n&1){let e=x();l(0,"spk-progress-bar",8),r(1,"button",10),T("click",function(){C(e);let i=B(2);return R(i.abortLoading())}),m(2,4),a()}}function Ge(n,t){if(n&1&&(r(0,"app-file-tree",15)(1,"label",16),m(2,5),a(),l(3,"input",17),a()),n&2){let e=B(3);F("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function xe(n,t){if(n&1&&V(0,Ge,4,4,"app-file-tree",15),n&2){let e=B(2);G((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Be(n,t){if(n&1&&(r(0,"spk-select",12),l(1,"input",13),ue(2,ve,3,6,"spk-option",14,ce),a(),V(4,we,3,0)(5,xe,1,1)),n&2){let e=B();F("displayFn",e.displayFn())("hideClearButton",!0),S(2),Se(e.versionOptions()),S(2),G(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?4:-1),S(),G(e.showFileTree()?5:-1)}}var q=new D,De=()=>q.group({filesToRestore:q.control(""),selectedOption:q.control(null),passphrase:q.control(null)}),Z=class n{#t=_(I);#e=_(f);#o=_(d);#i=_(P);#n=_(K);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=p(!1);backupSettings=p(null);backupSettingsEffect=H(()=>{let t=this.backupId(),e=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof e!="number"||!t)return;let i=this.versionOptions()?.find(s=>s.Version===e)?.Time??null;i&&(this.showFileTree.set(!1),setTimeout(()=>{let s={id:t+"",time:i};this.backupSettings.set(s),this.getRootPath(s)}))});rootPath=p(void 0);loadingRootPath=p(!1);getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1};this.loadingRootPath.set(!0),this.#t.getApiV1BackupByIdFiles(e).pipe(O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let i=o.Files[0].Path;this.rootPath.set(i)}})}isRepairing=p(!1);repairEffect=H(()=>{let t=this.#e.isDraft(),e=this.selectOptionSignal();if(t&&e){let o=this.backupId();this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:new Date().toISOString()}}).pipe(O(()=>this.isRepairing.set(!1))).subscribe()}});abortLoading(){this.selectFilesForm.controls.selectedOption.setValue(null)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-select-files"]],features:[Te([K])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize`Select an option...`;let s;s=$localize`Cancel`;let w;return w=$localize`Path`,[["formRef",""],t,e,o,s,w,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"displayFn","hideClearButton"],["type","text","placeholder",i,"formControlName","selectedOption"],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",6,0),T("submit",function(){return C(i),R(o.next())}),r(2,"h3",7),m(3,1),a(),V(4,be,1,0,"spk-progress-bar",8)(5,Be,6,4),r(6,"div",9)(7,"button",10),T("click",function(){return C(i),R(o.back())}),c(8,2),l(9,"spk-icon"),u(),a(),r(10,"button",11),c(11,3),l(12,"spk-icon"),u(),a()()()}e&2&&(F("formGroup",o.selectFilesForm),S(4),G(o.versionOptionsLoading()?4:5),S(5),Fe(o.isFileRestore()?"Back":"Exit"),me(8))},dependencies:[A,L,h,M,k,$,y,K,j,v,Pe,b,Ie,Re],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var f=class n{#t=_(d);#e=_(I);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=De();optionsForm=Ae();encryptionForm=ye();optionsFormSignal=U(this.optionsForm.valueChanges);selectFilesFormSignal=U(this.selectFilesForm.valueChanges);selectOptionSignal=U(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isDraft=p(!1);isFileRestore=p(!1);init(t,e=!1,o=!1){this.backupId.set(t),this.isFileRestore.set(e),this.isDraft.set(o),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(t,!0)}updateTargetUrl(t){this.destinationTargetUrl.set(t)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.versionOptions()?.find(s=>s.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:o.passphrase??null,time:i?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:()=>this.exit(),error:s=>{console.error("restore error",s)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}getBackup(t,e=!1){this.versionOptionsLoading.set(!0),se([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t}).pipe(re(12e3),le())]).pipe(ae(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,i])=>{this.versionOptions.set(i),this.backup.set(o)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var W=new D,Ae=()=>W.group({restoreFrom:W.control("orignal"),restoreFromPath:W.control(""),handleExisting:W.control("overwrite"),permissions:W.control(!1)}),ee=class n{#t=_(f);#e=_(d);#o=_(P);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=N({type:n,selectors:[["app-options"]],decls:39,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files from?`;let o;o=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let i;i=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let s;s=$localize`How do you want to handle existing files?`;let w;w=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let g;g=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Permissions`;let oe;oe=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let ne;return ne=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],t,e,o,i,s,w,g,te,oe,ie,ne,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,o){if(e&1){let i=x();r(0,"form",12,0),T("submit",function(){return C(i),R(o.submit())}),r(2,"h3",13),m(3,1),a(),r(4,"app-toggle-card",14),X(5,15),m(6,2),z(),r(7,"spk-radio",16),c(8,3),l(9,"input",17),u(),a(),r(10,"spk-radio",16),c(11,4),l(12,"input",18),u(),a(),r(13,"app-file-tree",19)(14,"label",20),Y(15,"Path"),a(),l(16,"input",21),a()(),r(17,"app-toggle-card",14),X(18,15),m(19,5),z(),r(20,"spk-radio",16),c(21,6),l(22,"input",22),u(),a(),r(23,"spk-radio",16),c(24,7),l(25,"input",23),u(),a()(),r(26,"app-toggle-card"),X(27,15),m(28,8),z(),r(29,"spk-toggle",24),c(30,9),l(31,"input",25),u(),a()(),r(32,"div",26)(33,"button",27),T("click",function(){return C(i),R(o.goBack())}),c(34,10),l(35,"spk-icon"),u(),a(),r(36,"button",28),c(37,11),l(38,"spk-icon"),u(),a()()()}if(e&2){let i;F("formGroup",o.optionsForm),S(4),F("disallowToggle",!0),S(9),F("disabled",((i=o.optionsFormSignal())==null?null:i.restoreFrom)!=="pickLocation"),S(4),F("disallowToggle",!0),S(19),pe("loader",o.isSubmitting())}},dependencies:[A,L,h,de,fe,M,k,$,y,Me,j,he,Ne,v,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ae as a,ee as b,ye as c,J as d,De as e,Z as f,f as g};
package/chunk-MAMM4M4D.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var t=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-RT7TPOOL.js")},{path:"encryption",loadComponent:()=>import("./chunk-Z6E2ZOXY.js")},{path:"select-files",loadComponent:()=>import("./chunk-W572RMSD.js")},{path:"options",loadComponent:()=>import("./chunk-CVWBR254.js")}],o=t;export{o as default};
package/chunk-NROZTSQC.js DELETED
@@ -1 +0,0 @@
1
- import{a as R,b as te}from"./chunk-DNHLTHLR.js";import{b as oe}from"./chunk-QBFOFC2S.js";import{a as ee}from"./chunk-CPSIM3A5.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-DGRMASPQ.js";import{b as v}from"./chunk-S4KMY7LU.js";import{a as b,c as w,d as B}from"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import{a as Q,f as W,g as J,l as Y,w as Z}from"./chunk-BNW7MJ4U.js";import{c as h}from"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import{Bb as r,Cb as n,Db as a,F as E,Jc as O,N as M,Nb as l,Ob as c,Pb as f,Qa as s,Tb as P,Xa as g,Z as _,db as I,gc as k,jb as x,jc as y,qc as X,sb as C,ub as T,xb as D}from"./chunk-CFESGUGK.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-PQEMNH5E.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-ETMZA3IQ.js";import"./chunk-VPWPYB3Z.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{a as DurationFormatPipe};
package/chunk-S52BCEO2.js DELETED
@@ -1 +0,0 @@
1
- import{j as a,k as b,l as c}from"./chunk-7CHRY23V.js";import"./chunk-XZ2Z3I76.js";import"./chunk-3UJYR3C3.js";import"./chunk-DNHLTHLR.js";import"./chunk-QBFOFC2S.js";import"./chunk-IQHACOOA.js";import"./chunk-DGRMASPQ.js";import"./chunk-S4KMY7LU.js";import"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{b as createAdvancedOption,a as createOptionsForm,c as default};
package/chunk-V6A4XGAP.js DELETED
@@ -1 +0,0 @@
1
- import{g as a,h as b,i as c}from"./chunk-7CHRY23V.js";import"./chunk-XZ2Z3I76.js";import"./chunk-3UJYR3C3.js";import"./chunk-DNHLTHLR.js";import"./chunk-QBFOFC2S.js";import"./chunk-IQHACOOA.js";import"./chunk-DGRMASPQ.js";import"./chunk-S4KMY7LU.js";import"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
package/chunk-W572RMSD.js DELETED
@@ -1 +0,0 @@
1
- import{e as a,f as b}from"./chunk-I4RJTDW5.js";import"./chunk-XZ2Z3I76.js";import"./chunk-3UJYR3C3.js";import"./chunk-QBFOFC2S.js";import"./chunk-IQHACOOA.js";import"./chunk-DGRMASPQ.js";import"./chunk-S4KMY7LU.js";import"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreSelectFilesForm,b as default};
package/chunk-XRV2G4UG.js DELETED
@@ -1 +0,0 @@
1
- import{d as a,e as b,f as c}from"./chunk-7CHRY23V.js";import"./chunk-XZ2Z3I76.js";import"./chunk-3UJYR3C3.js";import"./chunk-DNHLTHLR.js";import"./chunk-QBFOFC2S.js";import"./chunk-IQHACOOA.js";import"./chunk-DGRMASPQ.js";import"./chunk-S4KMY7LU.js";import"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
package/chunk-Z6E2ZOXY.js DELETED
@@ -1 +0,0 @@
1
- import{c as a,d as b}from"./chunk-I4RJTDW5.js";import"./chunk-XZ2Z3I76.js";import"./chunk-3UJYR3C3.js";import"./chunk-QBFOFC2S.js";import"./chunk-IQHACOOA.js";import"./chunk-DGRMASPQ.js";import"./chunk-S4KMY7LU.js";import"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-NW7VZHBJ.js";import"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};
package/main-7MZWF3BX.js DELETED
@@ -1 +0,0 @@
1
- import{b as re,c as se}from"./chunk-XCGZAJSF.js";import{a as O}from"./chunk-IQHACOOA.js";import{a as te}from"./chunk-SQBOV6A2.js";import{a as y}from"./chunk-JNHK2HQC.js";import{a as g}from"./chunk-W4Z2WCQT.js";import{d as Y}from"./chunk-S4KMY7LU.js";import{b as q,c as X,f as Z,g as Q}from"./chunk-7NOLIW3Y.js";import{a as _}from"./chunk-7EROSQ6G.js";import{c as ee}from"./chunk-BNW7MJ4U.js";import{a as G,b as K,d as $,e as z,f as B}from"./chunk-HYRUU7RC.js";import{a as ne}from"./chunk-KBOYFSOY.js";import{ua as J}from"./chunk-NW7VZHBJ.js";import{b as oe}from"./chunk-VPWPYB3Z.js";import{Ac as W,Bc as F,Db as U,F as C,L,Lc as D,N as S,P as V,T as R,W as j,Xa as l,Z as s,d as x,db as H,ja as P,m as A,y as E,z as k}from"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";var w=class o{#o=s(g);#s=s(y);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=H({type:o,selectors:[["app-root"]],decls:1,vars:0,template:function(e,r){e&1&&U(0,"router-outlet")},dependencies:[q],encapsulation:2})};var ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var d=new j("ENVIRONMENT");var I=class o{#o=s(Y);isLoaded=l(!1);webmodules=l(null);preload(t=!1){let e=this.#o.getApiV1Webmodules().pipe(V(r=>this.webmodules.set(r)),C(()=>this.isLoaded.set(!0)));if(t)return e;e.subscribe()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})};var ue=()=>{let o=s(y),t=s(P),e=[t.get(O).preload(!0),t.get(O).preloadFilterGroups(!0),t.get(I).preload(!0)];return o.configLoaded===null?E(e):o.configLoaded?.pipe(S(()=>E(e)))},pe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-23D2KKGK.js")},{path:"logout",loadComponent:()=>import("./chunk-FW56L7EH.js")},{path:"",canActivate:[ue],loadComponent:()=>import("./chunk-FQKYQMUA.js"),children:[{path:"",loadComponent:()=>import("./chunk-YZWMWYPX.js")},{path:"add-backup",loadComponent:()=>import("./chunk-GCHBD6DX.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-NROZTSQC.js")},{path:"backup/import",loadComponent:()=>import("./chunk-F76JBXBH.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-SGBX6SKP.js"),loadChildren:()=>import("./chunk-D352OHOH.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-SGBX6SKP.js"),loadChildren:()=>import("./chunk-D352OHOH.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-RMEEJUB4.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-WLAPUWZH.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-JQUPEFDH.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-HQ5RBM4W.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-T7HBYYKH.js")},{path:"from-config",loadComponent:()=>import("./chunk-EB76BK3U.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-HVNWOC2L.js"),loadChildren:()=>import("./chunk-MAMM4M4D.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-HVNWOC2L.js"),loadChildren:()=>import("./chunk-MAMM4M4D.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-HVNWOC2L.js"),loadChildren:()=>import("./chunk-MAMM4M4D.js")},{path:"settings",loadComponent:()=>import("./chunk-DSHXBMXU.js")},{path:"about",loadComponent:()=>import("./chunk-VHPPFUTX.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-7BFB2JZ7.js")},{path:"changelog",loadComponent:()=>import("./chunk-VMEJ2INK.js")},{path:"libraries",loadComponent:()=>import("./chunk-4IQIYT3R.js")},{path:"system-info",loadComponent:()=>import("./chunk-OKMKAFJO.js")},{path:"logs",loadComponent:()=>import("./chunk-WNGVUHIX.js")}]}]}]}];var T=null,ce=(o,t)=>{let e=s(te),r=s(X),c=s(g),i=s(d),u=s(ee),n=c.getItem("locale"),p=re(n),h=o;if(e.token()&&o.url.startsWith(i.baseUrl)){let a=o.headers.set("Authorization",`Bearer ${e.token()}`);n&&n!=="en-US"&&(a=a.set("X-Ui-Language",p)),h=o.clone({headers:a})}return t(h).pipe(k(a=>{if(u.error(a.message),a.status===401&&!T&&(T=e.refreshToken().pipe(L())),a.status===401)return T.pipe(S(()=>t(o.clone({headers:o.headers.set("Authorization",`Bearer ${e.token()}`)}))),k(f=>(r.navigate(["/logout"]),A(()=>f))),C(()=>T=null));let m=`Error Code: ${a.status}, Message: ${a.message}`;return A(()=>({error:a,message:m}))}))};var he="1.0.0",le="portal-proxy-client",fe=1,M=class o{#o=1e3;#s=s(d);#t=l("disconnected");#l=l(this.#o);#i=l(!1);#n=l(!1);#a=l(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=D(()=>{let t=this.#i(),e=this.#l(),r=this.#a();if(!r||!t||!e||e<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(r)},e)});utf8Atob(t){let e=Uint8Array.from(atob(t),c=>c.charCodeAt(0)),r=this.#m.decode(e);return r?JSON.parse(r):null}connectToMachineServer(t,e){let r=e?.reconnect??!1;this.#e&&this.wsState()==="authenticated"&&!r||(this.#e&&this.wsState()!=="authenticated"&&this.#e.close(),this.#e=new WebSocket(this.#s.machineServerUrl),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(t),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=c=>{let i=JSON.parse(c.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let n={token:t,publicKey:"",clientVersion:he,protocolVersion:fe},p=this.createResponse(i,"authportal",n);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let n=this.#p.pop();n&&this.#r[n.messageId]&&this.activateCommand(n)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let n=this.#r[i.messageId];if(n){if(i.errorMessage){n.reject(i.errorMessage);return}else{let p=JSON.parse(i.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),n.resolve(p)}delete this.#r[i.messageId],window.clearTimeout(n.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(t,e,r){let c={from:le,to:t.from,type:e,messageId:t.messageId,payload:JSON.stringify(r)};return JSON.stringify(c)}sendCommand(t,e,r,c,i,u,n=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((p,h)=>{let a=crypto.randomUUID(),f={from:le,to:e,type:"command",messageId:a,payload:JSON.stringify({method:r,path:c,body:i,headers:u})},b={resolve:p,reject:h,timer:window.setTimeout(()=>{let v=this.#r[a];v&&(delete this.#r[a],v.reject("Timeout"))},n)};this.#r[a]=b,this.#n()?this.activateCommand(f):this.#p.push(f)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})};function ge(o){if(typeof o!="string")return null;let e=new TextEncoder().encode(o);return window.btoa(String.fromCharCode(...e))}var me=(o,t)=>{let r=s(y).config(),c=s(d);if(r===null)return t(o);let i=s(M),u=ge(o.body),n={};o.headers.keys().forEach(m=>{n[m]=o.headers.get(m)??""});let p=o.headers.get("timeout"),h=p!==null?parseInt(p):c.defaultTimeout,a=i.sendCommand(r.accessToken,r.clientId,o.method,o.url,u,n,h);return new x(m=>{a.then(f=>{let b=new G;n!=null&&Object.keys(n).forEach(N=>{b.set(N,n[N])});let v=new K({body:f.body,status:f.code,statusText:"OK",headers:b});m.next(v),m.complete()})})};var de={providers:[W(),Z(pe,Q()),$(B(),z([me,ce])),g,{provide:d,useValue:ae},{provide:F,useValue:se()},oe,J,ne]};_(w,de);