@duplicati/ngclient 0.0.138 → 0.0.140

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.
@@ -1 +1 @@
1
- import{a as le}from"./chunk-N57J64DN.js";import{a as se,b as ae}from"./chunk-2G6TVFPZ.js";import{h as ie}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{c as Z,e as J,i as ee,k as ne,s as te,t as oe}from"./chunk-NSIELNIY.js";import{b as V,d as q}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as g,Eb as M,Hc as k,Kb as S,Lb as O,Mb as r,Oc as W,Qa as p,Qb as I,Rb as c,Z as C,Zb as x,_b as G,ab as K,bc as U,da as P,ea as f,jc as u,kc as d,lc as m,na as v,sb as N,sc as X,tb as F,xb as T,yb as t,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,l){s&1&&(S(0,1,1),g(1,"spk-icon",20),O())}function ce(s,l){s&1&&(t(0,"p",21),r(1,6),i())}function ue(s,l){s&1&&(t(0,"p"),r(1,7),i())}function de(s,l){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,a)||(o.optionsFields.backupRetentionTime=a),f(a)}),t(3,"label",30),r(4,9),i()()}if(s&2){let n=c();p(2),T("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,l){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,a)||(o.optionsFields.backupRetentionVersions=a),f(a)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,l){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,l){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,a)||(o.optionsFields.backupRetentionCustom=a),f(a)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Te=["Bytes","KB","MB","GB","TB","PB"],ge=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(ie);#n=C(q);#t=C(V);formRef=W.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=v(ge);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let l=this.sizeSplit().value,n=this.sizeSplit().unit;if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,Te.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&x(e.formRef,_e,5),n&2&&G()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$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#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[l,n,e,a,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),g(12,"spk-icon",23),i(),O(),i()(),t(13,"spk-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),g(26,"spk-icon"),O(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),g(29,"spk-icon"),O(),i()()()),n&2&&(p(4),T("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),T("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),T("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",X(15,re)),p(5),U("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,le,H,Y,j,se,ae,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
1
+ import{a as le}from"./chunk-N57J64DN.js";import{a as se,b as ae}from"./chunk-2G6TVFPZ.js";import{h as ie}from"./chunk-ZAFFTZSE.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{c as Z,e as J,i as ee,k as ne,s as te,t as oe}from"./chunk-NSIELNIY.js";import{b as V,d as q}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as g,Eb as M,Hc as k,Kb as S,Lb as O,Mb as r,Oc as W,Qa as p,Qb as I,Rb as c,Z as C,Zb as x,_b as G,ab as K,bc as U,da as P,ea as f,jc as u,kc as d,lc as m,na as v,sb as N,sc as X,tb as F,xb as T,yb as t,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,l){s&1&&(S(0,1,1),g(1,"spk-icon",20),O())}function ce(s,l){s&1&&(t(0,"p",21),r(1,6),i())}function ue(s,l){s&1&&(t(0,"p"),r(1,7),i())}function de(s,l){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,a)||(o.optionsFields.backupRetentionTime=a),f(a)}),t(3,"label",30),r(4,9),i()()}if(s&2){let n=c();p(2),T("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,l){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,a)||(o.optionsFields.backupRetentionVersions=a),f(a)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,l){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,l){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,a)||(o.optionsFields.backupRetentionCustom=a),f(a)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Te=["Bytes","KB","MB","GB","TB","PB"],ge=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(ie);#n=C(q);#t=C(V);formRef=W.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=v(ge);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let l=this.sizeSplit().value,n=this.sizeSplit().unit;if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,Te.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&x(e.formRef,_e,5),n&2&&G()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$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#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[l,n,e,a,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),g(12,"spk-icon",23),i(),O(),i()(),t(13,"spk-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),g(26,"spk-icon"),O(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),g(29,"spk-icon"),O(),i()()()),n&2&&(p(4),T("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),T("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),T("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",X(15,re)),p(5),U("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,le,H,Y,j,se,ae,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
@@ -1,3 +1,3 @@
1
- import{a as Ee}from"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as fe}from"./chunk-XIOHRQ3X.js";import{h as P}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import{a as Se}from"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as O}from"./chunk-LDIZ5E5Z.js";import{a as le}from"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as se,e as me,f as de,j as pe,n as _e,o as ce,p as ue,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as q,d as Z,e as J}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-Y5IRBMLB.js";import{g as ae,h as re}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as r,Bb as A,Cb as T,Eb as v,Ic as H,Kb as N,Lb as M,Mb as c,Nb as G,Ob as U,Qa as m,Qb as x,Rb as f,Z as _,ab as $,bc as K,da as S,ea as E,jc as w,kc as X,lc as z,na as F,qc as V,rc as W,sb as h,sc as j,tb as b,ub as B,vb as R,wb as y,xb as C,yb as a,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(l,t){l&1&&r(0,"spk-progress-bar",12)}function Te(l,t){if(l&1&&(a(0,"spk-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),C("id",V("filter-",s))("formControl",e)}}function Oe(l,t){if(l&1){let e=v();a(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"spk-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"spk-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"spk-divider"),c(14,4),n(),a(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"spk-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),c(26,7),T(),A(27,27),R(28,Te,2,3,"spk-form-field",null,B),T(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(i){S(e);let u=f();return X(u.settings,i)||(u.settings=i),E(i)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let i=f();return E(i.submit())}),N(36,9),r(37,"spk-icon"),M(),n()()}if(l&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),w("options",e.settings),C("hasFreeTextSettings",!0),m(2),K("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],k=class l{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=O(this.#o.params);commandOptions=O(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
1
+ import{a as Ee}from"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as fe}from"./chunk-XIOHRQ3X.js";import{h as P}from"./chunk-ZAFFTZSE.js";import"./chunk-WZNH4JPF.js";import{a as Se}from"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as O}from"./chunk-LDIZ5E5Z.js";import{a as le}from"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as se,e as me,f as de,j as pe,n as _e,o as ce,p as ue,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as q,d as Z,e as J}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-Y5IRBMLB.js";import{g as ae,h as re}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as r,Bb as A,Cb as T,Eb as v,Ic as H,Kb as N,Lb as M,Mb as c,Nb as G,Ob as U,Qa as m,Qb as x,Rb as f,Z as _,ab as $,bc as K,da as S,ea as E,jc as w,kc as X,lc as z,na as F,qc as V,rc as W,sb as h,sc as j,tb as b,ub as B,vb as R,wb as y,xb as C,yb as a,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(l,t){l&1&&r(0,"spk-progress-bar",12)}function Te(l,t){if(l&1&&(a(0,"spk-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),C("id",V("filter-",s))("formControl",e)}}function Oe(l,t){if(l&1){let e=v();a(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"spk-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"spk-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"spk-divider"),c(14,4),n(),a(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"spk-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),c(26,7),T(),A(27,27),R(28,Te,2,3,"spk-form-field",null,B),T(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(i){S(e);let u=f();return X(u.settings,i)||(u.settings=i),E(i)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let i=f();return E(i.submit())}),N(36,9),r(37,"spk-icon"),M(),n()()}if(l&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),w("options",e.settings),C("hasFreeTextSettings",!0),m(2),K("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],k=class l{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=O(this.#o.params);commandOptions=O(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
2
2
  `).filter(o=>o.length>0)??[],i=this.standardFields.value,u=i.filters??[],g=[t.command,e,...s,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...u.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=$({type:l,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let g;g=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let D;D=$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#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,i,u,g,o,I,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),N(4,0),r(5,"spk-icon"),M(),n()(),h(6,Ae,1,0,"spk-progress-bar",12)(7,Oe,38,11),n()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[Ne,pe,se,me,de,fe,Ee,Se,Me,_e,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{k as default};
@@ -1,2 +1,2 @@
1
- import{a as V}from"./chunk-32366MQR.js";import{a as A,n as R,x as F}from"./chunk-Y5IRBMLB.js";import{la as N}from"./chunk-CWLTHXVS.js";import{Ab as P,Eb as k,Ic as x,Mb as m,Nc as C,Qa as l,Qb as w,Rb as r,Z as E,ab as h,ac as G,bc as v,da as O,ea as I,ec as s,fc as L,gc as d,na as M,sb as p,tb as g,ub as u,vb as S,wb as f,wc as y,xb as T,yb as o,yc as $,zb as i}from"./chunk-BTMXQPBB.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function D(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,D,2,1,"li",null,u),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function z(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,X,2,1,"li",null,u),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Message))}}function W(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"spk-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),p(13,U,4,0,"code"),p(14,z,4,0,"code"),i()()),n&2){let e=r().$implicit;l(4),d("ID: ",e.ID),l(2),d("Type: ",e.Type),l(2),d("Tag: ",e.Tag),l(2),d("TaskID: ",e.TaskID),l(2),d("MessageID: ",e.MessageID),l(),g(e.Exception?13:-1),l(),g(e.Message?14:-1)}}function j(n,t){if(n&1){let e=k();o(0,"tr",10),w("click",function(){let _=O(e).$index,c=r(2);return I(c.toggleRow(_))}),o(1,"td"),s(2),y(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"spk-icon"),s(9,"caret-down"),i()()()(),p(10,W,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,_=r(2);l(2),L($(3,5,e.When,"MMM dd. hh:mm")),l(3),L(_.subStringMessage(e.Message)),l(2),v("rotated-icon",a===_.openRowIndex()),l(3),g(a===_.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"spk-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),P(6,"th",8),i(),S(7,j,11,8,null,null,u),o(9,"div",9),m(10,3),i()()),n&2){let e=r();G("grid-template-columns","auto 1fr auto"),v("type-b",e.asSimpleList()),T("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var b=class n{#e=E(V);whenFilter=C();backupIdFilter=C();asSimpleList=C();polling=C();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=x(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=M(null);whenEffect=x(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=x(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
2
- `):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=h({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&v("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let _;return _=$localize`No data available`,[t,e,a,_,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["table-header",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["spk-button","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&p(0,B,2,0,"div",4)(1,H,11,6,"spk-table",5),e&2&&g(a.logLevel()==="Disabled"?0:1)},dependencies:[F,A,R,N],styles:["[_nghost-%COMP%]{display:block}.simple-list[_nghost-%COMP%] spk-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-2);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{b as a};
1
+ import{a as V}from"./chunk-32366MQR.js";import{a as A,n as R,x as F}from"./chunk-Y5IRBMLB.js";import{la as N}from"./chunk-CWLTHXVS.js";import{Ab as P,Eb as k,Ic as x,Mb as m,Nc as C,Qa as l,Qb as w,Rb as r,Z as E,ab as M,ac as G,bc as v,da as O,ea as I,ec as s,fc as L,gc as d,na as h,sb as p,tb as g,ub as u,vb as S,wb as f,wc as y,xb as T,yb as o,yc as $,zb as i}from"./chunk-BTMXQPBB.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function D(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,D,2,1,"li",null,u),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function z(n,t){if(n&1&&(o(0,"code")(1,"ol",15),S(2,X,2,1,"li",null,u),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Message))}}function W(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"spk-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),p(13,U,4,0,"code"),p(14,z,4,0,"code"),i()()),n&2){let e=r().$implicit;l(4),d("ID: ",e.ID),l(2),d("Type: ",e.Type),l(2),d("Tag: ",e.Tag),l(2),d("TaskID: ",e.TaskID),l(2),d("MessageID: ",e.MessageID),l(),g(e.Exception?13:-1),l(),g(e.Message?14:-1)}}function j(n,t){if(n&1){let e=k();o(0,"tr",10),w("click",function(){let _=O(e).$index,c=r(2);return I(c.toggleRow(_))}),o(1,"td"),s(2),y(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"spk-icon"),s(9,"caret-down"),i()()()(),p(10,W,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,_=r(2);l(2),L($(3,5,e.When,"medium")),l(3),L(_.subStringMessage(e.Message)),l(2),v("rotated-icon",a===_.openRowIndex()),l(3),g(a===_.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"spk-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),P(6,"th",8),i(),S(7,j,11,8,null,null,u),o(9,"div",9),m(10,3),i()()),n&2){let e=r();G("grid-template-columns","auto 1fr auto"),v("type-b",e.asSimpleList()),T("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var b=class n{#e=E(V);whenFilter=C();backupIdFilter=C();asSimpleList=C();polling=C();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=x(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=h(null);whenEffect=x(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=x(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
2
+ `):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&v("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let _;return _=$localize`No data available`,[t,e,a,_,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["table-header",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["spk-button","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&p(0,B,2,0,"div",4)(1,H,11,6,"spk-table",5),e&2&&g(a.logLevel()==="Disabled"?0:1)},dependencies:[F,A,R,N],styles:["[_nghost-%COMP%]{display:block}.simple-list[_nghost-%COMP%] spk-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-2);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{b as a};
@@ -1 +1 @@
1
- import{a as J}from"./chunk-VPTK3JCV.js";import"./chunk-32366MQR.js";import{g as q}from"./chunk-JI7GCFQB.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-LDIZ5E5Z.js";import{b as Z}from"./chunk-HDDYOVZL.js";import"./chunk-QRRKPBY6.js";import{a as K}from"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import{a as H}from"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{a as V}from"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as w}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as W,h as X,p as z,s as B}from"./chunk-Y5IRBMLB.js";import{h as j}from"./chunk-DNJOKPEL.js";import{qa as b}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as S,Bb as T,Cb as u,Hc as x,Kb as y,Lb as v,Mb as r,Nb as D,Ob as I,Qa as _,Rb as g,Z as R,ab as L,ec as M,fa as C,ga as f,hc as F,na as A,sb as p,tb as O,wc as d,xb as P,xc as m,yb as i,zb as s}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"spk-card",10),T(1,16),r(2,2),u(),p(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();_(3),O(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),d(1,"number"),d(2,"number")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(T(0),r(1,8),u())}function ne(n,t){if(n&1&&(M(0),d(1,"bytes"),d(2,"bytes")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(T(0),r(1,9),u())}function ie(n,t){if(n&1&&(i(0,"spk-card",10)(1,"h3"),y(2,5),S(3,"spk-spinner",23),v(),s(),i(4,"div",24),S(5,"spk-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),p(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),p(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,c=g();_(3),D((e=c.statusData())==null?null:e.statusText),I(2),_(2),P("value",(o=c.statusData())==null?null:o.OverallProgress),_(4),O((l=c.statusData())!=null&&l.ProcessedFileCount?9:10),_(5),O((E=c.statusData())!=null&&E.ProcessedFileSize?14:15)}}var N=class n{#i=R(j);#s=R(H);#t=R(K);#n=R(q);#r=R(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=A("");#e=null;lastRestoreStarted=x(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#a(e.ID);return}this.#o(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#a(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#o(e)})}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=L({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let c;c=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let G;G=$localize`Files processed:`;let k;k=$localize`Size processed:`;let $;$=$localize`N/A`;let h;return h=$localize`N/A`,[t,e,o,l,E,c,G,k,$,h,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,o){if(e&1&&(i(0,"section"),p(1,Y,5,1,"spk-card",10)(2,ie,16,4,"spk-card",10),i(3,"spk-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),S(7,"app-notifications",13),s()(),i(8,"spk-card",14)(9,"h3"),r(10,1),s(),S(11,"app-logs-live",15),s()()),e&2){let l;_(),O(o.restoreResult()!=""?1:2),_(6),P("notificationFilterPredicate",o.notificationFilterPredicate()),_(4),P("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[J,z,B,W,X,Z,V,b],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{N as default};
1
+ import{a as J}from"./chunk-Q6W2U6VI.js";import"./chunk-32366MQR.js";import{g as q}from"./chunk-JI7GCFQB.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-LDIZ5E5Z.js";import{b as Z}from"./chunk-JPMOGXHN.js";import"./chunk-QRRKPBY6.js";import{a as K}from"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import{a as H}from"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{a as V}from"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as w}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as W,h as X,p as z,s as B}from"./chunk-Y5IRBMLB.js";import{h as j}from"./chunk-DNJOKPEL.js";import{qa as b}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as S,Bb as T,Cb as u,Hc as x,Kb as y,Lb as v,Mb as r,Nb as D,Ob as I,Qa as _,Rb as g,Z as R,ab as L,ec as M,fa as C,ga as f,hc as F,na as A,sb as p,tb as O,wc as d,xb as P,xc as m,yb as i,zb as s}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"spk-card",10),T(1,16),r(2,2),u(),p(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();_(3),O(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),d(1,"number"),d(2,"number")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(T(0),r(1,8),u())}function ne(n,t){if(n&1&&(M(0),d(1,"bytes"),d(2,"bytes")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(T(0),r(1,9),u())}function ie(n,t){if(n&1&&(i(0,"spk-card",10)(1,"h3"),y(2,5),S(3,"spk-spinner",23),v(),s(),i(4,"div",24),S(5,"spk-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),p(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),p(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,c=g();_(3),D((e=c.statusData())==null?null:e.statusText),I(2),_(2),P("value",(o=c.statusData())==null?null:o.OverallProgress),_(4),O((l=c.statusData())!=null&&l.ProcessedFileCount?9:10),_(5),O((E=c.statusData())!=null&&E.ProcessedFileSize?14:15)}}var N=class n{#i=R(j);#s=R(H);#t=R(K);#n=R(q);#r=R(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=A("");#e=null;lastRestoreStarted=x(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#a(e.ID);return}this.#o(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#a(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#o(e)})}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=L({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let c;c=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let G;G=$localize`Files processed:`;let k;k=$localize`Size processed:`;let $;$=$localize`N/A`;let h;return h=$localize`N/A`,[t,e,o,l,E,c,G,k,$,h,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,o){if(e&1&&(i(0,"section"),p(1,Y,5,1,"spk-card",10)(2,ie,16,4,"spk-card",10),i(3,"spk-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),S(7,"app-notifications",13),s()(),i(8,"spk-card",14)(9,"h3"),r(10,1),s(),S(11,"app-logs-live",15),s()()),e&2){let l;_(),O(o.restoreResult()!=""?1:2),_(6),P("notificationFilterPredicate",o.notificationFilterPredicate()),_(4),P("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[J,z,B,W,X,Z,V,b],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{N as default};
@@ -1,2 +1,2 @@
1
- import{a as w,g as U,x as z}from"./chunk-Y5IRBMLB.js";import{h as X}from"./chunk-DNJOKPEL.js";import{la as y}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as b,Eb as M,H as k,Ic as v,Kb as N,Lb as B,Mb as _,Qa as l,Qb as F,Rb as p,Z as G,ab as $,ac as I,bc as h,da as S,ea as u,ec as d,fc as g,na as r,sb as O,tb as f,ub as T,vb as E,wb as C,wc as x,xb as L,yb as i,yc as A,zb as a}from"./chunk-BTMXQPBB.js";import{a as P,b as R}from"./chunk-EUDKD2JW.js";function V(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;l(),g(t)}}function K(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),E(4,V,2,1,"li",null,T),a()()()()),o&2){let t=p().$implicit,n=p();l(),I("grid-column","1 / -1")("height","auto"),l(3),C(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),F("click",function(){let s=S(t).$index,c=p();return u(c.toggleRow(s))}),i(1,"td"),d(2),x(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"spk-icon"),d(11,"caret-down"),a()()()(),O(12,K,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=p();l(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),l(3),g(t.BackupID>=0?t.BackupID:"-"),l(2),g(t.Message),l(2),h("rotated-icon",n===s.openRowIndex()),l(3),f(n===s.openRowIndex()?12:-1)}}function q(o,e){o&1&&_(0,4,1)}function H(o,e){o&1&&_(0,4,2)}var J=["BackupID","Timestamp","Message","actions"],D=class o{#e=G(X);displayedColumns=r(J);openRowIndex=r(null);noMoreItems=r(!1);logsIsLoading=r(!1);logs=r([]);pagination=r({offsetTime:void 0,pagesize:10});paginationEffect=v(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(k(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
1
+ import{a as w,g as U,x as z}from"./chunk-Y5IRBMLB.js";import{h as X}from"./chunk-DNJOKPEL.js";import{la as y}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as b,Eb as M,H as k,Ic as v,Kb as N,Lb as B,Mb as _,Qa as l,Qb as F,Rb as p,Z as G,ab as $,ac as I,bc as x,da as S,ea as u,ec as d,fc as g,na as r,sb as O,tb as f,ub as T,vb as E,wb as C,wc as A,xb as L,yb as i,yc as h,zb as a}from"./chunk-BTMXQPBB.js";import{a as P,b as R}from"./chunk-EUDKD2JW.js";function V(o,e){if(o&1&&(i(0,"li"),d(1),a()),o&2){let t=e.$implicit;l(),g(t)}}function K(o,e){if(o&1&&(i(0,"tr")(1,"td",12)(2,"code")(3,"ol",13),E(4,V,2,1,"li",null,T),a()()()()),o&2){let t=p().$implicit,n=p();l(),I("grid-column","1 / -1")("height","auto"),l(3),C(n.breakIntoLines(t.Exception))}}function j(o,e){if(o&1){let t=M();i(0,"tr",9),F("click",function(){let s=S(t).$index,c=p();return u(c.toggleRow(s))}),i(1,"td"),d(2),A(3,"date"),a(),i(4,"td",10),d(5),a(),i(6,"td"),d(7),a(),i(8,"td")(9,"button",11)(10,"spk-icon"),d(11,"caret-down"),a()()()(),O(12,K,6,4,"tr")}if(o&2){let t=e.$implicit,n=e.$index,s=p();l(2),g(t.Timestamp?h(3,6,t.Timestamp*1e3,"medium"):"-"),l(3),g(t.BackupID>=0?t.BackupID:"-"),l(2),g(t.Message),l(2),x("rotated-icon",n===s.openRowIndex()),l(3),f(n===s.openRowIndex()?12:-1)}}function q(o,e){o&1&&_(0,4,1)}function H(o,e){o&1&&_(0,4,2)}var J=["BackupID","Timestamp","Message","actions"],D=class o{#e=G(X);displayedColumns=r(J);openRowIndex=r(null);noMoreItems=r(!1);logsIsLoading=r(!1);logs=r([]);pagination=r({offsetTime:void 0,pagesize:10});paginationEffect=v(()=>{let e=this.pagination();this.getLogs()});ngOnInit(){this.getLogs()}getLogs(){this.logsIsLoading.set(!0);let e=this.pagination();this.#e.getApiV1LogdataLog({pagesize:e.pagesize,offset:e.offsetTime}).pipe(k(()=>this.logsIsLoading.set(!1))).subscribe({next:t=>{t.length===0&&this.noMoreItems.set(!0),this.logs.update(n=>[...n,...t])}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
2
2
  `):[]}loadMore(){let e=this.logs().at(-1)?.Timestamp;this.pagination.update(t=>R(P({},t),{offsetTime:e}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=$({type:o,selectors:[["app-logs-stored"]],decls:18,vars:6,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let s;s=$localize`No data available`;let c;return c=$localize`${"\uFFFD*16:1\uFFFD"}:START_BLOCK_IF: No more items ${"\uFFFD/*16:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*17:2\uFFFD"}:START_BLOCK_ELSE: Load more ${"\uFFFD/*17:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,[e,t,n,s,c,[1,"type-b",3,"data","loading"],["table-header",""],["table-no-rows",""],["spk-button","",1,"primary","raised",3,"click","disabled"],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){if(t&1){let s=M();i(0,"spk-table",5)(1,"tr",6)(2,"th"),_(3,0),a(),i(4,"th"),_(5,1),a(),i(6,"th"),_(7,2),a(),b(8,"th"),a(),E(9,j,13,9,null,null,T),i(11,"div",7),_(12,3),a()(),i(13,"footer")(14,"button",8),F("click",function(){return S(s),u(n.loadMore())}),N(15,4),O(16,q,1,0)(17,H,1,0),B(),a()()}if(t&2){let s=n.logs();I("grid-template-columns","1fr 1fr 1fr auto"),L("data",s)("loading",n.logsIsLoading()),l(9),C(s),l(5),L("disabled",n.logsIsLoading()||n.noMoreItems()),l(2),f(n.noMoreItems()?16:17)}},dependencies:[z,y,w,U],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 0 0}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-LPFSQKIK.js")},{path:"encryption",loadComponent:()=>import("./chunk-74BJ4GVA.js")},{path:"select-files",loadComponent:()=>import("./chunk-PZCO6IX3.js")},{path:"options",loadComponent:()=>import("./chunk-PZA4FRVJ.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-7IBACL6K.js")}],t=o;export{t as default};
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-Y2PKBSNM.js")},{path:"encryption",loadComponent:()=>import("./chunk-74BJ4GVA.js")},{path:"select-files",loadComponent:()=>import("./chunk-PZCO6IX3.js")},{path:"options",loadComponent:()=>import("./chunk-PZA4FRVJ.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-QIG4NNIP.js")}],t=o;export{t as default};
@@ -1 +1 @@
1
- import{g as m}from"./chunk-JI7GCFQB.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as y}from"./chunk-XIOHRQ3X.js";import{h as w}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as u}from"./chunk-LDIZ5E5Z.js";import"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{a as L,b as M,c as N,d as I,e as h,f as G}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{q as W,v}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as s,Ic as $,Kb as F,Lb as l,Qa as r,Rb as E,Z as c,ab as P,bc as D,na as C,rc as A,sb as T,sc as S,tb as g,tc as O,xb as _,yb as i,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var x=()=>["/restore-from-files/destination"],K=()=>["/restore-from-files/encryption"],X=()=>["/restore-from-files/select-files"],b=()=>["/restore-from-files/options"],z=t=>["/restore",t,"select-files"],B=t=>["/restore",t,"options"];function U(t,o){t&1&&(i(0,"div",6),F(1,0),s(2,"spk-radio"),l(),n(),i(3,"div",6),F(4,1),s(5,"spk-radio"),l(),n(),i(6,"div",6),F(7,2),s(8,"spk-radio"),l(),n(),i(9,"div",6),F(10,3),s(11,"spk-radio"),l(),n()),t&2&&(_("routerLink",S(4,x)),r(3),_("routerLink",S(5,K)),r(3),_("routerLink",S(6,X)),r(3),_("routerLink",S(7,b)))}function j(t,o){if(t&1&&(i(0,"div",6),F(1,4),s(2,"spk-radio"),l(),n(),i(3,"div",6),F(4,5),s(5,"spk-radio"),l(),n()),t&2){let e=E(2);_("routerLink",O(2,z,e.backupId())),r(3),_("routerLink",O(4,B,e.backupId()))}}function H(t,o){if(t&1&&(i(0,"spk-stepper"),T(1,U,12,8)(2,j,6,6),n()),t&2){let e=E();r(),g(e.isFileRestore()?1:2)}}var k=class t{#e=c(M);#o=c(I);#t=c(m);#i=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=C(!1);paramsChanged=$(()=>{let o=this.#s(),e=this.#i()?.id,a=!!this.#n()?.find(d=>d.path==="restore-from-files"),R=!!o?.find(d=>d.path==="progress");this.isProgressPage.set(R),this.#t.init(e,a)});ngOnInit(){this.#o.events.subscribe(o=>{if(o instanceof L){let e=o.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[A([m,w])],decls:4,vars:1,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let R;R=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let d;d=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let f;return f=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[o,e,a,R,d,f,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),T(1,H,3,1,"spk-stepper"),i(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[v,W,y,N,h,G],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{k as default};
1
+ import{g as m}from"./chunk-JI7GCFQB.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as y}from"./chunk-XIOHRQ3X.js";import{h as w}from"./chunk-ZAFFTZSE.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as u}from"./chunk-LDIZ5E5Z.js";import"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{a as L,b as M,c as N,d as I,e as h,f as G}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{q as W,v}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as s,Ic as $,Kb as F,Lb as l,Qa as r,Rb as E,Z as c,ab as P,bc as D,na as C,rc as A,sb as T,sc as S,tb as g,tc as O,xb as _,yb as i,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var x=()=>["/restore-from-files/destination"],K=()=>["/restore-from-files/encryption"],X=()=>["/restore-from-files/select-files"],b=()=>["/restore-from-files/options"],z=t=>["/restore",t,"select-files"],B=t=>["/restore",t,"options"];function U(t,o){t&1&&(i(0,"div",6),F(1,0),s(2,"spk-radio"),l(),n(),i(3,"div",6),F(4,1),s(5,"spk-radio"),l(),n(),i(6,"div",6),F(7,2),s(8,"spk-radio"),l(),n(),i(9,"div",6),F(10,3),s(11,"spk-radio"),l(),n()),t&2&&(_("routerLink",S(4,x)),r(3),_("routerLink",S(5,K)),r(3),_("routerLink",S(6,X)),r(3),_("routerLink",S(7,b)))}function j(t,o){if(t&1&&(i(0,"div",6),F(1,4),s(2,"spk-radio"),l(),n(),i(3,"div",6),F(4,5),s(5,"spk-radio"),l(),n()),t&2){let e=E(2);_("routerLink",O(2,z,e.backupId())),r(3),_("routerLink",O(4,B,e.backupId()))}}function H(t,o){if(t&1&&(i(0,"spk-stepper"),T(1,U,12,8)(2,j,6,6),n()),t&2){let e=E();r(),g(e.isFileRestore()?1:2)}}var k=class t{#e=c(M);#o=c(I);#t=c(m);#i=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=C(!1);paramsChanged=$(()=>{let o=this.#s(),e=this.#i()?.id,a=!!this.#n()?.find(d=>d.path==="restore-from-files"),R=!!o?.find(d=>d.path==="progress");this.isProgressPage.set(R),this.#t.init(e,a)});ngOnInit(){this.#o.events.subscribe(o=>{if(o instanceof L){let e=o.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[A([m,w])],decls:4,vars:1,consts:()=>{let o;o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let R;R=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let d;d=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let f;return f=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[o,e,a,R,d,f,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),T(1,H,3,1,"spk-stepper"),i(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[v,W,y,N,h,G],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{k as default};
@@ -1 +1 @@
1
- import{a as Y,d as en}from"./chunk-V6EWWEIG.js";import{a as nn}from"./chunk-XIOHRQ3X.js";import{a as Ze}from"./chunk-WZRDKVOR.js";import{a as Ye}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import{a as Qe}from"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{e as he}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,f as Xe,g as we,h as ze,j as Ve,k as Ke,o as Ue,p as je,w as We,x as qe}from"./chunk-Y5IRBMLB.js";import{h as Je}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{$b as K,Ab as d,Ac as J,Bb as m,Cb as M,Db as f,Eb as x,H as j,Ic as ve,Kb as s,Lb as u,Mb as T,Nb as A,Ob as R,Pb as W,Qa as _,Qb as $,Rb as p,Z as h,ab as He,bc as H,da as N,ea as D,ec as r,fb as O,fc as Be,gc as E,jc as Le,kc as Ge,lc as be,na as X,pb as xe,qb as ye,sb as C,sc as q,tb as S,tc as P,ub as w,vb as z,wb as V,wc as k,xb as g,xc as y,yb as o,yc as I,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Q,Ve,qe,We,import("./chunk-3JKXOOME.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-NS4PAVKI.js").then(n=>n.RelativeTimePipe)],_n=()=>["/add-backup"],ln=()=>["/restore"],on=n=>({$implicit:n}),rn=n=>["/backup",n],cn=n=>["/restore",n],sn=n=>["/backup",n,"export"],un=n=>["/backup",n,"delete"],pn=n=>["/backup",n,"database"],Fn=n=>["/backup",n,"commandline"],dn=n=>["/backup",n,"log"];function gn(n,i){if(n&1){let e=x();o(0,"button",51),$("click",function(){let c=N(e).$implicit,F=p(2);return D(F.sortByColumn.set(c.value))}),T(1,15),t()}if(n&2){let e=i.$implicit,a=p(2);H("active",a.orderBy()===e.value),_(),A(e.label),R(1)}}function Tn(n,i){if(n&1&&(o(0,"spk-menu",52)(1,"button",53),s(2,14),d(3,"strong")(4,"spk-icon"),u(),t(),m(5,54),z(6,gn,2,3,"button",55,w),M(),t()),n&2){let e=p();_(4),A(e.orderBy()),R(2),_(2),V(e.sortOrderOptions())}}function Cn(n,i){if(n&1&&(o(0,"p")(1,"span"),T(2,21),t(),r(3),k(4,"relativeTime"),t()),n&2){let e=p().$implicit,a=p(4);_(3),E(" ",I(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function Sn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(4);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function En(n,i){n&1&&(m(0),r(1,"-"),M())}function mn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Mn(n,i){n&1&&(m(0),r(1,"-"),M())}function On(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){n&1&&f(0)}function Dn(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"spk-chip")(5,"spk-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),T(10,16),t(),r(11),k(12,"relativeTime"),t(),C(13,Cn,5,4,"p"),o(14,"p")(15,"span"),T(16,17),t(),C(17,Sn,2,4)(18,En,2,0,"ng-container"),t(),o(19,"p")(20,"span"),T(21,18),t(),C(22,mn,2,3)(23,Mn,2,0,"ng-container"),t(),o(24,"p")(25,"span"),T(26,19),t(),C(27,On,2,3)(28,kn,2,0,"ng-container"),t()(),o(29,"spk-chip",59),T(30,20),t(),o(31,"div",49),O(32,Nn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(4),c=K(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",I(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let F=a.getBackupVersionCount(e);_(3),A(F)(F),R(30),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,on,e))}}function fn(n,i){if(n&1&&z(0,Dn,33,17,"div",58,w),n&2){let e=p(3);V(e.backups())}}function Pn(n,i){n&1&&(m(0),T(1,22),M())}function $n(n,i){if(n&1&&(o(0,"div",56),C(1,fn,2,0)(2,Pn,2,0,"ng-container"),t()),n&2){let e=p(2);_(),S(e.backups().length?1:2)}}function In(n,i){n&1&&(s(0,23,1),f(1),u())}function An(n,i){n&1&&(s(0,24,1),f(1),u())}function Rn(n,i){n&1&&(s(0,25,1),f(1),u())}function Hn(n,i){n&1&&(s(0,26,1),f(1),u())}function xn(n,i){n&1&&(s(0,27,1),f(1),u())}function yn(n,i){n&1&&(s(0,28,1),f(1),u())}function Bn(n,i){n&1&&(s(0,29,1),f(1),u())}function Ln(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function hn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Xn(n,i){n&1&&(m(0),r(1,"-"),M())}function wn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function zn(n,i){n&1&&(m(0),r(1,"-"),M())}function Vn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){n&1&&f(0)}function jn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,hn,2,4)(13,Xn,2,0,"ng-container"),t(),o(14,"td"),C(15,wn,2,3)(16,zn,2,0,"ng-container"),t(),o(17,"td"),C(18,Vn,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),T(22,32),t()(),o(23,"td"),O(24,Un,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(3),c=K(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let F=a.getBackupVersionCount(e);_(4),A(F)(F),R(22),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,on,e))}}function Wn(n,i){if(n&1){let e=x();o(0,"spk-table",61),be("sortByColumnChange",function(c){N(e);let F=p(2);return Ge(F.sortByColumn,c)||(F.sortByColumn=c),D(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,In,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,An,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,Hn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),T(24,30),t(),o(25,"th"),T(26,31),t()(),z(27,jn,25,13,"tr",null,w),t()}if(n&2){let e=p(2),a=K(53);g("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(5),V(e.backups())}}function qn(n,i){if(n&1&&C(0,$n,3,1,"div",56)(1,Wn,29,10,"spk-table",57),n&2){let e=p();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Jn(n,i){n&1&&(o(0,"div",71),d(1,"spk-progress-bar",72),o(2,"div",45)(3,"h3"),T(4,33),t()()())}function Qn(n,i){n&1&&T(0,34,1)}function Yn(n,i){n&1&&(o(0,"spk-icon"),r(1,"check"),t())}function Zn(n,i){n&1&&(o(0,"spk-icon"),r(1,"dots-three-vertical"),t())}function et(n,i){if(n&1){let e=x();o(0,"button",73),$("click",function(){let c=N(e).$implicit,F=p();return D(F.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),d(2,"spk-icon"),C(3,Qn,1,0),u(),t(),o(4,"button",74)(5,"spk-icon"),r(6,"pencil-simple"),t()(),o(7,"spk-menu",75)(8,"button",46),C(9,Yn,2,0,"spk-icon")(10,Zn,2,0,"spk-icon"),t(),m(11,54),o(12,"h3",76),r(13,"Operations"),t(),o(14,"button",77),s(15,35),d(16,"spk-icon"),u(),t(),o(17,"button",77),s(18,36),d(19,"spk-icon"),u(),t(),o(20,"button",77),s(21,37),d(22,"spk-icon"),u(),t(),d(23,"spk-divider"),o(24,"h3",76),r(25,"Advanced"),t(),o(26,"button",77),s(27,38),d(28,"spk-icon"),u(),t(),o(29,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),d(34,"spk-icon"),u(),t(),o(35,"button",77),s(36,41),d(37,"spk-icon"),u(),t(),d(38,"spk-divider"),o(39,"h3",76),r(40,"Reporting"),t(),o(41,"button",77),s(42,42),d(43,"spk-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=p();H("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),g("routerLink",P(16,rn,e.Backup==null?null:e.Backup.ID)),_(3),g("right",!0),_(),H("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),g("routerLink",P(18,cn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(20,sn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(22,un,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(24,pn,e.Backup==null?null:e.Backup.ID)),_(9),g("routerLink",P(26,Fn,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(28,dn,e.Backup==null?null:e.Backup.ID))}}function nt(n,i){n&1&&(o(0,"spk-icon",78),r(1,"funnel-simple"),t(),o(2,"spk-icon",79),r(3,"sort-ascending"),t(),o(4,"spk-icon",80),r(5,"sort-descending"),t())}var tn={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=h(Je);#t=h(Ze);#e=h(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Qe("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);return tn[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=tn[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let F="http://null?"+i.split("?")[1],B=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[L,G]of Object.entries(en))if(B.endsWith(L))return G}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=He({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let B;B=$localize`My backups`;let L;L=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let G;G=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let pe;pe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Fe;Fe=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize`Version`;let me;me=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${v}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ne;Ne=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let De;De=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let fe;fe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let $e;$e=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Ie;Ie=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Re;return Re=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,F,U,B,L,G,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,de,ge,Te,Ce,Se,Ee,me,Me,Oe,ke,Ne,De,fe,Pe,$e,Ie,Ae,Re,[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,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","nextrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=x();d(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",43),d(4,"img",44),o(5,"div",45)(6,"h3"),T(7,2),t(),o(8,"p"),T(9,3),t()(),o(10,"button",46),s(11,4),d(12,"spk-icon"),u(),t()(),o(13,"spk-card",43),d(14,"img",47),o(15,"div",45)(16,"h3"),T(17,5),t(),o(18,"p"),T(19,6),t()(),o(20,"button",46),s(21,7),d(22,"spk-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),T(26,8),M(),o(27,"div",49)(28,"spk-button-group",50)(29,"button",51),$("click",function(){return N(c),D(a.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){return N(c),D(a.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),t()(),o(35,"spk-menu",52)(36,"button",53),s(37,11),d(38,"strong")(39,"spk-icon"),u(),t(),m(40,54),o(41,"button",51),$("click",function(){return N(c),D(a.setTimeType("relative"))}),T(42,12),t(),o(43,"button",51),$("click",function(){return N(c),D(a.setTimeType("actual"))}),T(44,13),t(),M(),t(),C(45,Tn,8,1,"spk-menu",52),t()(),O(46,qn,2,1)(47,Jn,5,0),xe(48,46,an,null,47),t()(),O(50,et,44,30,"ng-template",null,0,J)(52,nt,6,0,"ng-template",null,1,J)}e&2&&(_(3),g("routerLink",q(9,_n)),_(10),g("routerLink",q(10,ln)),_(16),H("active",a.viewMode()==="list"),_(3),H("active",a.viewMode()==="details"),_(7),A(a.timeType()),R(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[he,nn,ze,we,Q,Ke,Ue,je,Xe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}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;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.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-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
1
+ import{a as Y,d as en}from"./chunk-AH5TLYN4.js";import{a as nn}from"./chunk-XIOHRQ3X.js";import{a as Ze}from"./chunk-WZRDKVOR.js";import{a as Ye}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import{a as Qe}from"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{e as he}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,f as Xe,g as we,h as ze,j as Ve,k as Ke,o as Ue,p as je,w as We,x as qe}from"./chunk-Y5IRBMLB.js";import{h as Je}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{$b as K,Ab as d,Ac as J,Bb as m,Cb as M,Db as f,Eb as x,H as j,Ic as ve,Kb as s,Lb as u,Mb as T,Nb as A,Ob as R,Pb as W,Qa as _,Qb as $,Rb as p,Z as h,ab as He,bc as H,da as N,ea as D,ec as r,fb as O,fc as Be,gc as E,jc as Le,kc as Ge,lc as be,na as X,pb as xe,qb as ye,sb as C,sc as q,tb as S,tc as P,ub as w,vb as z,wb as V,wc as k,xb as g,xc as y,yb as o,yc as I,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Q,Ve,qe,We,import("./chunk-3JKXOOME.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-NS4PAVKI.js").then(n=>n.RelativeTimePipe)],_n=()=>["/add-backup"],ln=()=>["/restore"],on=n=>({$implicit:n}),rn=n=>["/backup",n],cn=n=>["/restore",n],sn=n=>["/backup",n,"export"],un=n=>["/backup",n,"delete"],pn=n=>["/backup",n,"database"],Fn=n=>["/backup",n,"commandline"],dn=n=>["/backup",n,"log"];function gn(n,i){if(n&1){let e=x();o(0,"button",51),$("click",function(){let c=N(e).$implicit,F=p(2);return D(F.sortByColumn.set(c.value))}),T(1,15),t()}if(n&2){let e=i.$implicit,a=p(2);H("active",a.orderBy()===e.value),_(),A(e.label),R(1)}}function Tn(n,i){if(n&1&&(o(0,"spk-menu",52)(1,"button",53),s(2,14),d(3,"strong")(4,"spk-icon"),u(),t(),m(5,54),z(6,gn,2,3,"button",55,w),M(),t()),n&2){let e=p();_(4),A(e.orderBy()),R(2),_(2),V(e.sortOrderOptions())}}function Cn(n,i){if(n&1&&(o(0,"p")(1,"span"),T(2,21),t(),r(3),k(4,"relativeTime"),t()),n&2){let e=p().$implicit,a=p(4);_(3),E(" ",I(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function Sn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(4);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function En(n,i){n&1&&(m(0),r(1,"-"),M())}function mn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Mn(n,i){n&1&&(m(0),r(1,"-"),M())}function On(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){n&1&&f(0)}function Dn(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"spk-chip")(5,"spk-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),T(10,16),t(),r(11),k(12,"relativeTime"),t(),C(13,Cn,5,4,"p"),o(14,"p")(15,"span"),T(16,17),t(),C(17,Sn,2,4)(18,En,2,0,"ng-container"),t(),o(19,"p")(20,"span"),T(21,18),t(),C(22,mn,2,3)(23,Mn,2,0,"ng-container"),t(),o(24,"p")(25,"span"),T(26,19),t(),C(27,On,2,3)(28,kn,2,0,"ng-container"),t()(),o(29,"spk-chip",59),T(30,20),t(),o(31,"div",49),O(32,Nn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(4),c=K(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",I(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let F=a.getBackupVersionCount(e);_(3),A(F)(F),R(30),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,on,e))}}function fn(n,i){if(n&1&&z(0,Dn,33,17,"div",58,w),n&2){let e=p(3);V(e.backups())}}function Pn(n,i){n&1&&(m(0),T(1,22),M())}function $n(n,i){if(n&1&&(o(0,"div",56),C(1,fn,2,0)(2,Pn,2,0,"ng-container"),t()),n&2){let e=p(2);_(),S(e.backups().length?1:2)}}function In(n,i){n&1&&(s(0,23,1),f(1),u())}function An(n,i){n&1&&(s(0,24,1),f(1),u())}function Rn(n,i){n&1&&(s(0,25,1),f(1),u())}function Hn(n,i){n&1&&(s(0,26,1),f(1),u())}function xn(n,i){n&1&&(s(0,27,1),f(1),u())}function yn(n,i){n&1&&(s(0,28,1),f(1),u())}function Bn(n,i){n&1&&(s(0,29,1),f(1),u())}function Ln(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function hn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Xn(n,i){n&1&&(m(0),r(1,"-"),M())}function wn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function zn(n,i){n&1&&(m(0),r(1,"-"),M())}function Vn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){n&1&&f(0)}function jn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,hn,2,4)(13,Xn,2,0,"ng-container"),t(),o(14,"td"),C(15,wn,2,3)(16,zn,2,0,"ng-container"),t(),o(17,"td"),C(18,Vn,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),T(22,32),t()(),o(23,"td"),O(24,Un,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(3),c=K(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let F=a.getBackupVersionCount(e);_(4),A(F)(F),R(22),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,on,e))}}function Wn(n,i){if(n&1){let e=x();o(0,"spk-table",61),be("sortByColumnChange",function(c){N(e);let F=p(2);return Ge(F.sortByColumn,c)||(F.sortByColumn=c),D(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,In,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,An,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,Hn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),T(24,30),t(),o(25,"th"),T(26,31),t()(),z(27,jn,25,13,"tr",null,w),t()}if(n&2){let e=p(2),a=K(53);g("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(5),V(e.backups())}}function qn(n,i){if(n&1&&C(0,$n,3,1,"div",56)(1,Wn,29,10,"spk-table",57),n&2){let e=p();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Jn(n,i){n&1&&(o(0,"div",71),d(1,"spk-progress-bar",72),o(2,"div",45)(3,"h3"),T(4,33),t()()())}function Qn(n,i){n&1&&T(0,34,1)}function Yn(n,i){n&1&&(o(0,"spk-icon"),r(1,"check"),t())}function Zn(n,i){n&1&&(o(0,"spk-icon"),r(1,"dots-three-vertical"),t())}function et(n,i){if(n&1){let e=x();o(0,"button",73),$("click",function(){let c=N(e).$implicit,F=p();return D(F.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),d(2,"spk-icon"),C(3,Qn,1,0),u(),t(),o(4,"button",74)(5,"spk-icon"),r(6,"pencil-simple"),t()(),o(7,"spk-menu",75)(8,"button",46),C(9,Yn,2,0,"spk-icon")(10,Zn,2,0,"spk-icon"),t(),m(11,54),o(12,"h3",76),r(13,"Operations"),t(),o(14,"button",77),s(15,35),d(16,"spk-icon"),u(),t(),o(17,"button",77),s(18,36),d(19,"spk-icon"),u(),t(),o(20,"button",77),s(21,37),d(22,"spk-icon"),u(),t(),d(23,"spk-divider"),o(24,"h3",76),r(25,"Advanced"),t(),o(26,"button",77),s(27,38),d(28,"spk-icon"),u(),t(),o(29,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),d(34,"spk-icon"),u(),t(),o(35,"button",77),s(36,41),d(37,"spk-icon"),u(),t(),d(38,"spk-divider"),o(39,"h3",76),r(40,"Reporting"),t(),o(41,"button",77),s(42,42),d(43,"spk-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=p();H("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),g("routerLink",P(16,rn,e.Backup==null?null:e.Backup.ID)),_(3),g("right",!0),_(),H("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),g("routerLink",P(18,cn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(20,sn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(22,un,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(24,pn,e.Backup==null?null:e.Backup.ID)),_(9),g("routerLink",P(26,Fn,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(28,dn,e.Backup==null?null:e.Backup.ID))}}function nt(n,i){n&1&&(o(0,"spk-icon",78),r(1,"funnel-simple"),t(),o(2,"spk-icon",79),r(3,"sort-ascending"),t(),o(4,"spk-icon",80),r(5,"sort-descending"),t())}var tn={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=h(Je);#t=h(Ze);#e=h(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Qe("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);return tn[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=tn[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let F="http://null?"+i.split("?")[1],B=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[L,G]of Object.entries(en))if(B.endsWith(L))return G}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=He({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let B;B=$localize`My backups`;let L;L=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let G;G=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let pe;pe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Fe;Fe=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize`Version`;let me;me=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${v}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ne;Ne=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let De;De=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let fe;fe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let $e;$e=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Ie;Ie=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Re;return Re=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,F,U,B,L,G,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,de,ge,Te,Ce,Se,Ee,me,Me,Oe,ke,Ne,De,fe,Pe,$e,Ie,Ae,Re,[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,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","nextrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=x();d(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",43),d(4,"img",44),o(5,"div",45)(6,"h3"),T(7,2),t(),o(8,"p"),T(9,3),t()(),o(10,"button",46),s(11,4),d(12,"spk-icon"),u(),t()(),o(13,"spk-card",43),d(14,"img",47),o(15,"div",45)(16,"h3"),T(17,5),t(),o(18,"p"),T(19,6),t()(),o(20,"button",46),s(21,7),d(22,"spk-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),T(26,8),M(),o(27,"div",49)(28,"spk-button-group",50)(29,"button",51),$("click",function(){return N(c),D(a.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){return N(c),D(a.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),t()(),o(35,"spk-menu",52)(36,"button",53),s(37,11),d(38,"strong")(39,"spk-icon"),u(),t(),m(40,54),o(41,"button",51),$("click",function(){return N(c),D(a.setTimeType("relative"))}),T(42,12),t(),o(43,"button",51),$("click",function(){return N(c),D(a.setTimeType("actual"))}),T(44,13),t(),M(),t(),C(45,Tn,8,1,"spk-menu",52),t()(),O(46,qn,2,1)(47,Jn,5,0),xe(48,46,an,null,47),t()(),O(50,et,44,30,"ng-template",null,0,J)(52,nt,6,0,"ng-template",null,1,J)}e&2&&(_(3),g("routerLink",q(9,_n)),_(10),g("routerLink",q(10,ln)),_(16),H("active",a.viewMode()==="list"),_(3),H("active",a.viewMode()==="details"),_(7),A(a.timeType()),R(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[he,nn,ze,we,Q,Ke,Ue,je,Xe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}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;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.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-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
@@ -1 +1 @@
1
- import{g as mt}from"./chunk-JI7GCFQB.js";import{a as Et,b as Ot,c as Ct}from"./chunk-H52UO57S.js";import"./chunk-X7SFNRJF.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as Dt}from"./chunk-V6EWWEIG.js";import{h as dt}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import{a as m}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as _t,e as ct,f as ut,g as Tt,i as pt,j as gt,s as St}from"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import{b as nt,d as it}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as p,Bb as L,Cb as b,Eb as E,Hc as G,Kb as u,Lb as T,Mb as f,Nb as k,Ob as $,Oc as et,Pb as w,Qa as r,Qb as S,Rb as l,Z as O,Zb as Q,_b as q,ab as H,bc as Y,da as _,ea as c,ec as N,fc as B,gc as J,ha as j,jc as A,kc as M,lc as P,na as C,rc as Z,sb as D,sc as tt,tb as d,ub as y,vb as h,wb as x,xb as I,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function Nt(i,n){if(i&1){let t=E();u(0,2,1),s(1,"button",30),S("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),I("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=E();u(0,2,2),s(1,"button",20),S("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function kt(i,n){i&1&&(s(0,"spk-alert"),u(1,5),p(2,"spk-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"spk-alert",21),u(1,6),p(2,"spk-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"spk-alert",22),u(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"spk-alert",23),u(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1){let t=E();s(0,"p",32),S("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),k((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,n){if(i&1){let t=E();s(0,"div",39),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),N(2),F(),s(3,"p"),N(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function ht(i,n){if(i&1){let t=E();s(0,"button",40,1),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),N(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function xt(i,n){if(i&1&&(s(0,"div",34),h(1,yt,5,2,"div",35,y),F(),s(3,"spk-menu",36)(4,"button",37),f(5,10),F(),L(6,19),h(7,ht,3,1,"button",38,y),b(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),I("searchable",!0),r(4),x(t.destinationTypeOptions())}}function Lt(i,n){if(i&1){let t=E();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),p(1,"spk-icon",28),T())}function wt(i,n){i&1&&(u(0,4,2),p(1,"spk-icon"),T())}function Bt(i,n){if(i&1){let t=E();s(0,"spk-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),f(3,11),F(),s(4,"spk-alert",22),f(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),N(11,"Cancel"),F(),s(12,"button",47),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),I("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(Et);injector=O(j);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=G(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=H({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([dt])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=w(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=w(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let V;V=$localize`All destinations`;let W;W=$localize`Edit target URL`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,K,V,W,z,X,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"disabled","loader"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["spk-button","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=E();s(0,"form",14,0),S("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,Nt,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),L(10,19),s(11,"button",20),S("click",function(){return _(e),c(o.openTargetUrlDialog())}),p(12,"spk-icon"),F(),D(13,ft,3,0,"button",18),b(),F()(),T(),F(),D(14,kt,3,0,"spk-alert")(15,$t,3,0,"spk-alert",21)(16,At,3,1,"spk-alert",22)(17,Mt,3,1,"spk-alert",23),D(18,Pt,5,1,"p"),F(),D(19,xt,9,1),D(20,Lt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),S("click",function(){return _(e),c(o.goBack())}),u(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"spk-icon",28)(28,wt,2,0,"spk-icon"),T(),F()()(),D(29,Bt,15,4,"spk-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),d(e?6:-1),r(7),d(e?13:-1),r(),d(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),d(e?18:-1),r(),d(e?-1:19),r(),d(e?20:-1),r(5),I("disabled",o.testSignal()=="testing"||!e),r(2),d(o.testSignal()=="testing"?27:28),r(2),d(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,St,gt,_t,ct,ut,pt,Tt,rt,lt,ot,st,at],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}.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-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);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{v as default};
1
+ import{g as mt}from"./chunk-JI7GCFQB.js";import{a as Et,b as Ot,c as Ct}from"./chunk-CDXBWYCI.js";import"./chunk-X7SFNRJF.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as Dt}from"./chunk-AH5TLYN4.js";import{h as dt}from"./chunk-ZAFFTZSE.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import{a as m}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as _t,e as ct,f as ut,g as Tt,i as pt,j as gt,s as St}from"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import{b as nt,d as it}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as p,Bb as L,Cb as b,Eb as E,Hc as G,Kb as u,Lb as T,Mb as f,Nb as k,Ob as $,Oc as et,Pb as w,Qa as r,Qb as S,Rb as l,Z as O,Zb as Q,_b as q,ab as H,bc as Y,da as _,ea as c,ec as N,fc as B,gc as J,ha as j,jc as A,kc as M,lc as P,na as C,rc as Z,sb as D,sc as tt,tb as d,ub as y,vb as h,wb as x,xb as I,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function Nt(i,n){if(i&1){let t=E();u(0,2,1),s(1,"button",30),S("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),I("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=E();u(0,2,2),s(1,"button",20),S("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function kt(i,n){i&1&&(s(0,"spk-alert"),u(1,5),p(2,"spk-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"spk-alert",21),u(1,6),p(2,"spk-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"spk-alert",22),u(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"spk-alert",23),u(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1){let t=E();s(0,"p",32),S("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),k((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,n){if(i&1){let t=E();s(0,"div",39),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),N(2),F(),s(3,"p"),N(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function ht(i,n){if(i&1){let t=E();s(0,"button",40,1),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),N(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function xt(i,n){if(i&1&&(s(0,"div",34),h(1,yt,5,2,"div",35,y),F(),s(3,"spk-menu",36)(4,"button",37),f(5,10),F(),L(6,19),h(7,ht,3,1,"button",38,y),b(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),I("searchable",!0),r(4),x(t.destinationTypeOptions())}}function Lt(i,n){if(i&1){let t=E();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),p(1,"spk-icon",28),T())}function wt(i,n){i&1&&(u(0,4,2),p(1,"spk-icon"),T())}function Bt(i,n){if(i&1){let t=E();s(0,"spk-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),f(3,11),F(),s(4,"spk-alert",22),f(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),N(11,"Cancel"),F(),s(12,"button",47),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),I("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(Et);injector=O(j);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=G(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=H({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([dt])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=w(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=w(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let V;V=$localize`All destinations`;let W;W=$localize`Edit target URL`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,K,V,W,z,X,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"disabled","loader"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["spk-button","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=E();s(0,"form",14,0),S("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,Nt,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),L(10,19),s(11,"button",20),S("click",function(){return _(e),c(o.openTargetUrlDialog())}),p(12,"spk-icon"),F(),D(13,ft,3,0,"button",18),b(),F()(),T(),F(),D(14,kt,3,0,"spk-alert")(15,$t,3,0,"spk-alert",21)(16,At,3,1,"spk-alert",22)(17,Mt,3,1,"spk-alert",23),D(18,Pt,5,1,"p"),F(),D(19,xt,9,1),D(20,Lt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),S("click",function(){return _(e),c(o.goBack())}),u(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"spk-icon",28)(28,wt,2,0,"spk-icon"),T(),F()()(),D(29,Bt,15,4,"spk-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),d(e?6:-1),r(7),d(e?13:-1),r(),d(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),d(e?18:-1),r(),d(e?-1:19),r(),d(e?20:-1),r(5),I("disabled",o.testSignal()=="testing"||!e),r(2),d(o.testSignal()=="testing"?27:28),r(2),d(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,St,gt,_t,ct,ut,pt,Tt,rt,lt,ot,st,at],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}.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-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);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{v as default};
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-WZNH4JPF.js";import{a as Oe}from"./chunk-BCHZRC5K.js";import{a as rt,b as Ke,c as _t}from"./chunk-B26UYXA3.js";import{b as re}from"./chunk-LDIZ5E5Z.js";import{a as ot}from"./chunk-2BX65XJQ.js";import{a as Te}from"./chunk-6JQM2X3B.js";import{b as fe,c as Q,d as Ae,e as Z,f as he,h as st,i as le,j as Pe,k as Ne,n as lt,o as De,p as at,q as Me,r as ye,s as ae,t as Re}from"./chunk-NSIELNIY.js";import{b as oe,d as H}from"./chunk-2W6BEUGU.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-Y5IRBMLB.js";import{h as it}from"./chunk-DNJOKPEL.js";import{$b as xe,Ab as C,Bb as B,Cb as v,Eb as x,H as ke,Hc as I,Ic as ie,Kb as m,Lb as F,Mb as A,Mc as ve,Nc as Ve,Oc as Se,Pb as Ge,Qa as _,Qb as E,Rb as u,U as ge,Z as M,Zb as Ce,_b as me,ab as z,bc as Fe,da as p,ea as d,ec as U,fb as Ye,fc as be,gc as Ze,jc as w,kc as $,lc as k,na as g,rb as Qe,sb as y,sc as Be,tb as R,ub as Ie,vb as Le,wb as Ue,xb as f,yb as l,zb as a}from"./chunk-BTMXQPBB.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var we=class s{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ct(s,t){if(s&1){let e=x();l(0,"div",24)(1,"spk-form-field")(2,"label",25),A(3,7),a(),l(4,"input",26,0),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),d(i)}),E("focus",function(){p(e);let i=xe(5);return d(i.showPicker())}),a(),l(6,"spk-icon",27),U(7,"clock"),a()(),l(8,"spk-form-field"),C(9,"label",28),l(10,"input",29,1),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),d(i)}),E("focus",function(){p(e);let i=xe(11);return d(i.showPicker())}),a(),l(12,"spk-icon",27),U(13,"calendar"),a()()(),l(14,"div",24)(15,"spk-form-field")(16,"label",30),A(17,8),a(),l(18,"input",31),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),d(i)}),a()(),l(19,"spk-select",32)(20,"input",33),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),d(i)}),a()()(),l(21,"app-toggle-card",34),B(22,35),A(23,9),v(),l(24,"div",36)(25,"spk-toggle",19),m(26,10),l(27,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),d(i)}),a(),F(),a(),l(28,"spk-toggle",19),m(29,11),l(30,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),d(i)}),a(),F(),a(),l(31,"spk-toggle",19),m(32,12),l(33,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),d(i)}),a(),F(),a(),l(34,"spk-toggle",19),m(35,13),l(36,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),d(i)}),a(),F(),a(),l(37,"spk-toggle",19),m(38,14),l(39,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),d(i)}),a(),F(),a(),l(40,"spk-toggle",19),m(41,15),l(42,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),d(i)}),a(),F(),a(),l(43,"spk-toggle",19),m(44,16),l(45,"input",20),k("ngModelChange",function(i){p(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),d(i)}),a(),F(),a()()()}if(s&2){let e=u();_(4),w("ngModel",e.scheduleFields.nextTime().time),_(6),w("ngModel",e.scheduleFields.nextTime().date),_(8),w("ngModel",e.scheduleFields.runAgain().repeatValue),_(),f("options",e.unitOptions)("isClearable",!1),_(),w("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),f("disallowToggle",!0),_(6),w("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{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`}],te={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}}},Xe=class s{#e=M(J);#t=M(H);#i=M(oe);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let r;r=$localize`Next time`;let c;c=$localize`Run again every`;let T;T=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,c,T,S,O,P,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(l(0,"h3",17),A(1,2),a(),l(2,"div",18)(3,"spk-toggle",19),m(4,3),l(5,"input",20),k("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),a(),F(),a(),l(6,"p"),A(7,4),a()(),y(8,Ct,46,14),l(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),m(11,5),C(12,"spk-icon"),F(),a(),l(13,"button",23),E("click",function(){return n.next()}),m(14,6),C(15,"spk-icon"),F(),a()()),e&2&&(_(5),w("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,Q,Ne,fe,Z,le,q,Ee,j,se,Y,Oe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(s,t){if(s&1&&(B(0,4),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class s{path=Ve.required();osType=Ve();pathChange=ve();remove=ve();internalPath=g("");pathType=g("-Expression");currentExpressionOption=I(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=I(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(l(0,"spk-select",0)(1,"input",1),k("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a()(),l(2,"spk-form-field",2)(3,"input",3),k("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),a(),l(6,"div",6),E("click",function(){return n.removeFilter()}),l(7,"spk-icon",7),U(8,"x-circle"),a()()),e&2){let i,o;f("options",n.expressionOptions())("isClearable",!1),_(),w("ngModel",n.pathType),_(2),w("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[ae,Q,Z,le,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(s,t){if(s&1){let e=x();l(0,"spk-form-field",42)(1,"input",43),k("ngModelChange",function(i){p(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),d(i)}),a()(),l(2,"button",44),E("click",function(){p(e);let i=u(2);return d(i.updatePath())}),l(3,"spk-icon"),U(4,"floppy-disk"),a()(),l(5,"button",44),E("click",function(){p(e);let i=u(2);return d(i.cancelEditPath())}),l(6,"spk-icon"),U(7,"x-bold"),a()()}if(s&2){let e=u(2);_(),w("ngModel",e.editingPath),f("ngModelOptions",Be(2,ct))}}function At(s,t){if(s&1){let e=x();l(0,"spk-form-field",42),C(1,"input",45),a(),l(2,"button",44),E("click",function(){p(e);let i=u().$implicit,o=u();return d(o.editPath(i))}),l(3,"spk-icon"),U(4,"pen"),a()(),l(5,"button",44),E("click",function(){p(e);let i=u().$implicit,o=u();return d(o.removePath(i))}),l(6,"spk-icon"),U(7,"trash-simple"),a()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),f("ngModel",e)("ngModelOptions",Be(3,ct))}}function ht(s,t){if(s&1&&(l(0,"div",30),y(1,ft,8,3)(2,At,8,4),a()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=x();l(0,"app-new-filter",47),E("pathChange",function(i){let o=p(e).$index,r=u(2);return d(r.patchPathAt(i,o))})("remove",function(){let i=p(e).$index,o=u(2);return d(o.removePathAt(i))}),a()}if(s&2){let e=t.$implicit,n=u(2);f("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Le(0,Pt,1,2,"app-new-filter",46,Ie),s&2){let e=u();Ue(e.pathArray())}}function Dt(s,t){if(s&1&&(l(0,"div",41)(1,"spk-form-field"),C(2,"input",48),a(),l(3,"spk-select",49),C(4,"input",50),a()()),s&2){let e=u();_(3),f("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),He=class s{#e=M(J);#t=M(H);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=I(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=g(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=I(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=I(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=g(null);editingPath=g(null);addingNewPath=g(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().map((c,T)=>T===e?`${t}`:`${c}`).join("\0"),r=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(r)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,c)=>c!==t).join("\0"),o=[n,i].filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}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 t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,Tt,5),e&2&&me()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let c;c=$localize`Folder path`;let T;T=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let h;h=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,c,T,S,O,P,L,K,b,X,D,ee,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",h,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();l(0,"form",16,0),E("submit",function(){return p(i),d(n.next())}),l(2,"div",17)(3,"h3",18),A(4,1),a(),l(5,"app-file-tree",19)(6,"label",20),A(7,2),a(),C(8,"input",21),a(),l(9,"div",22)(10,"button",23),E("click",function(){return p(i),d(n.goBack())}),m(11,3),C(12,"spk-icon"),F(),a(),l(13,"button",24),m(14,4),C(15,"spk-icon"),F(),a()()(),l(16,"div",25)(17,"app-toggle-card",26),B(18,27),A(19,5),v(),l(20,"p",28),A(21,6),a(),l(22,"div",29),Le(23,ht,3,1,"div",30,Ie),l(25,"div",31)(26,"spk-form-field"),C(27,"input",32),a(),l(28,"button",33),E("click",function(){return p(i),d(n.addNewPath())}),l(29,"spk-icon"),U(30,"plus"),a()()()()(),l(31,"app-toggle-card",26),B(32,27),A(33,7),v(),l(34,"p",28),A(35,8),a(),l(36,"button",34),E("click",function(){return p(i),d(n.addFilter())}),A(37,9),a(),y(38,Nt,2,0),a(),l(39,"app-toggle-card",35),B(40,27),A(41,10),v(),l(42,"p",28),A(43,11),a(),l(44,"spk-toggle",36),m(45,12),C(46,"input",37),F(),a(),l(47,"spk-toggle",36),m(48,13),C(49,"input",38),F(),a(),l(50,"spk-toggle",36),m(51,14),C(52,"input",39),F(),a(),l(53,"spk-toggle",40),E("click",function(){return p(i),d(n.toggleFilesLargerThan())}),A(54,15),a(),y(55,Dt,5,2,"div",41),a()()()}if(e&2){let i;f("formGroup",n.sourceDataForm),_(5),f("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),f("disallowToggle",!0),_(6),Ue(n.nonFilterPaths()),_(4),f("formControl",n.newPathCtrl),_(4),f("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),f("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[ae,Pe,Q,Ne,fe,Z,he,le,Re,lt,De,Me,at,q,j,se,Ee,Y,$e,ut,Oe],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-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(H);#t=M(Te);#i=M(et);#n=M(it);#s=M(we);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:g(te.autoRun),nextTime:g(te.nextTime),runAgain:g(te.runAgain)};settings=g([]);optionsFields={remoteVolumeSize:g("50MB"),backupRetention:g("all"),backupRetentionTime:g(""),backupRetentionVersions:g(0),backupRetentionCustom:g("")};targetUrlModel=g(null);backupMetadata=g(null);isDraft=g(!1);backupId=g(null);backupName=I(()=>this.generalFormSignal()?.name??"");isSubmitting=g(!1);finishedLoading=g(!1);backupDefaults=g(null);applicationOptions=g(null);isNew=I(()=>this.backupId()==="new");osType=I(()=>this.#t.systemInfo()?.OSType);selectedOptions=g([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=I(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=g("");#l=g(null);#a=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#l.asReadonly();#p=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#a;this.#a=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#l.set(null))});setTestState(t,e){this.#o.set(t),this.#l.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=I(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[de,...t]});nonSelectedOptions=I(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(c=>`${c.Include?"":"-"}${c.Expression}`)??[],i=t.Settings?.find(c=>c.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(c=>c.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",c=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",T={name:t.Name??"",description:t.Description??""};e&&e!==""&&(T.name=e),n&&n!==""&&(T.description=n),r&&r!==""&&(T.encryption=r),o&&o!==""&&(T.password=o,T.repeatPassword=o),c&&c!==""&&(T.compression=c),this.generalForm.patchValue(T)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,L])=>L).map(([P,L])=>P):[],c=n.path?.split("\0")??[],T=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,L])=>L&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&T.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&T.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(P=>!P.startsWith("-")),Settings:T,Filters:c.filter(P=>P.startsWith("-")).map((P,L)=>({Order:L,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==de.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:dt});break}let c=[...t,...n],T=this.settings().filter(S=>!c.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});return[...i,...o,...r,...T]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(l(0,"spk-alert",17),m(1,5),C(2,"spk-icon",26),F(),a())}function Ot(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function wt(s,t){if(s&1&&C(0,"spk-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),f("value",e.calculatePasswordStrength()*(100/5))}}function $t(s,t){s&1&&(l(0,"span",35),A(1,10),a())}function kt(s,t){s&1&&(m(0,8,1),C(1,"spk-icon"),F())}function It(s,t){s&1&&(m(0,8,2),C(1,"spk-icon"),F())}function Lt(s,t){s&1&&(m(0,11,1),C(1,"spk-icon",42),F())}function Ut(s,t){s&1&&(m(0,11,2),C(1,"spk-icon"),F())}function Gt(s,t){if(s&1){let e=x();l(0,"button",41),E("click",function(){p(e);let i=u(3);return d(i.copyPassword())}),m(1,11),y(2,Lt,2,0)(3,Ut,2,0),F(),a()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function xt(s,t){s&1&&(l(0,"spk-alert",39),A(1,12),a())}function bt(s,t){if(s&1){let e=x();l(0,"div",30)(1,"spk-form-field")(2,"label",31),m(3,7),C(4,"sup"),F(),a(),C(5,"input",32),a(),y(6,wt,1,9,"spk-progress-bar",33),l(7,"spk-form-field"),C(8,"input",34),y(9,$t,2,0,"span",35),a(),l(10,"div",36)(11,"button",37),E("click",function(){p(e);let i=u(2);return d(i.showPassword.set(!i.showPassword()))}),m(12,8),y(13,kt,2,0)(14,It,2,0),F(),a(),l(15,"button",37),E("click",function(){p(e);let i=u(2);return d(i.generatePassword())}),m(16,9),C(17,"spk-icon"),F(),a(),y(18,Gt,4,1,"button",38),a(),y(19,xt,2,0,"spk-alert",39),a()}if(s&2){let e=u(2);_(5),f("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),f("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(l(0,"spk-select",27)(1,"label",28),A(2,6),a(),C(3,"input",29),Ye(4,Ot,1,1,"ng-template"),a(),y(5,bt,20,7,"div",30)),s&2){let e=u();f("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function vt(s,t){if(s&1&&(l(0,"button",24),m(1,13),C(2,"spk-icon"),F(),a()),s&2){let e=u();f("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(l(0,"button",25),m(1,14),C(2,"spk-icon"),F(),a()),s&2){let e=u();f("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[Ae.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),compression:ne.control(s.compression)}),de={Key:"-",DisplayName:"None"},je=class s{#e=M(H);#t=M(oe);#i=M(rt);#n=M(J);#s=M(Te);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=g(!1);copiedPassword=g(!1);showCopyPassword=g(!1);noneOptionKey=de.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===de.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=I(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=I(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,yt,5),e&2&&me()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let T;T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let O;O=$localize`Encryption`;let P;P=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$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:`,b=Ge(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$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:`,ee=Ge(ee);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,c,T,O,K,b,X,D,ee,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();l(0,"form",15,0),E("submit",function(){return p(i),d(n.next())}),l(2,"h3",16),A(3,1),a(),y(4,Rt,3,0,"spk-alert",17),l(5,"spk-form-field")(6,"label",18),m(7,2),C(8,"sup"),F(),a(),C(9,"input",19),a(),l(10,"spk-form-field")(11,"label",20),A(12,3),a(),C(13,"textarea",21),a(),y(14,Bt,6,3),l(15,"div",22)(16,"button",23),E("click",function(){return p(i),d(n.exit())}),m(17,4),C(18,"spk-icon"),F(),a(),y(19,vt,3,1,"button",24)(20,Vt,3,1,"button",25),a()()}if(e&2){let i;f("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,he,De,Me,q,Y,se,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.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-8)}"],changeDetection:0})};export{gt as a,de as b,je as c,te as d,Xe as e,pt as f,He as g,J as h};
package/index.html CHANGED
@@ -63,5 +63,5 @@
63
63
  <body>
64
64
  <app-root></app-root>
65
65
  <div class="loading">Connecting ...</div>
66
- <link rel="modulepreload" href="chunk-V5YSQG4X.js"><link rel="modulepreload" href="chunk-QRRKPBY6.js"><link rel="modulepreload" href="chunk-WZRDKVOR.js"><link rel="modulepreload" href="chunk-ULLALJQ2.js"><link rel="modulepreload" href="chunk-J6BHRR34.js"><link rel="modulepreload" href="chunk-2BX65XJQ.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-6JQM2X3B.js"><link rel="modulepreload" href="chunk-WXARH2SG.js"><link rel="modulepreload" href="chunk-7QJG4IIT.js"><script src="polyfills-COBLRUJG.js" type="module"></script><script src="main-4FANBYAP.js" type="module"></script></body>
66
+ <link rel="modulepreload" href="chunk-V5YSQG4X.js"><link rel="modulepreload" href="chunk-QRRKPBY6.js"><link rel="modulepreload" href="chunk-WZRDKVOR.js"><link rel="modulepreload" href="chunk-ULLALJQ2.js"><link rel="modulepreload" href="chunk-J6BHRR34.js"><link rel="modulepreload" href="chunk-2BX65XJQ.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-6JQM2X3B.js"><link rel="modulepreload" href="chunk-WXARH2SG.js"><link rel="modulepreload" href="chunk-7QJG4IIT.js"><script src="polyfills-COBLRUJG.js" type="module"></script><script src="main-3QA34PNU.js" type="module"></script></body>
67
67
  </html>