@duplicati/ngclient 0.0.119 → 0.0.120
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.
- package/chunk-AZ2DJOXS.js +1 -0
- package/{chunk-PHIZVVHX.js → chunk-EXY7CUIT.js} +1 -1
- package/{chunk-7NBGN46A.js → chunk-FAY3FX6V.js} +1 -1
- package/{chunk-YW5R7NEG.js → chunk-HYHEAOIF.js} +1 -1
- package/{chunk-RXHYUPYG.js → chunk-IQFSWP4W.js} +2 -2
- package/{chunk-JRZGF4BZ.js → chunk-IX2G55AS.js} +1 -1
- package/{chunk-GYUN7KFJ.js → chunk-JBA24HSR.js} +1 -1
- package/{chunk-A6XWHATE.js → chunk-KKIWOA46.js} +1 -1
- package/{chunk-PKRMVTCU.js → chunk-LRRCO7FY.js} +1 -1
- package/chunk-LWC5O2JV.js +1 -0
- package/{chunk-4RIDBZOK.js → chunk-NUC2S6S3.js} +1 -1
- package/{chunk-4FUHLIJW.js → chunk-Q2WRB27A.js} +1 -1
- package/{chunk-DCYB2NQH.js → chunk-ST67LUCY.js} +1 -1
- package/{chunk-W4RKRM2O.js → chunk-UDYPOSWB.js} +1 -1
- package/{chunk-MUBWT5H2.js → chunk-VYJFDVMS.js} +1 -1
- package/{chunk-HHSMSBNM.js → chunk-Y3DJVXL2.js} +1 -1
- package/chunk-YKOEKIFQ.js +1 -0
- package/chunk-YYC22I2K.js +1 -0
- package/index.html +1 -1
- package/{main-PDJMO4FF.js → main-AYZBQHF7.js} +1 -1
- package/package.json +1 -1
- package/chunk-6WZGDK7U.js +0 -1
- package/chunk-ADO3ABTT.js +0 -1
- package/chunk-B64M2BXZ.js +0 -1
- package/chunk-HXN7IX3Q.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as jt,b as qt}from"./chunk-KHGD372Q.js";import{a as mt}from"./chunk-LDJVMU7P.js";import{a as Ke}from"./chunk-LJDOQTEF.js";import{a as dt,b as ht,c as ut}from"./chunk-
|
|
1
|
+
import{a as jt,b as qt}from"./chunk-KHGD372Q.js";import{a as mt}from"./chunk-LDJVMU7P.js";import{a as Ke}from"./chunk-LJDOQTEF.js";import{a as dt,b as ht,c as ut}from"./chunk-YKOEKIFQ.js";import{a as Wt,b as At,c as Ht}from"./chunk-NF3MS2YP.js";import{a as he}from"./chunk-XR4SRVOQ.js";import{a as Re}from"./chunk-WZRSQ7XL.js";import{a as q}from"./chunk-3AIKVVWP.js";import{a as zt,b as Ie,c as ie,d as ve,e as oe,f as Le,g as ct,h as ge,i as be,j as Ge,m as _t,n as Ue,o as pt,p as Xt,q as Ve,r as Ce,s as Te,t as Be}from"./chunk-5ENRUF35.js";import{b as me,d as se}from"./chunk-5LKXKKAK.js";import{A as we,C as st,a as ne,b as at,d as Bt,e as $e,g as Fe,l as le,o as Kt,p as rt,t as ce}from"./chunk-AL5KGNEF.js";import{h as lt}from"./chunk-FRSQ5NDX.js";import{ia as Vt}from"./chunk-M3WT5B3C.js";import{$a as ye,$b as vt,Ab as J,Bb as ee,Cb as te,Cc as Ze,Db as s,Eb as r,F as We,Fb as F,Gb as B,Hb as K,Ib as He,Jb as R,Pb as E,Pc as $,Qb as D,Qc as xe,Rb as O,Sb as it,T as Pe,Tb as ot,Ua as l,Ub as Ee,Vb as S,Wb as _,Xb as Rt,Yb as It,Z as P,cc as Lt,dc as bt,ea as u,ec as Gt,f as nt,fa as m,gb as Z,gc as Oe,hc as ke,ic as ae,jc as d,ka as $t,kc as Me,lb as g,lc as z,mc as Dt,oc as L,pc as b,qc as G,ra as Et,rc as je,sa as Ne,sc as De,tb as wt,tc as x,ub as p,uc as Ut,va as f,vc as qe,wb as ue,wc as Qe,yc as Ye,zb as C}from"./chunk-AHUC7M75.js";import{a as H,b as de,c as xt}from"./chunk-7CGTOI24.js";var nn=["fileInput"],on=[[["label"]]],an=["label"],Ft=class o{customId=Ne();content=f("");readonly=f(!1);placeholder=Ne("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=xe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&Lt(nn,5),e&2){let i;bt(i=Gt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Ut([{provide:zt,useExisting:o,multi:!0}])],ngContentSelectors:an,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,n){if(e&1){let i=R();Rt(on),It(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),S("click",function(){return u(i),m(n.triggerBrowse())}),E(3,1),F(4,"spk-icon"),D(),r()(),s(5,"div",4),S("drop",function(c){return u(i),m(n.onFileDrop(c))})("dragover",function(c){return u(i),m(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return u(i),b(n.content,c)||(n.content=c),m(c)}),r()(),s(7,"input",6,0),S("change",function(c){return u(i),m(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),L("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[Te,ie,oe,ge,ne,Fe],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var gt=class o{#n=P(lt);#t=P($e);#e=P(Re);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new nt(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new nt(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(t,e,n):this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleFolderCreated(t,e,n){this.#t.open(q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
2
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
3
|
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
5
|
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new nt(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ct=class o{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||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),m(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&m(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),m(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),m(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),m(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),m(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=R();s(0,"button",41),S("click",function(){d(e);let i=_(3);return u(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),f(e.copiedPassword()?2:3)}}function gn(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function Cn(o,t){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),m(4,"sup"),D(),r(),m(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),m(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),S("click",function(){d(e);let i=_(2);return u(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),S("click",function(){d(e);let i=_(2);return u(i.generatePassword())}),E(16,9),m(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,gn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),f(e.showPassword()?13:14),l(5),f(e.showCopyPassword()?18:-1),l(),f(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Tn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),m(3,"input",29),g(4,ln,1,1,"ng-template"),r(),g(5,Cn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),f(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),m(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),m(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Ht()]),password:ze.control(o.password,[At(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[At(t=>t?.value.encryption!=="",[ve.required])])}),Nt={Key:"",DisplayName:"None"},Pt=class o{#n=P(se);#t=P(me);#e=P(Wt);#i=P(_e);#o=P(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=T(!1);copiedPassword=T(!1);showCopyPassword=T(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(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)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Nt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,rn,5),e&2&&ke()},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 a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let V;V=$localize`Encryption`;let N;N=$localize`Password`;let w;w=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$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:`,j=Ee(j);let Q;Q=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let h;h=$localize`Passwords do not match`;let C;C=$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:`,C=Ee(C);let v;v=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let X;X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let W;return W=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,A,k,V,U,j,Q,h,C,v,X,W,["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",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"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=R();s(0,"form",15,0),S("submit",function(){return d(i),u(n.next())}),s(2,"h3",16),O(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),m(8,"sup"),D(),r(),m(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),m(13,"textarea",21),r(),g(14,Tn,6,3),s(15,"div",22)(16,"button",23),S("click",function(){return d(i),u(n.exit())}),E(17,4),m(18,"spk-icon"),D(),r(),g(19,fn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),f(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),f(n.isNew()?14:-1),l(5),f(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,be,ie,oe,Le,Ue,Ve,le,ce,Fe,ne,rt,at,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),u(i)}),S("focus",function(){d(e);let i=ae(5);return u(i.showPicker())}),r(),s(6,"spk-icon",27),F(7,"clock"),r()(),s(8,"spk-form-field"),m(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),u(i)}),S("focus",function(){d(e);let i=ae(11);return u(i.showPicker())}),r(),s(12,"spk-icon",27),F(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),u(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),u(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),u(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),u(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),u(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),u(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),u(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),u(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){d(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),u(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{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`}],Ae={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}}},yt=class o{#n=P(_e);#t=P(se);#e=P(me);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,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 a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Q;return Q=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,A,k,I,V,N,w,U,j,Q,[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&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),S("click",function(){return n.goBack()}),E(11,5),m(12,"spk-icon"),D(),r(),s(13,"button",23),S("click",function(){return n.next()}),E(14,6),m(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),f(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ie,Ge,Ie,oe,ge,le,we,ne,Fe,ce,Ke],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 hn(o,t){if(o&1&&(B(0,4),F(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(B(0,5),F(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{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"}],Tt=class o{path=Ne.required();osType=Ne();pathChange=Et();remove=Et();internalPath=T("");pathType=T("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(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||o)};static \u0275cmp=Z({type:o,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&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4)(5,An,2,1,"ng-container",5),r(),s(6,"div",6),S("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),F(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),f(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),f(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ie,oe,ge,ce,le,ne],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 Nn=["formRef"],Yt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){d(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),u(i)}),r()(),s(2,"button",44),S("click",function(){d(e);let i=_(2);return u(i.updatePath())}),s(3,"spk-icon"),F(4,"floppy-disk"),r()(),s(5,"button",44),S("click",function(){d(e);let i=_(2);return u(i.cancelEditPath())}),s(6,"spk-icon"),F(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",qe(2,Yt))}}function On(o,t){if(o&1){let e=R();s(0,"spk-form-field",42),m(1,"input",45),r(),s(2,"button",44),S("click",function(){d(e);let i=_().$implicit,a=_();return u(a.editPath(i))}),s(3,"spk-icon"),F(4,"pen"),r()(),s(5,"button",44),S("click",function(){d(e);let i=_().$implicit,a=_();return u(a.removePath(i))}),s(6,"spk-icon"),F(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",qe(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,yn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),f(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=R();s(0,"app-new-filter",47),S("pathChange",function(i){let a=d(e).$index,c=_(2);return u(c.patchPathAt(i,a))})("remove",function(){let i=d(e).$index,a=_(2);return u(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function xn(o,t){if(o&1&&ee(0,Mn,1,2,"app-new-filter",46,J),o&2){let e=_();te(e.pathArray())}}function $n(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),m(2,"input",48),r(),s(3,"spk-select",49),m(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Ot=class o{#n=P(_e);#t=P(se);#e=P(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=T(wn);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=T(null);editingPath=T(null);addingNewPath=T(!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 e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,A)=>A===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Nn,5),e&2&&ke()},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 a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let U;U=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Q;Q=$localize`Exclude`;let h;h=$localize`Choose if there’s any files you want to exclude.`;let C;C=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let v;v=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let y;y=$localize`Edit path`;let re;return re=$localize`Select an option...`,[["formRef",""],c,A,k,I,V,N,w,U,j,Q,h,C,v,X,W,[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",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,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",re]]},template:function(e,n){if(e&1){let i=R();s(0,"form",16,0),S("submit",function(){return d(i),u(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),m(8,"input",21),r(),s(9,"div",22)(10,"button",23),S("click",function(){return d(i),u(n.goBack())}),E(11,3),m(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),m(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),ee(23,kn,3,1,"div",30,J),s(25,"div",31)(26,"spk-form-field"),m(27,"input",32),r(),s(28,"button",33),S("click",function(){return d(i),u(n.addNewPath())}),s(29,"spk-icon"),F(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),S("click",function(){return d(i),u(n.addFilter())}),O(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),m(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),m(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),m(52,"input",39),D(),r(),s(53,"spk-toggle",40),S("click",function(){return d(i),u(n.toggleFilesLargerThan())}),O(54,15),r(),g(55,$n,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),te(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),f((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),f(n.filesLargerThan()?55:-1)}},dependencies:[Te,be,ie,Ge,Ie,oe,Le,ge,Be,_t,Ue,Ve,pt,le,ne,Fe,we,ce,Tt,mt,Ke],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 Jt="1W:1D,4W:1W,12M:1M",Se=new Ce,_e=class o{#n=P(se);#t=P(Re);#e=P($e);#i=P(lt);#o=P(Ct);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:T(Ae.autoRun),nextTime:T(Ae.nextTime),runAgain:T(Ae.runAgain)};destinationForm=en();settings=T([]);optionsFields={remoteVolumeSize:T("50MB"),backupRetention:T("all"),backupRetentionTime:T(""),backupRetentionVersions:T(0),backupRetentionCustom:T("")};isDraft=T(!1);backupId=T(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=T(!1);finishedLoading=T(!1);backupDefaults=T(null);applicationOptions=T(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=T([]);selectedAdvancedFormPair=T([]);destinationFormPair=T({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=T([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Nt,...t]});nonSelectedOptions=$(()=>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));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?ht(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=ht(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},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(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,U])=>U).map(([w,U])=>w):[],k=n.path?.split("\0")??[],I=this.mapFormsToSettings(),V=Object.entries(n.excludes??{}).filter(([w,U])=>U&&w!=="filesLargerThan").map(([w])=>w),N=n.excludes?.filesLargerThan;return V.length&&I.push({Name:"--exclude-files-attributes",Value:V.join(",")}),N&&N.size!==null&&N.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:I,Filters:k.filter(w=>w.startsWith("-")).map((w,U)=>({Order:U,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}: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"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],A=this.settings().filter(k=>!c.includes(k.Name)).map(k=>{let I=k.Value;return typeof k.Value=="number"&&(I=k.Value.toString()),typeof k.Value=="boolean"&&(I=k.Value?"True":"False"),{Name:k.Name,Value:I}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>dt(e.value))}#p(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]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=ut.find(h=>h.customKey===t||h.key===t),a=i?.key,c=this.destinationOptions().find(h=>h.Key===a),A=this.httpOptions();if(!c||!c.Options)return;let k=i&&i.oauthField?i.oauthField:null,I=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=Se.group({}),j=Se.group({}),Q=Se.group({});I&&Object.entries(I).forEach(([h,C],v)=>{let y=C,{formElement:X}=y,W=xt(y,["formElement"]);U.addControl(h,X(e?.custom[h])),this.destinationFormPair.update(re=>(re.custom.push(H({order:900+v},W)),re))});for(let h=0;h<c.Options.length;h++){let C=c.Options[h];if(C.Deprecated)continue;let v=V.find(X=>X===C.Name||C.Aliases?.includes(X.name)||X.name===C.Name);if(v){let X=C.Aliases?.indexOf(v.name)??-1,W=C.Aliases&&X>-1?C.Aliases[X]:C.Name,y=v&&typeof v!="string",re=y?v?.defaultValue??C.DefaultValue:C.DefaultValue,M={name:W,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+h},Xe=y?H(H({},M),v):M,Y=e?.dynamic[W]??re??C.DefaultValue;this.createFormField(j,Xe,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(Xe),Mt))}else{if(w.find(Y=>Y===C.Name))continue;let W=N.find(Y=>Y===C.Name||Y.name===C.Name),y=W&&typeof W!="string",re=e?.advanced[C.Name],M=re??C.DefaultValue,Xe={name:C.Name,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:M,order:900+h},tt=y?H(H({},Xe),W):Xe;n&&re&&(this.createFormField(Q,tt,M),this.selectedAdvancedFormPair.update(Y=>(Y.push(tt),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(tt),Y))}}for(let h=0;h<A.length;h++){let C=A[h],v=e?.advanced[C.name],X=v??C.defaultValue;n&&v&&(this.createFormField(Q,C,X),this.selectedHttpOptions.update(W=>(W.push(C),W)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((C,v)=>C.order-v.order),dynamic:h.dynamic.sort((C,v)=>C.order-v.order),advanced:h.advanced.sort((C,v)=>C.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:U,dynamicGroup:j,advancedGroup:Q}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),St=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),bn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),Gn=()=>({maxWidth:"700px",width:"100%"});function Un(o,t){o&1&&(E(0,5,2),m(1,"spk-icon"),D())}function Vn(o,t){o&1&&O(0,5,3)}function Bn(o,t){if(o&1){let e=R();E(0,5,1),s(1,"button",21),S("click",function(){d(e);let i=_();return u(i.testDestination())}),g(2,Un,2,0)(3,Vn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),f(e.successfulTest()?2:3)}}function Kn(o,t){if(o&1){let e=R();s(0,"p",27),S("click",function(){d(e);let i=_();return u(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),m(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=_();l(4),it((e=n.selectedDestinationType())==null?null:e.displayName),ot(1)}}function zn(o,t){if(o&1){let e=R();s(0,"div",34),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addDestinationFormGroup(i.key))}),s(1,"h3"),F(2),r(),s(3,"p"),F(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Xn(o,t){if(o&1){let e=R();s(0,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addDestinationFormGroup(i.key))}),F(2),r()}if(o&2){let e=t.$implicit;l(2),z(" ",e.displayName," ")}}function Wn(o,t){if(o&1&&(s(0,"div",29),ee(1,zn,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),ee(7,Xn,3,1,"button",33,J),K(),r()),o&2){let e=_();l(),te(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),te(e.destinationTypeOptionsNotFocused())}}function Hn(o,t){o&1&&He(0)}function jn(o,t){if(o&1&&g(0,Hn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){o&1&&He(0)}function Qn(o,t){if(o&1&&g(0,qn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Yn(o,t){if(o&1){let e=R();E(0,10,1),s(1,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function Zn(o,t){o&1&&He(0)}function Jn(o,t){if(o&1&&g(0,Zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ei(o,t){if(o&1){let e=R();E(0,11,1),s(1,"button",35,1),S("click",function(){let i=d(e).$implicit,a=_(2);return u(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function ti(o,t){o&1&&He(0)}function ni(o,t){if(o&1&&g(0,ti,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,bn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ii(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",48),F(2),g(3,ii,2,1,"spk-icon",49),r(),m(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ai(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ri(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",48),F(2),g(3,ai,2,1,"spk-icon",49),r(),m(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function si(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1&&(s(0,"spk-icon",54),F(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ci(o,t){o&1&&(s(0,"spk-icon",53),F(1,"envelope"),r())}function _i(o,t){o&1&&(s(0,"spk-icon",53),F(1,"textbox"),r())}function pi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),g(3,si,2,1,"spk-icon",49),r(),m(4,"input",51),je(5)(6)(7)(8),g(9,li,2,5,"spk-icon",52)(10,ci,2,0,"spk-icon",53)(11,_i,2,0,"spk-icon",53),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(c);l(3),De(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function di(o,t){if(o&1){let e=R();s(0,"span",58),S("click",function(){d(e);let i=_(2).$implicit,a=_(2);return u(a.oauthStartTokenCreation(i.destinationType,i))}),F(1," AuthID "),r()}}function ui(o,t){o&1&&(s(0,"spk-icon",53),F(1,"password"),r())}function mi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){d(e);let i=_(2).$implicit;return u(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye "),r()}}function Fi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){d(e);let i=_(2).$implicit;return u(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye-slash "),r()}}function gi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),r(),m(3,"input",55),g(4,di,2,0,"span",56)(5,ui,2,0,"spk-icon",53)(6,mi,2,0,"spk-icon",57)(7,Fi,2,0,"spk-icon",57),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),f(e.oauthField===e.formView.name?4:5),l(2),f(e.formView.showPassword?6:7)}}function Ci(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ti(o,t){if(o&1&&F(0),o&2){let e=_().$implicit;Dt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function fi(o,t){if(o&1&&F(0),o&2){let e=_().$implicit;z(" ",e," ")}}function Si(o,t){if(o&1&&g(0,Ti,1,2)(1,fi,1,1),o&2){let e=_(3).$implicit;f(e.formView.loadOptions?0:1)}}function Ei(o,t){if(o&1&&(s(0,"spk-select",60)(1,"label",48),F(2),g(3,Ci,2,1,"spk-icon",49),r(),m(4,"input",50),r(),g(5,Si,2,1,"ng-template",null,3,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Di(o,t){if(o&1&&(je(0),g(1,Ei,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:-1)}}function hi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ai(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;Dt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Pi(o,t){if(o&1&&(s(0,"spk-select",62)(1,"label",48),F(2),g(3,hi,2,1,"spk-icon",49),r(),m(4,"input",50),r(),g(5,Ai,1,2,"ng-template",null,4,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Ni(o,t){o&1&&m(0,"spk-progress-bar",61)}function yi(o,t){if(o&1&&(je(0),g(1,Pi,7,9)(2,Ni,1,0,"spk-progress-bar",61)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:2)}}function Oi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ki(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",48),F(2),g(3,Oi,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Mi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function xi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),F(2),g(3,Mi,2,1,"spk-icon",49),r(),m(4,"input",63),s(5,"spk-icon",53),F(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function $i(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function wi(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",48),F(2),g(3,$i,2,1,"spk-icon",49),r(),m(4,"input",64),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ri(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ii(o,t){if(o&1&&F(0),o&2){let e=t.$implicit;z(" ",e," ")}}function vi(o,t){if(o&1&&(s(0,"spk-select",65)(1,"label",48),F(2),g(3,Ri,2,1,"spk-icon",49),r(),m(4,"input",66),r(),g(5,Ii,1,1,"ng-template",null,4,Ze)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),vt("for","destination-",n.formGroupName,"-",n.index,""),l(),z(" ",i," "),l(),f(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function Li(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function bi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",48),F(2),g(3,Li,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Gi(o,t){if(o&1&&(s(0,"spk-icon",49),F(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ui(o,t){if(o&1&&(s(0,"app-file-drop-textarea",47)(1,"label"),F(2),g(3,Gi,2,1,"spk-icon",49),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),z(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),f(n.formView.longDescription?3:-1)}}function Vi(o,t){if(o&1){let e=R();s(0,"button",67),S("click",function(){d(e);let i=_().$implicit,a=_(2);return u(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),F(2,"x-circle"),r()()}}function Bi(o,t){if(o&1&&(s(0,"div",41),B(1,42),je(2)(3),g(4,oi,5,11,"app-file-tree",43)(5,ri,5,7,"app-file-tree",44)(6,pi,12,9,"spk-form-field")(7,gi,8,7,"spk-form-field")(8,Di,2,2)(9,yi,3,2)(10,ki,4,6,"app-size",45)(11,xi,7,5,"spk-form-field")(12,wi,5,5,"spk-toggle",46)(13,vi,7,9)(14,bi,4,6,"app-timespan",45)(15,Ui,4,5,"app-file-drop-textarea",47),K(),g(16,Vi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),De((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),De("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),f(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),f(n.formGroupName==="advanced"?16:-1)}}function Ki(o,t){if(o&1&&(B(0,22)(1,36),ee(2,jn,1,9,"ng-container",null,J),ee(4,Qn,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),B(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),r(),B(12,20),ee(13,Yn,3,1,"button",33,J),K(),r(),D(),K(),ee(15,Jn,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),B(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),r(),B(23,20),ee(24,ei,3,1,"button",33,J),K(),r(),D(),K(),ee(26,ni,1,9,"ng-container",null,J),r(),g(28,Bi,17,7,"ng-template",null,2,Ze),K()()),o&2){let e=_();l(2),te(e.destinationFormPair().custom),l(2),te(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),te(e.notSelectedAdvancedFormPair()),l(2),te(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),te(e.notSelectedHttpOptions()),l(2),te(e.selectedHttpOptions())}}function zi(o,t){if(o&1){let e=R();s(0,"spk-dialog",68),G("isOpenChange",function(i){d(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),u(i)}),s(1,"header",69)(2,"h2"),O(3,12),r(),s(4,"spk-alert",70),O(5,13),r()(),s(6,"div",71)(7,"spk-form-field"),m(8,"textarea",72),r()(),s(9,"footer",73)(10,"button",24),S("click",function(){d(e);let i=_();return u(i.closeTargetUrlDialog(!1))}),F(11,"Cancel"),r(),s(12,"button",74),S("click",function(){d(e);let i=_();return u(i.closeTargetUrlDialog(!0))}),E(13,14),m(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",qe(3,Gn)),l(8),p("formControl",e.targetUrlCtrl)}}var ft=new Ce,en=(o={destinations:[]})=>ft.group({destinations:ft.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>ft.group({destinationType:ft.control(o),custom:t,dynamic:e,advanced:n}),kt=class o{#n=P(se);#t=P(me);#e=P(_e);#i=P($e);#o=P(gt);injector=P($t);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=T(!1);testLoading=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(ut.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return dt(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=T("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=T(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=T(!1);#l=T(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,c=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,I=screen.height/2-c/2,V=window.open(A,"_blank","height="+c+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+I);return window.addEventListener("message",N=>{let w=N.data.startsWith("authid:"),U=w?N.data.replace("authid:",""):null;console.log("event",N),w&&(n.setValue(U),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Rn,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ee(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$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 a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ee(c);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ee(A);let k;k=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,A,k,I,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return d(i),u(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),g(6,Bn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),m(9,"spk-icon"),r(),B(10,20),s(11,"button",21),S("click",function(){return d(i),u(n.openTargetUrlDialog())}),m(12,"spk-icon"),r(),K(),r()(),D(),r(),g(13,Kn,5,1,"p"),r(),g(14,Wn,9,1)(15,Ki,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),S("click",function(){return d(i),u(n.goBack())}),E(18,6),m(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),m(22,"spk-icon"),D(),r()()(),g(23,zi,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),f(n.destinationCount()>0?6:-1),l(7),f(n.destinationCount()>0?13:-1),l(),f(n.destinationCount()===0?14:-1),l(),f(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),f(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,be,ie,Ge,Ie,oe,Le,_t,Ue,Ve,pt,Xt,Vt,le,Kt,ne,we,Bt,at,ce,st,rt,qt,Ke,mt,Ft,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,en as b,tn as c,kt as d,Qt as e,Nt as f,Pt as g,Ae as h,yt as i,Zt as j,Ot as k,_e as l};
|
|
6
|
+
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new nt(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],A=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,A);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ct=class o{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||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var rn=["formRef"];function sn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),F(2,"spk-icon",26),D(),r())}function ln(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function cn(o,t){if(o&1&&F(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function _n(o,t){o&1&&(s(0,"span",35),O(1,10),r())}function pn(o,t){o&1&&(E(0,8,1),F(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,8,2),F(1,"spk-icon"),D())}function un(o,t){o&1&&(E(0,11,1),F(1,"spk-icon",42),D())}function mn(o,t){o&1&&(E(0,11,2),F(1,"spk-icon"),D())}function Fn(o,t){if(o&1){let e=R();s(0,"button",41),S("click",function(){u(e);let i=_(3);return m(i.copyPassword())}),E(1,11),g(2,un,2,0)(3,mn,2,0),D(),r()}if(o&2){let e=_(3);l(2),C(e.copiedPassword()?2:3)}}function gn(o,t){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function Cn(o,t){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),F(4,"sup"),D(),r(),F(5,"input",32),r(),g(6,cn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),F(8,"input",34),g(9,_n,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),S("click",function(){u(e);let i=_(2);return m(i.showPassword.set(!i.showPassword()))}),E(12,8),g(13,pn,2,0)(14,dn,2,0),D(),r(),s(15,"button",37),S("click",function(){u(e);let i=_(2);return m(i.generatePassword())}),E(16,9),F(17,"spk-icon"),D(),r(),g(18,Fn,4,1,"button",38),r(),g(19,gn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),C(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),C(e.showPassword()?13:14),l(5),C(e.showCopyPassword()?18:-1),l(),C(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Tn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),F(3,"input",29),g(4,ln,1,1,"ng-template"),r(),g(5,Cn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),C(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Sn(o,t){if(o&1&&(s(0,"button",25),E(1,14),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,Qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Ht()]),password:ze.control(o.password,[At(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[At(t=>t?.value.encryption!=="",[ve.required])])}),Nt={Key:"",DisplayName:"None"},Pt=class o{#n=P(se);#t=P(me);#e=P(Wt);#i=P(_e);#o=P(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=f(!1);copiedPassword=f(!1);showCopyPassword=f(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(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)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[Nt,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,rn,5),e&2&&ke()},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 a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let A;A=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let V;V=$localize`Encryption`;let N;N=$localize`Password`;let w;w=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let j;j=$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:`,j=Ee(j);let Q;Q=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let h;h=$localize`Passwords do not match`;let T;T=$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:`,T=Ee(T);let v;v=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let X;X=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let W;return W=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,A,k,V,U,j,Q,h,T,v,X,W,["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",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"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=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"h3",16),O(3,1),r(),g(4,sn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),F(8,"sup"),D(),r(),F(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),F(13,"textarea",21),r(),g(14,Tn,6,3),s(15,"div",22)(16,"button",23),S("click",function(){return u(i),m(n.exit())}),E(17,4),F(18,"spk-icon"),D(),r(),g(19,fn,3,1,"button",24)(20,Sn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),C(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),C(n.isNew()?14:-1),l(5),C(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,be,ie,oe,Le,Ue,Ve,le,ce,Fe,ne,rt,at,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function En(o,t){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),m(i)}),S("focus",function(){u(e);let i=ae(5);return m(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),F(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),m(i)}),S("focus",function(){u(e);let i=ae(11);return m(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),m(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),m(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),m(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),m(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),m(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),m(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),m(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),m(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),m(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Dn=[{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`}],Ae={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}}},yt=class o{#n=P(_e);#t=P(se);#e=P(me);unitOptions=Dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,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 a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Q;return Q=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,A,k,I,V,N,w,U,j,Q,[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&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),O(7,4),r()(),g(8,En,46,14),s(9,"div",21)(10,"button",22),S("click",function(){return n.goBack()}),E(11,5),F(12,"spk-icon"),D(),r(),s(13,"button",23),S("click",function(){return n.next()}),E(14,6),F(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),C(n.scheduleFields.autoRun()?8:-1))},dependencies:[Te,ie,Ge,Ie,oe,ge,le,we,ne,Fe,ce,Ke],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 hn(o,t){if(o&1&&(B(0,4),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function An(o,t){if(o&1&&(B(0,5),d(1),K()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Pn=[{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"}],Tt=class o{path=Ne.required();osType=Ne();pathChange=Et();remove=Et();internalPath=f("");pathType=f("-Expression");currentExpressionOption=$(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return Pn.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(H({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(H({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(H({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(H({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(H({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(H({},n),{startsWith:"*.",endsWith:""}):de(H({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(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||o)};static \u0275cmp=Z({type:o,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&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),S("ngModelChange",function(){return n.updateFilter()}),r(),g(4,hn,2,1,"ng-container",4)(5,An,2,1,"ng-container",5),r(),s(6,"div",6),S("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),C(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),C(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[Te,ie,oe,ge,ce,le,ne],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 Nn=["formRef"],Yt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){u(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),m(i)}),r()(),s(2,"button",44),S("click",function(){u(e);let i=_(2);return m(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_(2);return m(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",qe(2,Yt))}}function On(o,t){if(o&1){let e=R();s(0,"spk-form-field",42),F(1,"input",45),r(),s(2,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),S("click",function(){u(e);let i=_().$implicit,a=_();return m(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",qe(3,Yt))}}function kn(o,t){if(o&1&&(s(0,"div",30),g(1,yn,8,3)(2,On,8,4),r()),o&2){let e=t.$implicit,n=_();l(),C(n.oldPath()===e?1:2)}}function Mn(o,t){if(o&1){let e=R();s(0,"app-new-filter",47),S("pathChange",function(i){let a=u(e).$index,c=_(2);return m(c.patchPathAt(i,a))})("remove",function(){let i=u(e).$index,a=_(2);return m(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function xn(o,t){if(o&1&&ee(0,Mn,1,2,"app-new-filter",46,J),o&2){let e=_();te(e.pathArray())}}function $n(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),F(2,"input",48),r(),s(3,"spk-select",49),F(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var pe=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Zt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(o.path),excludes:pe.group({hidden:pe.control(o.excludes.hidden),system:pe.control(o.excludes.system),temporary:pe.control(o.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),Ot=class o{#n=P(_e);#t=P(se);#e=P(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=f(wn);osType=this.#n.osType;pathSignal=he(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=f(null);editingPath=f(null);addingNewPath=f(!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 e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,A)=>A===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Nn,5),e&2&&ke()},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 a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let N;N=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let U;U=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let Q;Q=$localize`Exclude`;let h;h=$localize`Choose if there’s any files you want to exclude.`;let T;T=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let v;v=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let X;X=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let y;y=$localize`Edit path`;let re;return re=$localize`Select an option...`,[["formRef",""],c,A,k,I,V,N,w,U,j,Q,h,T,v,X,W,[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",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",y,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",re]]},template:function(e,n){if(e&1){let i=R();s(0,"form",16,0),S("submit",function(){return u(i),m(n.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),F(8,"input",21),r(),s(9,"div",22)(10,"button",23),S("click",function(){return u(i),m(n.goBack())}),E(11,3),F(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),F(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),ee(23,kn,3,1,"div",30,J),s(25,"div",31)(26,"spk-form-field"),F(27,"input",32),r(),s(28,"button",33),S("click",function(){return u(i),m(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),S("click",function(){return u(i),m(n.addFilter())}),O(37,9),r(),g(38,xn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),E(45,12),F(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),F(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),F(52,"input",39),D(),r(),s(53,"spk-toggle",40),S("click",function(){return u(i),m(n.toggleFilesLargerThan())}),O(54,15),r(),g(55,$n,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),te(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),C((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),C(n.filesLargerThan()?55:-1)}},dependencies:[Te,be,ie,Ge,Ie,oe,Le,ge,Be,_t,Ue,Ve,pt,le,ne,Fe,we,ce,Tt,mt,Ke],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 Jt="1W:1D,4W:1W,12M:1M",Se=new Ce,_e=class o{#n=P(se);#t=P(Re);#e=P($e);#i=P(lt);#o=P(Ct);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:f(Ae.autoRun),nextTime:f(Ae.nextTime),runAgain:f(Ae.runAgain)};destinationForm=en();settings=f([]);optionsFields={remoteVolumeSize:f("50MB"),backupRetention:f("all"),backupRetentionTime:f(""),backupRetentionVersions:f(0),backupRetentionCustom:f("")};isDraft=f(!1);backupId=f(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=f(!1);finishedLoading=f(!1);backupDefaults=f(null);applicationOptions=f(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=f([]);selectedAdvancedFormPair=f([]);destinationFormPair=f({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});selectedHttpOptions=f([]);notSelectedHttpOptions=$(()=>{let t=this.httpOptions(),e=this.selectedHttpOptions()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=he(this.sourceDataForm.valueChanges);destinationFormSignal=he(this.destinationForm.valueChanges);generalFormSignal=he(this.generalForm.valueChanges);encryptionFieldSignal=he(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(t=>t.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=$(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[Nt,...t]});nonSelectedOptions=$(()=>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));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addHttpOptionByName(t,e,n){let i=this.notSelectedHttpOptions().find(a=>a.name===t);i&&this.addHttpOption(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}addHttpOption(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==t.name),i))}removeHttpOption(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedHttpOptions.update(n=>(n=n.filter(i=>i.name!==t.name),n))}submit(){this.isSubmitting.set(!0);let t=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:t}).pipe(We(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.exit(!1)},error:n=>{}})}exit(t){if(!t){this.#_(),this.#n.navigate(["/"]);return}this.#e.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#s(),setTimeout(()=>{this.#r(t)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=t.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?ht(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(t){let e=ht(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>H(H({},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(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Jt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,U])=>U).map(([w,U])=>w):[],k=n.path?.split("\0")??[],I=this.mapFormsToSettings(),V=Object.entries(n.excludes??{}).filter(([w,U])=>U&&w!=="filesLargerThan").map(([w])=>w),N=n.excludes?.filesLargerThan;return V.length&&I.push({Name:"--exclude-files-attributes",Value:V.join(",")}),N&&N.size!==null&&N.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:I,Filters:k.filter(w=>w.startsWith("-")).map((w,U)=>({Order:U,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}: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"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Jt});break}let c=[...t,...n],A=this.settings().filter(k=>!c.includes(k.Name)).map(k=>{let I=k.Value;return typeof k.Value=="number"&&(I=k.Value.toString()),typeof k.Value=="boolean"&&(I=k.Value?"True":"False"),{Name:k.Name,Value:I}});return[...i,...a,...A]}#c(t){return t.controls.map(e=>dt(e.value))}#p(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]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=ut.find(h=>h.customKey===t||h.key===t),a=i?.key,c=this.destinationOptions().find(h=>h.Key===a),A=this.httpOptions();if(!c||!c.Options)return;let k=i&&i.oauthField?i.oauthField:null,I=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],N=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let U=Se.group({}),j=Se.group({}),Q=Se.group({});I&&Object.entries(I).forEach(([h,T],v)=>{let y=T,{formElement:X}=y,W=xt(y,["formElement"]);U.addControl(h,X(e?.custom[h])),this.destinationFormPair.update(re=>(re.custom.push(H({order:900+v},W)),re))});for(let h=0;h<c.Options.length;h++){let T=c.Options[h];if(T.Deprecated)continue;let v=V.find(X=>X===T.Name||T.Aliases?.includes(X.name)||X.name===T.Name);if(v){let X=T.Aliases?.indexOf(v.name)??-1,W=T.Aliases&&X>-1?T.Aliases[X]:T.Name,y=v&&typeof v!="string",re=y?v?.defaultValue??T.DefaultValue:T.DefaultValue,M={name:W,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,order:900+h},Xe=y?H(H({},M),v):M,Y=e?.dynamic[W]??re??T.DefaultValue;this.createFormField(j,Xe,Y),this.destinationFormPair.update(Mt=>(Mt.dynamic.push(Xe),Mt))}else{if(w.find(Y=>Y===T.Name))continue;let W=N.find(Y=>Y===T.Name||Y.name===T.Name),y=W&&typeof W!="string",re=e?.advanced[T.Name],M=re??T.DefaultValue,Xe={name:T.Name,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,defaultValue:M,order:900+h},tt=y?H(H({},Xe),W):Xe;n&&re&&(this.createFormField(Q,tt,M),this.selectedAdvancedFormPair.update(Y=>(Y.push(tt),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(tt),Y))}}for(let h=0;h<A.length;h++){let T=A[h],v=e?.advanced[T.name],X=v??T.defaultValue;n&&v&&(this.createFormField(Q,T,X),this.selectedHttpOptions.update(W=>(W.push(T),W)))}this.destinationFormPair.update(h=>({oauthField:h.oauthField,custom:h.custom.sort((T,v)=>T.order-v.order),dynamic:h.dynamic.sort((T,v)=>T.order-v.order),advanced:h.advanced.sort((T,v)=>T.order-v.order)})),this.destinationForm.controls.destinations.push(tn({key:i?.customKey??t,customGroup:U,dynamicGroup:j,advancedGroup:Q}))}#_(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ae.autoRun),this.scheduleFields.nextTime.set(Ae.nextTime),this.scheduleFields.runAgain.set(Ae.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"})};var Rn=["formRef"],In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),St=o=>({$implicit:o}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),Ln=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),bn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),Gn=()=>({maxWidth:"700px",width:"100%"});function Un(o,t){o&1&&(E(0,5,2),F(1,"spk-icon"),D())}function Vn(o,t){o&1&&O(0,5,3)}function Bn(o,t){if(o&1){let e=R();E(0,5,1),s(1,"button",21),S("click",function(){u(e);let i=_();return m(i.testDestination())}),g(2,Un,2,0)(3,Vn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),C(e.successfulTest()?2:3)}}function Kn(o,t){if(o&1){let e=R();s(0,"p",27),S("click",function(){u(e);let i=_();return m(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),F(2,"strong")(3,"br")(4,"span",28),D(),r()}if(o&2){let e,n=_();l(4),it((e=n.selectedDestinationType())==null?null:e.displayName),ot(1)}}function zn(o,t){if(o&1){let e=R();s(0,"div",34),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Xn(o,t){if(o&1){let e=R();s(0,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),z(" ",e.displayName," ")}}function Wn(o,t){if(o&1&&(s(0,"div",29),ee(1,zn,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),ee(7,Xn,3,1,"button",33,J),K(),r()),o&2){let e=_();l(),te(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),te(e.destinationTypeOptionsNotFocused())}}function Hn(o,t){o&1&&He(0)}function jn(o,t){if(o&1&&g(0,Hn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){o&1&&He(0)}function Qn(o,t){if(o&1&&g(0,qn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Yn(o,t){if(o&1){let e=R();E(0,10,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function Zn(o,t){o&1&&He(0)}function Jn(o,t){if(o&1&&g(0,Zn,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,Ln,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ei(o,t){if(o&1){let e=R();E(0,11,1),s(1,"button",35,1),S("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addHttpOption(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),it(e.name),ot(0)}}function ti(o,t){o&1&&He(0)}function ni(o,t){if(o&1&&g(0,ti,1,0,"ng-container",40),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(29),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",Qe(7,St,Ye(2,bn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function oi(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",48),d(2),g(3,ii,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ri(o,t){if(o&1&&(s(0,"app-file-tree",44)(1,"label",48),d(2),g(3,ai,2,1,"spk-icon",49),r(),F(4,"input",50),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function si(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1&&(s(0,"spk-icon",54),d(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function ci(o,t){o&1&&(s(0,"spk-icon",53),d(1,"envelope"),r())}function _i(o,t){o&1&&(s(0,"spk-icon",53),d(1,"textbox"),r())}function pi(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,si,2,1,"spk-icon",49),r(),F(4,"input",51),je(5)(6)(7)(8),g(9,li,2,5,"spk-icon",52)(10,ci,2,0,"spk-icon",53)(11,_i,2,0,"spk-icon",53),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),A=a.hasDoubleLeadingSlashes(c);l(3),De(A&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),De(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),C(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function di(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ui(o,t){if(o&1){let e=R();s(0,"span",58),S("click",function(){u(e);let i=_(2).$implicit,a=_(2);return m(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function mi(o,t){o&1&&(s(0,"spk-icon",53),d(1,"password"),r())}function Fi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function gi(o,t){if(o&1){let e=R();s(0,"spk-icon",59),S("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function Ci(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,di,2,1,"spk-icon",49),r(),F(4,"input",55),g(5,ui,2,0,"span",56)(6,mi,2,0,"spk-icon",53)(7,Fi,2,0,"spk-icon",57)(8,gi,2,0,"spk-icon",57),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),C(e.oauthField===e.formView.name?5:6),l(2),C(e.formView.showPassword?7:8)}}function Ti(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function fi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;Dt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Si(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;z(" ",e," ")}}function Ei(o,t){if(o&1&&g(0,fi,1,2)(1,Si,1,1),o&2){let e=_(3).$implicit;C(e.formView.loadOptions?0:1)}}function Di(o,t){if(o&1&&(s(0,"spk-select",60)(1,"label",48),d(2),g(3,Ti,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Ei,2,1,"ng-template",null,3,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function hi(o,t){if(o&1&&(je(0),g(1,Di,7,8)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:-1)}}function Ai(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Pi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;Dt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ni(o,t){if(o&1&&(s(0,"spk-select",62)(1,"label",48),d(2),g(3,Ai,2,1,"spk-icon",49),r(),F(4,"input",50),r(),g(5,Pi,1,2,"ng-template",null,4,Ze)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),z(" ",a," "),l(),C(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function yi(o,t){o&1&&F(0,"spk-progress-bar",61)}function Oi(o,t){if(o&1&&(je(0),g(1,Ni,7,9)(2,yi,1,0,"spk-progress-bar",61)),o&2){let e=_().$implicit,n=De(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),C(n?1:2)}}function ki(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Mi(o,t){if(o&1&&(s(0,"app-size",45)(1,"label",48),d(2),g(3,ki,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function xi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function $i(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",48),d(2),g(3,xi,2,1,"spk-icon",49),r(),F(4,"input",63),s(5,"spk-icon",53),d(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function wi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ri(o,t){if(o&1&&(s(0,"spk-toggle",46)(1,"label",48),d(2),g(3,wi,2,1,"spk-icon",49),r(),F(4,"input",64),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Ii(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function vi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;z(" ",e," ")}}function Li(o,t){if(o&1&&(s(0,"spk-select",65)(1,"label",48),d(2),g(3,Ii,2,1,"spk-icon",49),r(),F(4,"input",66),r(),g(5,vi,1,1,"ng-template",null,4,Ze)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),vt("for","destination-",n.formGroupName,"-",n.index,""),l(),z(" ",i," "),l(),C(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function bi(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Gi(o,t){if(o&1&&(s(0,"app-timespan",45)(1,"label",48),d(2),g(3,bi,2,1,"spk-icon",49),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),z(" ",n," "),l(),C(e.formView.longDescription?3:-1)}}function Ui(o,t){if(o&1&&(s(0,"spk-icon",49),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Vi(o,t){if(o&1&&(s(0,"app-file-drop-textarea",47)(1,"label"),d(2),g(3,Ui,2,1,"spk-icon",49),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),z(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),C(n.formView.longDescription?3:-1)}}function Bi(o,t){if(o&1){let e=R();s(0,"button",67),S("click",function(){u(e);let i=_().$implicit,a=_(2);return m(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function Ki(o,t){if(o&1&&(s(0,"div",41),B(1,42),je(2)(3),g(4,oi,5,11,"app-file-tree",43)(5,ri,5,7,"app-file-tree",44)(6,pi,12,9,"spk-form-field")(7,Ci,9,8,"spk-form-field")(8,hi,2,2)(9,Oi,3,2)(10,Mi,4,6,"app-size",45)(11,$i,7,5,"spk-form-field")(12,Ri,5,5,"spk-toggle",46)(13,Li,7,9)(14,Gi,4,6,"app-timespan",45)(15,Vi,4,5,"app-file-drop-textarea",47),K(),g(16,Bi,3,0,"button",32),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),De((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),De("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),C(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),C(n.formGroupName==="advanced"?16:-1)}}function zi(o,t){if(o&1&&(B(0,22)(1,36),ee(2,jn,1,9,"ng-container",null,J),ee(4,Qn,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),B(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),F(11,"spk-icon"),r(),B(12,20),ee(13,Yn,3,1,"button",33,J),K(),r(),D(),K(),ee(15,Jn,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),B(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),F(22,"spk-icon"),r(),B(23,20),ee(24,ei,3,1,"button",33,J),K(),r(),D(),K(),ee(26,ni,1,9,"ng-container",null,J),r(),g(28,Ki,17,7,"ng-template",null,2,Ze),K()()),o&2){let e=_();l(2),te(e.destinationFormPair().custom),l(2),te(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),te(e.notSelectedAdvancedFormPair()),l(2),te(e.selectedAdvancedFormPair()),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedHttpOptions().length===0),l(3),te(e.notSelectedHttpOptions()),l(2),te(e.selectedHttpOptions())}}function Xi(o,t){if(o&1){let e=R();s(0,"spk-dialog",68),G("isOpenChange",function(i){u(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),m(i)}),s(1,"header",69)(2,"h2"),O(3,12),r(),s(4,"spk-alert",70),O(5,13),r()(),s(6,"div",71)(7,"spk-form-field"),F(8,"textarea",72),r()(),s(9,"footer",73)(10,"button",24),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",74),S("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!0))}),E(13,14),F(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",qe(3,Gn)),l(8),p("formControl",e.targetUrlCtrl)}}var ft=new Ce,en=(o={destinations:[]})=>ft.group({destinations:ft.array(o.destinations)}),tn=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>ft.group({destinationType:ft.control(o),custom:t,dynamic:e,advanced:n}),kt=class o{#n=P(se);#t=P(me);#e=P(_e);#i=P($e);#o=P(gt);injector=P($t);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=f(!1);testLoading=f(!1);destinationTypeOptionsInFocus=f(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=f(ut.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=$(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=$(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}addHttpOption(t,e){this.#e.addHttpOption(t,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=f(null);targetUrlDialogOpen=f(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(We(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return dt(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=f("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=f(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=f(!1);#l=f(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,c=600,A=this.#a()+"?type="+t+"&token="+i,k=screen.width/2-a/2,I=screen.height/2-c/2,V=window.open(A,"_blank","height="+c+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+I);return window.addEventListener("message",N=>{let w=N.data.startsWith("authid:"),U=w?N.data.replace("authid:",""):null;console.log("event",N),w&&(n.setValue(U),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Rn,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ee(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$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 a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ee(c);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Ee(A);let k;k=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,A,k,I,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=R();s(0,"form",15,0),S("submit",function(){return u(i),m(n.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),g(6,Bn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),F(9,"spk-icon"),r(),B(10,20),s(11,"button",21),S("click",function(){return u(i),m(n.openTargetUrlDialog())}),F(12,"spk-icon"),r(),K(),r()(),D(),r(),g(13,Kn,5,1,"p"),r(),g(14,Wn,9,1)(15,zi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),S("click",function(){return u(i),m(n.goBack())}),E(18,6),F(19,"spk-icon"),D(),r(),s(20,"button",25),E(21,7),F(22,"spk-icon"),D(),r()()(),g(23,Xi,15,4,"spk-dialog",26)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),C(n.destinationCount()>0?6:-1),l(7),C(n.destinationCount()>0?13:-1),l(),C(n.destinationCount()===0?14:-1),l(),C(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),C(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,be,ie,Ge,Ie,oe,Le,_t,Ue,Ve,pt,Xt,Vt,le,Kt,ne,we,Bt,at,ce,st,rt,qt,Ke,mt,Ft,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,en as b,tn as c,kt as d,Qt as e,Nt as f,Pt as g,Ae as h,yt as i,Zt as j,Ot as k,_e as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b,g as c}from"./chunk-
|
|
1
|
+
import{e as a,f as b,g as c}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ae}from"./chunk-4LLC3Q7O.js";import{l as le}from"./chunk-
|
|
1
|
+
import{a as ae}from"./chunk-4LLC3Q7O.js";import{l as le}from"./chunk-IQFSWP4W.js";import{a as ie,b as se}from"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import{c as Z,e as J,h as ee,j as ne,s as te,t as oe}from"./chunk-5ENRUF35.js";import{b as V,d as q}from"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import{$a as v,Db as t,Eb as i,Fb as T,Jb as M,Pb as S,Pc as k,Qb as O,Rb as r,Ua as p,Vb as I,Wb as c,Z as C,ea as P,fa as f,gb as K,gc as U,hc as X,lb as N,oc as u,pc as d,qc as m,ub as g,va as x,vc as W,wb as G,zb as F}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,a){s&1&&(S(0,1,1),T(1,"spk-icon",20),O())}function ce(s,a){s&1&&(t(0,"p",20),r(1,6),i())}function ue(s,a){s&1&&(t(0,"p"),r(1,7),i())}function de(s,a){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,l)||(o.optionsFields.backupRetentionTime=l),f(l)}),t(3,"label",29),r(4,9),i()()}if(s&2){let n=c();p(2),g("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,a){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",30),r(4,11),i(),t(5,"input",31),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,l)||(o.optionsFields.backupRetentionVersions=l),f(l)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,a){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,a){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",32),r(6,15),i(),t(7,"input",33),m("ngModelChange",function(l){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,l)||(o.optionsFields.backupRetentionCustom=l),f(l)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var ge=["Bytes","KB","MB","GB","TB","PB"],Te=[{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(le);#n=C(q);#t=C(V);formRef=v.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=x(Te);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 a=this.sizeSplit().value,n=this.sizeSplit().unit;if(a==null||n===null||n===void 0)return!1;let e=a*Math.pow(1024,ge.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&&U(e.formRef,_e,5),n&2&&X()},decls:30,vars:15,consts:()=>{let a;a=$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 l;l=$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`,[a,n,e,l,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"],["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","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",20),t(9,"p"),S(10,2),t(11,"a",21),T(12,"spk-icon",22),i(),O(),i()(),t(13,"spk-select",23)(14,"label",19),r(15,3),i(),t(16,"input",24),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",25),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",26)(24,"button",27),I("click",function(){return e.goBack()}),S(25,4),T(26,"spk-icon"),O(),i(),t(27,"button",28),I("click",function(){return e.submit()}),S(28,5),T(29,"spk-icon"),O(),i()()()),n&2&&(p(4),g("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),g("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),g("applicationOptions",e.applicationOptions())("hiddenOptions",W(14,re)),p(5),G("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,ae,H,Y,j,ie,se,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-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as K}from"./chunk-Q6M5VRZV.js";import{a as H}from"./chunk-CZUGA62N.js";import"./chunk-VGAQB3OD.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import{
|
|
1
|
+
import{g as K}from"./chunk-Q6M5VRZV.js";import{a as H}from"./chunk-CZUGA62N.js";import"./chunk-VGAQB3OD.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import{b as j}from"./chunk-YYC22I2K.js";import"./chunk-HTX2RSBS.js";import{a as B}from"./chunk-OHZGASM5.js";import"./chunk-65UN5LE6.js";import"./chunk-WFM6YWRN.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import{a as z}from"./chunk-RSZISHXB.js";import"./chunk-5ENRUF35.js";import"./chunk-ZQSBINUM.js";import"./chunk-3XVU2YA6.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import{a as b,h as w,p as W,s as X}from"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import{ua as v}from"./chunk-M3WT5B3C.js";import{Ac as E,Db as i,Eb as s,Fb as p,Gb as m,Hb as P,Pb as L,Pc as M,Qb as A,Qc as I,Rb as _,Sb as D,Tb as x,Ua as l,Wb as u,Z as T,ga as $,gb as y,ha as G,jc as C,lb as g,mc as f,ub as O,va as h,zb as d,zc as R}from"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),C(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(C(0),R(1,"number"),R(2,"number")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(C(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=u();l(3),D((t=c.statusData())==null?null:t.statusText),x(2),l(2),O("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),d((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),d((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=I(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[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-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),d(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),O("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),O("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,W,X,b,w,j,z,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}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-check[_ngcontent-%COMP%]{position:relative;width:100px;height:100px;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:5px;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{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,k as b}from"./chunk-
|
|
1
|
+
import{j as a,k as b}from"./chunk-IQFSWP4W.js";import"./chunk-KHGD372Q.js";import"./chunk-LDJVMU7P.js";import"./chunk-LJDOQTEF.js";import"./chunk-YKOEKIFQ.js";import"./chunk-NF3MS2YP.js";import"./chunk-XR4SRVOQ.js";import"./chunk-WZRSQ7XL.js";import"./chunk-3AIKVVWP.js";import"./chunk-RHW5QVAY.js";import"./chunk-5ENRUF35.js";import"./chunk-5LKXKKAK.js";import"./chunk-HFNFJ7G2.js";import"./chunk-AL5KGNEF.js";import"./chunk-FRSQ5NDX.js";import"./chunk-M3WT5B3C.js";import"./chunk-AHUC7M75.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|