@duplicati/ngclient 0.0.136 → 0.0.138
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/assets/spk.woff2 +0 -0
- package/chunk-23ODVSFI.js +1 -0
- package/chunk-2D26BDYB.js +1 -0
- package/{chunk-Y5UKX3VC.js → chunk-3JKXOOME.js} +1 -1
- package/chunk-3ZVSHKLD.js +1 -0
- package/chunk-4DBVVUBO.js +1 -0
- package/chunk-5SXTGTAZ.js +1 -0
- package/chunk-64ZU74CD.js +1 -0
- package/chunk-6DSLFJ4T.js +1 -0
- package/chunk-74BJ4GVA.js +1 -0
- package/chunk-7IBACL6K.js +1 -0
- package/chunk-7QJG4IIT.js +1 -0
- package/{chunk-HDV3QKLN.js → chunk-AM7RYTIO.js} +1 -1
- package/{chunk-LKJ2SBQA.js → chunk-B6OIHB5W.js} +1 -1
- package/{chunk-LFMC622O.js → chunk-BQE7QZIT.js} +1 -1
- package/chunk-CCA5ZCEA.js +1 -0
- package/chunk-CF7KRXOR.js +1 -0
- package/chunk-DG7SFNGT.js +1 -0
- package/chunk-EMXIHCYQ.js +1 -0
- package/chunk-EN6226UP.js +1 -0
- package/chunk-GJXR776M.js +1 -0
- package/{chunk-X3RII7G2.js → chunk-GKOS3VYR.js} +1 -1
- package/chunk-H52UO57S.js +8 -0
- package/chunk-HDDYOVZL.js +1 -0
- package/chunk-HRSZZWTB.js +1 -0
- package/chunk-IZXB2EWT.js +1 -0
- package/{chunk-JM7VAPIC.js → chunk-J6BHRR34.js} +1 -1
- package/chunk-JI7GCFQB.js +1 -0
- package/chunk-KSQIUDEA.js +1 -0
- package/chunk-LPFSQKIK.js +1 -0
- package/{chunk-T5KDR4TA.js → chunk-M3CLGZMQ.js} +1 -1
- package/{chunk-7MV7VPDB.js → chunk-MMPTX6PS.js} +1 -1
- package/chunk-N57J64DN.js +3 -0
- package/chunk-NHAGSIVX.js +1 -0
- package/chunk-NS4PAVKI.js +1 -0
- package/chunk-NZ2KKCDC.js +1 -0
- package/{chunk-HU5PJ35D.js → chunk-OFFMLGEZ.js} +1 -1
- package/chunk-PZA4FRVJ.js +1 -0
- package/chunk-PZCO6IX3.js +1 -0
- package/{chunk-43A44MVC.js → chunk-QRRKPBY6.js} +1 -1
- package/chunk-RCKA5DTC.js +1 -0
- package/chunk-RNMBKZ6Y.js +3 -0
- package/chunk-ULLALJQ2.js +1 -0
- package/chunk-UT7GWYPR.js +1 -0
- package/{chunk-UFP4XKZF.js → chunk-UZK7ABRM.js} +1 -1
- package/chunk-V5YSQG4X.js +2 -0
- package/chunk-V6EWWEIG.js +1 -0
- package/chunk-V77N2OUE.js +1 -0
- package/chunk-WHFO4IFB.js +1 -0
- package/chunk-WZNH4JPF.js +1 -0
- package/chunk-WZRDKVOR.js +1 -0
- package/{chunk-XLKQSWFD.js → chunk-XIOHRQ3X.js} +1 -1
- package/{chunk-WF6EAWTW.js → chunk-ZI2XNFAW.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.cs.json +22 -1
- package/locale/messages.da.json +24 -1
- package/locale/messages.de.json +211 -22
- package/locale/messages.en_GB.json +24 -1
- package/locale/messages.es.json +25 -1
- package/locale/messages.fi.json +32 -3
- package/locale/messages.fr.json +20 -1
- package/locale/messages.hu.json +26 -3
- package/locale/messages.it.json +38 -24
- package/locale/messages.ja_JP.json +28 -1
- package/locale/messages.nl_NL.json +164 -20
- package/locale/messages.pl.json +20 -1
- package/locale/messages.pt.json +19 -1
- package/locale/messages.pt_BR.json +19 -1
- package/locale/messages.ru.json +33 -3
- package/locale/messages.sr_RS.json +32 -3
- package/locale/messages.sv_SE.json +32 -3
- package/locale/messages.zh-Hans.json +25 -9
- package/locale/messages.zh_CN.json +27 -18
- package/locale/messages.zh_TW.json +25 -3
- package/main-4FANBYAP.js +1 -0
- package/package.json +1 -1
- package/chunk-3B3CD5KI.js +0 -1
- package/chunk-42LUYQ5S.js +0 -1
- package/chunk-4NAIBN6Y.js +0 -1
- package/chunk-4WF2SEOM.js +0 -1
- package/chunk-6ABAW3RM.js +0 -1
- package/chunk-6JDDO2JR.js +0 -1
- package/chunk-6NTCVCCY.js +0 -1
- package/chunk-7HKUM56D.js +0 -1
- package/chunk-7N3LIJV6.js +0 -1
- package/chunk-B5ABLFSQ.js +0 -1
- package/chunk-D7KAEUGB.js +0 -1
- package/chunk-FCCV5HAI.js +0 -6
- package/chunk-FHZLYBIT.js +0 -1
- package/chunk-FUEIZLWH.js +0 -1
- package/chunk-FUZLIOUQ.js +0 -1
- package/chunk-FZG6OXT3.js +0 -1
- package/chunk-IQHBPLHL.js +0 -1
- package/chunk-J6SAG7QN.js +0 -1
- package/chunk-K6ISVHYD.js +0 -1
- package/chunk-L5Y36SCW.js +0 -1
- package/chunk-M3URTEVE.js +0 -2
- package/chunk-MVUGI7Y7.js +0 -1
- package/chunk-OHMTS3T7.js +0 -1
- package/chunk-P3AZ3DXZ.js +0 -1
- package/chunk-P4KFR7NY.js +0 -1
- package/chunk-P4KOC4NP.js +0 -1
- package/chunk-POGTGPHE.js +0 -1
- package/chunk-PVLT4ZGI.js +0 -1
- package/chunk-QECYPB3W.js +0 -1
- package/chunk-ROOTIQEO.js +0 -1
- package/chunk-SMQWGV7N.js +0 -1
- package/chunk-UFQWL2QF.js +0 -3
- package/chunk-VRE6C66C.js +0 -1
- package/chunk-WXAZWUCA.js +0 -1
- package/chunk-XIIFTZ5G.js +0 -1
- package/chunk-YZYJP5XH.js +0 -1
- package/chunk-ZFCSCXTC.js +0 -1
- package/chunk-ZFONU33Q.js +0 -1
- package/main-HYB6MFRZ.js +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as it}from"./chunk-X7SFNRJF.js";import{a as tt,b as nt}from"./chunk-2G6TVFPZ.js";import{a as X,b as Ze,c as Je}from"./chunk-V6EWWEIG.js";import{h as et}from"./chunk-HRSZZWTB.js";import{a as Ye}from"./chunk-WZNH4JPF.js";import{a as G}from"./chunk-2BX65XJQ.js";import{a as z}from"./chunk-6JQM2X3B.js";import{a as qe,c as ue,e as Ce,i as fe,k as We,s as ge,t as Qe}from"./chunk-NSIELNIY.js";import{A as Ue,C as He,a as pe,e as Ge,g as me,l as Re,o as Be,p as Ke,t as ze,z as Xe}from"./chunk-Y5IRBMLB.js";import{h as je}from"./chunk-DNJOKPEL.js";import{ea as be}from"./chunk-CWLTHXVS.js";import{$b as B,Ab as K,Ac as J,Bb as re,Cb as W,Db as le,Eb as N,Hc as P,Ic as Y,Kb as Q,Lb as Z,Mb as De,Nc as ee,Qa as l,Qb as E,Qc as $e,Rb as s,Sb as we,Tb as Ae,U as oe,Vb as Fe,Wb as Oe,Xb as ke,Z as k,ab as ae,bc as se,da as T,ea as S,ec as p,f as ie,fb as b,gc as F,ha as ye,hc as _e,jc as Ve,kc as Me,lc as ve,mc as v,na as $,nc as A,oc as c,rc as Pe,sb as f,sc as Le,tb as g,tc as de,ub as H,vb as j,vc as ce,wb as q,xb as m,yb as _,zb as d}from"./chunk-BTMXQPBB.js";import{a as O,b as ne}from"./chunk-EUDKD2JW.js";var ot=class n{#t=k(je);#e=k(Ge);#n=k(z);testDestination(t,e,o,i){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i):this.testDestinationv1(t,e,o,i)}testDestinationv2(t,e,o,i){return new ie(a=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){this.emitSuccessV2(a,t,e,r);return}this.handleGenericError(a,t,e,r.Error??"Unknown error",i)},error:r=>{let u=r?.error?.body;if(u?.Data?.FolderExists===!1||u?.StatusCode==="missing-folder"){o?this.handleMissingFolder(a,t,e):this.handleGenericError(a,t,e,$localize`The remote destination folder does not exist.`,i);return}if(u?.Data?.HostCertificate){this.handleMissingCertificate(a,t,e,u.Data?.HostCertificate);return}if(u?.Data?.ReportedHostKey){this.handleIncorrectKey(a,t,e,u.Data.ReportedHostKey,u.Data.AcceptedHostKey??null);return}this.handleGenericError(a,t,e,r?.message??"Unknown error",i)}})})}testDestinationv1(t,e,o,i){return new ie(a=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:r=>{a.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),a.complete()},error:r=>{this.handleDestinationErrorv1(r.message,t,e,o,i).subscribe(u=>{a.next(u)})}})})}handleMissingFolder(t,e,o){this.#e.open(G,{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.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,o,i){this.#e.open(G,{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:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open(G,{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:o}),t.complete()}})}reportNoAction(t,e,o){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open(G,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open(G,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
+
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open(G,{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:r=>{if(!r){this.reportNoAction(t,e,o);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){r();return}this.#e.open(G,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ie(r=>{if(t==="missing-folder"){i?this.handleMissingFolder(r,e,o):this.handleGenericError(r,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,o,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],I=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,I);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Te=class n{#t=k(z);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=X(t.Key);return e.isDefaultEntry===!0?ne(O({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var st=["fileInput"],_t=[[["label"]]],dt=["label"],Se=class n{customId=ee();content=$("");readonly=$(!1);placeholder=ee("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=Y(()=>{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||n)};static \u0275cmp=ae({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Fe(st,5),e&2){let i;Oe(i=ke())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Pe([{provide:qe,useExisting:n,multi:!0}])],ngContentSelectors:dt,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,o){if(e&1){let i=N();we(_t),Ae(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),E("click",function(){return T(i),S(o.triggerBrowse())}),Q(3,1),K(4,"spk-icon"),Z(),d()(),_(5,"div",4),E("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),ve("ngModelChange",function(r){return T(i),Me(o.content,r)||(o.content=r),S(r)}),d()(),_(7,"input",6,0),E("change",function(r){return T(i),S(o.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",o.placeholder()),Ve("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[ge,ue,Ce,fe,pe,me],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 ct=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),he=n=>({$implicit:n}),pt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),mt=()=>({updateOn:"blur"}),ut=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function Ct(n,t){n&1&&le(0)}function ft(n,t){if(n&1&&b(0,Ct,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,he,ce(2,ct,o,e,a,r.oauthField)))}}function gt(n,t){n&1&&le(0)}function Tt(n,t){if(n&1&&b(0,gt,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,he,ce(2,pt,o,e,a,r.oauthField)))}}function St(n,t){if(n&1){let e=N();_(0,"button",14),E("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!1))}),Q(1,6),K(2,"spk-icon"),Z(),d()}}function xt(n,t){if(n&1){let e=N();_(0,"button",21,1),E("click",function(){let i=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(i))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),F(" ",e.name," ")}}function Et(n,t){if(n&1){let e=N();_(0,"div",11)(1,"spk-menu",15)(2,"button",16),Q(3,7),K(4,"spk-icon"),Z(),d(),re(5,17),j(6,xt,3,1,"button",18,H),W(),d(),_(8,"spk-menu")(9,"button",19)(10,"spk-icon"),p(11,"dots-three-vertical"),d()(),re(12,17),_(13,"button",20),E("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!0))}),_(14,"spk-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),W(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),q(e)}}function Nt(n,t){if(n&1){let e=N();_(0,"textarea",22),E("ngModelChange",function(i){T(e);let a=s(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",Le(2,mt))}}function It(n,t){n&1&&le(0)}function ht(n,t){if(n&1&&b(0,It,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s(2);let i=B(15),a=s(),r=c(0),u=c(1),I=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,he,ce(2,ut,o,I,r,u.oauthField)))}}function yt(n,t){if(n&1&&j(0,ht,1,9,"ng-container",null,H),n&2){let e=s(2);q(e.advancedFormFieldNames())}}function Dt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function wt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=N();_(0,"app-file-tree",24)(1,"label",30),f(2,Dt,2,0,"sup",31),p(3),f(4,wt,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function kt(n,t){if(n&1){let e=N();_(0,"app-file-tree",25)(1,"label",30),f(2,Ft,2,0,"sup",34),p(3),f(4,Ot,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",u),l(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function Mt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function vt(n,t){n&1&&(_(0,"spk-icon",36),p(1," warning "),d())}function Pt(n,t){n&1&&(_(0,"spk-icon",37),p(1,"x-circle"),d())}function Lt(n,t){n&1&&(_(0,"spk-icon",38),p(1,"warning"),d())}function $t(n,t){if(n&1&&(_(0,"spk-icon",42),p(1," link "),d()),n&2){s();let e=c(9),o=c(10);se("error",e&&o==="error")("warn",e&&o==="warning"),m("spkTooltip",e)}}function bt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"envelope"),d())}function Gt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"hard-drives"),d())}function Rt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"jar"),d())}function Bt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"textbox"),d())}function Kt(n,t){if(n&1){let e=N();_(0,"spk-form-field")(1,"label",30),f(2,Vt,2,0,"sup",35),p(3),f(4,Mt,2,1,"spk-icon",32),f(5,vt,2,0,"spk-icon",36),f(6,Pt,2,0,"spk-icon",37),f(7,Lt,2,0,"spk-icon",38),d(),_(8,"input",39),E("keydown",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),v(9)(10),f(11,$t,2,5,"spk-icon",40)(12,bt,2,0,"spk-icon",41)(13,Gt,2,0,"spk-icon",41)(14,Rt,2,0,"spk-icon",41)(15,Bt,2,0,"spk-icon",41),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5),I=s(2);l(),m("for",u),l(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),g(r&&e.formView.type==="Path"?5:-1),l(),g(e.formView.type=="Hostname"&&!r&&!I.isValidHostname(a)?6:-1),l(),g(e.formView.type=="Bucketname"&&!r&&!I.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let V=a,w=I.hasLeadingSlash(V??"");l(),A(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),A(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),g(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function zt(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Xt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=N();_(0,"span",47),E("click",function(){T(e);let i=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"spk-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=N();_(0,"spk-icon",48),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=N();_(0,"spk-icon",48),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=N();_(0,"spk-form-field")(1,"label",30),f(2,zt,2,0,"sup",43),p(3),f(4,Xt,2,1,"spk-icon",32),d(),_(5,"input",44),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),f(6,Ut,2,0,"span",45)(7,Ht,2,0,"spk-icon",41),f(8,jt,2,0,"spk-icon",46)(9,qt,2,0,"spk-icon",46),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),g(e.oauthField===e.formView.name?6:7),l(2),g(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Jt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Yt(n,t){if(n&1){let e=N();_(0,"spk-select",49)(1,"label",30),f(2,Qt,2,0,"sup",50),p(3),f(4,Zt,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(6,Jt,1,2,"ng-template",null,2,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),I=c(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",I),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("id",I)("ngModel",r)}}function en(n,t){if(n&1&&(v(0),f(1,Yt,8,9)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),g(o?1:-1)}}function tn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function nn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function on(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function an(n,t){if(n&1){let e=N();_(0,"spk-select",52)(1,"label",30),f(2,tn,2,0,"sup",53),p(3),f(4,nn,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(6,on,1,2,"ng-template",null,3,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),I=c(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",I),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("id",I)("ngModel",r)}}function rn(n,t){n&1&&K(0,"spk-progress-bar",51)}function ln(n,t){if(n&1&&(v(0),f(1,an,8,10)(2,rn,1,0,"spk-progress-bar",51)),n&2){let e=s().$implicit,o=c(2),i=A(s(2).mapOptionsWithFreeText(e.formView,o));l(),g(i?1:2)}}function sn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function _n(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function dn(n,t){if(n&1){let e=N();_(0,"app-size",54),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),f(2,sn,2,0,"sup",55),p(3),f(4,_n,2,1,"spk-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1)}}function cn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function pn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function mn(n,t){if(n&1){let e=N();_(0,"spk-form-field")(1,"label",30),f(2,cn,2,0,"sup",56),p(3),f(4,pn,2,1,"spk-icon",32),d(),_(5,"input",57),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),_(6,"spk-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function un(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=N();_(0,"spk-toggle",58),E("click",function(){T(e);let i=s().$implicit,a=c(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),f(3,un,2,1,"spk-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(5),r=s(2);se("active",r.isTrue(i)),l(),m("for",a),l(),F(" ",o," "),l(),g(e.formView.longDescription?3:-1)}}function fn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function gn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Sn(n,t){if(n&1){let e=N();_(0,"spk-select",59)(1,"label",30),f(2,fn,2,0,"sup",60),p(3),f(4,gn,2,1,"spk-icon",32),d(),_(5,"input",61),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(6,Tn,1,2,"ng-template",null,4,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),I=c(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",I),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function xn(n,t){if(n&1&&(v(0),f(1,Sn,8,8)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),g(o?1:-1)}}function En(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function Nn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function In(n,t){if(n&1){let e=N();_(0,"app-timespan",54),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),f(2,En,2,0,"sup",62),p(3),f(4,Nn,2,1,"spk-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1)}}function hn(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function yn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Dn(n,t){if(n&1){let e=N();_(0,"app-file-drop-textarea",63),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),f(2,hn,2,0,"sup",64),p(3),f(4,yn,2,1,"spk-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(2),i=c(4),a=c(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),g(e.formView.isMandatory&&i?2:-1),l(),F(" ",e.formView.shortDescription??e.formView.name," "),l(),g(e.formView.longDescription?4:-1)}}function wn(n,t){if(n&1){let e=N();_(0,"button",65),E("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"spk-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),v(1)(2)(3)(4)(5),f(6,At,6,12,"app-file-tree",24)(7,kt,6,9,"app-file-tree",25)(8,Kt,16,13,"spk-form-field")(9,Wt,10,9,"spk-form-field")(10,en,2,2)(11,ln,3,2)(12,dn,5,7,"app-size",26)(13,mn,8,6,"spk-form-field")(14,Cn,4,5,"spk-toggle",27)(15,xn,2,2)(16,In,5,7,"app-timespan",26)(17,Dn,5,6,"app-file-drop-textarea",28),f(18,wn,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let o=c(0),i=s();se("single-field",e.fieldGroup!=="advanced"),l(),A(e.formView.shortDescription??e.formView.name),l(),A(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=A(i.getFieldValue(e.fieldGroup,e.formView.name));l(),A((a??"").toString().trim()===""),l(),A("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),g(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:-1),l(12),g(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&(v(0),j(1,ft,1,9,"ng-container",null,H),j(3,Tt,1,9,"ng-container",null,H),_(5,"spk-toggle-card",8),re(6,9)(7),De(8,5),W(),v(9),f(10,St,3,0,"button",10)(11,Et,17,2,"div",11),W(),f(12,Nt,1,3,"textarea",12)(13,yt,2,0),d(),b(14,An,19,9,"ng-template",null,0,J)),n&2){let e=s(),o=c(1);A(e.destinationForm()),l(),q(o.custom),l(2),q(o.dynamic),l(2),m("disallowToggle",!0),l(4),A(e.nonSelectedAdvancedFormViews()),l(),g(e.showTextArea()?10:11),l(2),g(e.showTextArea()?12:13)}}var at=class n{#t=k(et);#e=k(z);#n=k(it);#a=k(Te);injector=k(ye);targetUrl=$e.required();useBackupState=ee(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=X(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=$({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=$(null);showTextArea=$(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Y(()=>{let t=this.destinationType()??"",e=X(t),o=e?.key,i=this.#a.backendModules().find(h=>h.Key===o)??{Key:t,DisplayName:t,Description:X(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],I=e&&e.advancedFields?e.advancedFields:[],V=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([h,C],y)=>{let D=C.order??y;w.custom.push(O({order:900+D},C))});for(let h=0;h<i.Options.length;h++){let C=i.Options[h];if(C.Deprecated)continue;let y=u.find(D=>D===C.Name||C.Aliases?.includes(D.name)||D.name===C.Name);if(y){let D=C.Aliases?.indexOf(y.name)??-1,L=C.Aliases&&D>-1?C.Aliases[D]:C.Name,x=y&&typeof y!="string",xe=x?y?.defaultValue??C.DefaultValue:C.DefaultValue,Ee=x&&y?.order!==void 0?y.order:h,U={name:L,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+Ee},Ne=x?O(O({},U),y):U;w.dynamic.push(Ne)}else{let D=C.Name;if(V.find(te=>te===D))continue;let x=I.find(te=>te===D||te.name===D),xe=x&&typeof x!="string",Ee=xe&&x?.order!==void 0?x.order:h,U={name:D,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:C.DefaultValue,order:900+Ee},Ne=xe?O(O({},U),x):U;w.advanced.push(Ne)}}w.custom.sort((h,C)=>h.order-C.order),w.dynamic.sort((h,C)=>h.order-C.order),w.advanced.sort((h,C)=>h.order-C.order),this.destinationFormConfig.set(w);let R=this.targetUrl();if(!R)return;let M=Je(R);M&&this.destinationForm.set({custom:M.custom,dynamic:M.dynamic,advanced:M.advanced})});destinationFormEffect=Y(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(O({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let o of e)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(O({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(O({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}mapOptionsWithFreeText(t,e){let o=this.mapOptions(t);return o?(e&&e.length>0&&(o.find(a=>a.value===e)||o.push({key:e,value:e})),o):null}#o=$(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let C=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;C&&C.length>0&&(a=C)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let I=`${a}?type=${t}`,V=450,w=600,R=screen.width/2-V/2,M=screen.height/2-w/2,h=window.open(I,"_blank","height="+w+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+R+",top="+M);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update(L=>(L[e][o]=D,L)),this.#o.set(!1),h?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,o])=>{let i=e??"",a="";return typeof o=="boolean"?a=this.isTrue(o)?"True":"False":(typeof o=="number"||o!=null)&&(a=o.toString()),`${i}=${a}`}).join(`
|
|
7
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=t.split(`
|
|
8
|
+
`).map(i=>i.trim()).filter(i=>i.length>0),o={};for(let i of e){let[a,r]=i.split("=").map(u=>u.trim());a&&a.trim().length>0&&r!==void 0&&(o[a]=r)}this.destinationForm.update(i=>ne(O({},i),{advanced:o}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ae({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;i=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let r;r=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let I;I=$localize`Hostname is invalid`;let V;V=$localize`Bucket name is invalid`;let w;w=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let M;M=$localize`This field is mandatory`;let h;h=$localize`This field is mandatory`;let C;C=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let L;return L=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,o,[1,"advanced-options",3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["spk-button","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],["spkTooltip",i],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["spkTooltip",a],["spkTooltip",r],["spkTooltip",u,1,"warn"],["spkTooltip",I,1,"error"],["spkTooltip",V,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["spkTooltip",w],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["spkTooltip",R],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["spkTooltip",M],[3,"ngModelChange","inputType","ngModel","customId"],["spkTooltip",h],["spkTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["spkTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["spkTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["spkTooltip",L],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(v(0)(1),f(2,Fn,16,5)),e&2){let i=A(o.destinationType());l();let a=A(o.destinationFormConfig());l(),g(i&&a?2:-1)}},dependencies:[Qe,ue,We,Ce,ge,fe,be,Ye,tt,nt,Se,Re,me,pe,Xe,Be,ze,He,Ue,Ke],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_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}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{ot as a,Te as b,at as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-QRRKPBY6.js";import{a as Z}from"./chunk-2BX65XJQ.js";import{b as H,d as K}from"./chunk-2W6BEUGU.js";import{b as j,c as W,e as q,g as Y,p as J}from"./chunk-Y5IRBMLB.js";import{h as Q}from"./chunk-DNJOKPEL.js";import{Ab as g,Bb as R,Cb as D,Eb as f,Hc as E,Kb as V,Lb as z,Mb as s,Na as h,Nc as S,Qa as r,Qb as u,Rb as _,Z as N,ab as A,da as C,dc as G,ea as I,ec as F,fc as P,gc as X,mc as B,na as y,nc as U,oc as O,sb as d,tb as p,vb as v,wb as L,xb as m,yb as a,zb as l}from"./chunk-BTMXQPBB.js";function nt(n,e){if(n&1&&F(0),n&2){_();let t=O(0);X(" ",t.Message," ")}}function ot(n,e){if(n&1&&(a(0,"div"),V(1,1),g(2,"a",15),z(),l()),n&2){let t=_();r(2),m("href",t.downloadLink(),h)}}function at(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=_(),c=O(0);return I(i.doRepair(c.BackupID))}),s(1,2),l()}}function rt(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=_(),c=O(0);return I(i.doDownloadBugreport(c))}),s(1,3),l()}}function lt(n,e){if(n&1&&g(0,"spk-progress-bar",17),n&2){let t,o=_(2);m("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function ct(n,e){if(n&1){let t=f();a(0,"div",13),R(1),s(2,4),D(),a(3,"a",16),F(4),l(),d(5,lt,1,1,"spk-progress-bar",17),a(6,"button",14),u("click",function(){C(t);let i=_();return I(i.doShowUpdate())}),s(7,5),l()()}if(n&2){let t,o,i=_(),c=O(0);r(3),m("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,h),r(),P(c.Message),r(),p(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function st(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=_(),c=O(0);return I(i.doShowLog(c.BackupID))}),s(1,6),l()}}function _t(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,7),l()}}function dt(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=_();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),s(1,8),l()}}var pt={Error:"error",Warning:"warn",Information:"primary"},M=class n{#t=N(K);#a=N(H);#r=N(q);#e=N(W);#i=N(x);#n=N(Q);#o=y(null);serverState=this.#i.serverState;index=S.required();notification=S.required();downloadLink=E(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(e){return e&&pt[e]||"primary"}doShowLog(e){this.#n.getApiV1BackupByIdIsactive({id:e}).subscribe({next:t=>{this.#t.navigate(["/backup/"+e+"/log"])},error:t=>{if(t.status===404){let o={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(e)+""!=e&&(o={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(Z,{maxWidth:"550px",width:"100%",data:o})}else this.#e.error($localize`Failed to find backup: `+t.message)}})}doRepair(e){this.#n.postApiV1BackupByIdRepair({id:e}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#t.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a})},error:t=>{this.#e.error($localize`Failed to repair backup: `+t.message)}})}doShowUpdate(){this.#t.navigate(["/about/changelog"])}doShowLink(e){window.open(e,"_blank")}doDownloadBugreport(e){let t=e.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:o=>{if(!o.Token){this.#e.error("Failed to get bug report URL: No token generated");return}let i=`api/v1/bugreport/${t}?token=${o.Token}`;e.DownloadLink=i,this.#o.set(i),this.triggerDownload(i)},error:o=>{this.#e.error(`Failed to get bug report URL: ${o.message}`)}})}triggerDownload(e){let t=document.createElement("a");t.href=e,t.download="",t.style.display="none",document.body.appendChild(t);try{t.click()}catch{}document.body.removeChild(t)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let e;e=$localize`Dismiss`;let t;t=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let o;o=$localize`Repair`;let i;i=$localize`Download`;let c;c=$localize`New update found:`;let k;k=$localize`Show Update`;let w;w=$localize`Show Log`;let $;$=$localize` Show Help `;let b;return b=$localize` Show Help `,[e,t,o,i,c,k,w,$,b,["sparkle-alert-title",""],["sparkle-alert-content","",1,"content"],[1,"actions"],["spk-button","",1,"small","outlined"],[1,"message"],["spk-button","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(t,o){if(t&1){let i=f();B(0),a(1,"spk-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,nt,1,1),d(6,ot,3,1,"div"),a(7,"div",11),d(8,at,2,0,"button",12),d(9,rt,2,0,"button",12),d(10,ct,8,3,"div",13),d(11,st,2,0,"button",12),d(12,_t,2,0,"button",12),d(13,dt,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),s(15,0),l()()()()}if(t&2){let i=U(o.notification());r(),G(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),p(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),p(o.downloadLink()?6:-1),r(2),p(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),p(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!o.downloadLink()?9:-1),r(),p(i.Action==="update:new"?10:-1),r(),p(i.Action==="backup:show-log"?11:-1),r(),p(i.Action==="config:issue:unencrypted-database"?12:-1),r(),p(i.Action==="config:issue:windows-folder-used"?13:-1)}},dependencies:[J,Y,j],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var Nt=(n,e)=>e.ID;function Tt(n,e){if(n&1&&g(0,"app-notification",1),n&2){let t=e.$implicit,o=e.$index;m("index",o)("notification",t)}}function Ct(n,e){n&1&&(a(0,"div",2)(1,"p"),s(2,0),l()())}var tt=class n{#t=N(x);notificationFilterPredicate=S();notifications=E(()=>{let e=this.notificationFilterPredicate()?.predicate,t=this.#t.notifications();return typeof e!="function"?t:t.filter(e)});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let e;return e=$localize`No more notifications`,[e,[3,"index","notification"],[1,"notification-list"]]},template:function(t,o){t&1&&v(0,Tt,1,2,"app-notification",1,Nt,!1,Ct,3,0,"div",2),t&2&&L(o.notifications())},dependencies:[M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};export{M as a,tt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ut}from"./chunk-WZNH4JPF.js";import{a as Oe}from"./chunk-BCHZRC5K.js";import{a as rt,b as Ke,c as _t}from"./chunk-B26UYXA3.js";import{b as re}from"./chunk-LDIZ5E5Z.js";import{a as ot}from"./chunk-2BX65XJQ.js";import{a as Te}from"./chunk-6JQM2X3B.js";import{b as fe,c as Q,d as Ae,e as Z,f as he,h as st,i as le,j as Pe,k as Ne,n as lt,o as De,p as at,q as Me,r as ye,s as ae,t as Re}from"./chunk-NSIELNIY.js";import{b as oe,d as H}from"./chunk-2W6BEUGU.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-Y5IRBMLB.js";import{h as it}from"./chunk-DNJOKPEL.js";import{$b as xe,Ab as g,Bb as B,Cb as v,Eb as x,H as ke,Hc as I,Ic as ie,Kb as C,Lb as m,Mb as f,Mc as ve,Nc as Ve,Oc as Se,Pb as Ge,Qa as _,Qb as E,Rb as u,U as ge,Z as M,Zb as Ce,_b as me,ab as z,bc as Fe,da as c,ea as p,ec as U,fb as Ye,fc as be,gc as Ze,jc as $,kc as w,lc as k,na as d,rb as Qe,sb as y,sc as Be,tb as R,ub as Ie,vb as Le,wb as Ue,xb as T,yb as l,zb as a}from"./chunk-BTMXQPBB.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var $e=class s{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ct(s,t){if(s&1){let e=x();l(0,"div",24)(1,"spk-form-field")(2,"label",25),f(3,7),a(),l(4,"input",26,0),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),E("focus",function(){c(e);let i=xe(5);return p(i.showPicker())}),a(),l(6,"spk-icon",27),U(7,"clock"),a()(),l(8,"spk-form-field"),g(9,"label",28),l(10,"input",29,1),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),E("focus",function(){c(e);let i=xe(11);return p(i.showPicker())}),a(),l(12,"spk-icon",27),U(13,"calendar"),a()()(),l(14,"div",24)(15,"spk-form-field")(16,"label",30),f(17,8),a(),l(18,"input",31),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),a()(),l(19,"spk-select",32)(20,"input",33),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),a()()(),l(21,"app-toggle-card",34),B(22,35),f(23,9),v(),l(24,"div",36)(25,"spk-toggle",19),C(26,10),l(27,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),a(),m(),a(),l(28,"spk-toggle",19),C(29,11),l(30,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),a(),m(),a(),l(31,"spk-toggle",19),C(32,12),l(33,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),a(),m(),a(),l(34,"spk-toggle",19),C(35,13),l(36,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),a(),m(),a(),l(37,"spk-toggle",19),C(38,14),l(39,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),a(),m(),a(),l(40,"spk-toggle",19),C(41,15),l(42,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),a(),m(),a(),l(43,"spk-toggle",19),C(44,16),l(45,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),a(),m(),a()()()}if(s&2){let e=u();_(4),$("ngModel",e.scheduleFields.nextTime().time),_(6),$("ngModel",e.scheduleFields.nextTime().date),_(8),$("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),$("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),$("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],te={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Xe=class s{#e=M(J);#t=M(H);#i=M(oe);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let r;r=$localize`Next time`;let F;F=$localize`Run again every`;let A;A=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,F,A,S,O,P,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(l(0,"h3",17),f(1,2),a(),l(2,"div",18)(3,"spk-toggle",19),C(4,3),l(5,"input",20),k("ngModelChange",function(o){return w(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),a(),m(),a(),l(6,"p"),f(7,4),a()(),y(8,Ct,46,14),l(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),C(11,5),g(12,"spk-icon"),m(),a(),l(13,"button",23),E("click",function(){return n.next()}),C(14,6),g(15,"spk-icon"),m(),a()()),e&2&&(_(5),$("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,Q,Ne,fe,Z,le,q,Ee,j,se,Y,Oe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(s,t){if(s&1&&(B(0,4),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],we=class s{path=Ve.required();osType=Ve();pathChange=ve();remove=ve();internalPath=d("");pathType=d("-Expression");currentExpressionOption=I(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=I(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(l(0,"spk-select",0)(1,"input",1),k("ngModelChange",function(o){return w(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a()(),l(2,"spk-form-field",2)(3,"input",3),k("ngModelChange",function(o){return w(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),a(),l(6,"div",6),E("click",function(){return n.removeFilter()}),l(7,"spk-icon",7),U(8,"x-circle"),a()()),e&2){let i,o;T("options",n.expressionOptions())("isClearable",!1),_(),$("ngModel",n.pathType),_(2),$("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[ae,Q,Z,le,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(s,t){if(s&1){let e=x();l(0,"spk-form-field",42)(1,"input",43),k("ngModelChange",function(i){c(e);let o=u(2);return w(o.editingPath,i)||(o.editingPath=i),p(i)}),a()(),l(2,"button",44),E("click",function(){c(e);let i=u(2);return p(i.updatePath())}),l(3,"spk-icon"),U(4,"floppy-disk"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),l(6,"spk-icon"),U(7,"x-bold"),a()()}if(s&2){let e=u(2);_(),$("ngModel",e.editingPath),T("ngModelOptions",Be(2,ct))}}function At(s,t){if(s&1){let e=x();l(0,"spk-form-field",42),g(1,"input",45),a(),l(2,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),l(3,"spk-icon"),U(4,"pen"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),l(6,"spk-icon"),U(7,"trash-simple"),a()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Be(3,ct))}}function ht(s,t){if(s&1&&(l(0,"div",30),y(1,ft,8,3)(2,At,8,4),a()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=x();l(0,"app-new-filter",47),E("pathChange",function(i){let o=c(e).$index,r=u(2);return p(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),a()}if(s&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Le(0,Pt,1,2,"app-new-filter",46,Ie),s&2){let e=u();Ue(e.pathArray())}}function Dt(s,t){if(s&1&&(l(0,"div",41)(1,"spk-form-field"),g(2,"input",48),a(),l(3,"spk-select",49),g(4,"input",50),a()()),s&2){let e=u();_(3),T("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),He=class s{#e=M(J);#t=M(H);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=I(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=d(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=I(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=I(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=d(null);editingPath=d(null);addingNewPath=d(!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,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}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(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),o=this.pathArray().map((r,F)=>F===e?`${t}`:`${r}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,r)=>r!==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.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,Tt,5),e&2&&me()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let F;F=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let h;h=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,F,A,S,O,P,L,K,b,X,D,ee,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",h,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();l(0,"form",16,0),E("submit",function(){return c(i),p(n.next())}),l(2,"div",17)(3,"h3",18),f(4,1),a(),l(5,"app-file-tree",19)(6,"label",20),f(7,2),a(),g(8,"input",21),a(),l(9,"div",22)(10,"button",23),E("click",function(){return c(i),p(n.goBack())}),C(11,3),g(12,"spk-icon"),m(),a(),l(13,"button",24),C(14,4),g(15,"spk-icon"),m(),a()()(),l(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),v(),l(20,"p",28),f(21,6),a(),l(22,"div",29),Le(23,ht,3,1,"div",30,Ie),l(25,"div",31)(26,"spk-form-field"),g(27,"input",32),a(),l(28,"button",33),E("click",function(){return c(i),p(n.addNewPath())}),l(29,"spk-icon"),U(30,"plus"),a()()()()(),l(31,"app-toggle-card",26),B(32,27),f(33,7),v(),l(34,"p",28),f(35,8),a(),l(36,"button",34),E("click",function(){return c(i),p(n.addFilter())}),f(37,9),a(),y(38,Nt,2,0),a(),l(39,"app-toggle-card",35),B(40,27),f(41,10),v(),l(42,"p",28),f(43,11),a(),l(44,"spk-toggle",36),C(45,12),g(46,"input",37),m(),a(),l(47,"spk-toggle",36),C(48,13),g(49,"input",38),m(),a(),l(50,"spk-toggle",36),C(51,14),g(52,"input",39),m(),a(),l(53,"spk-toggle",40),E("click",function(){return c(i),p(n.toggleFilesLargerThan())}),f(54,15),a(),y(55,Dt,5,2,"div",41),a()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),Ue(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[ae,Pe,Q,Ne,fe,Z,he,le,Re,lt,De,Me,at,q,j,se,Ee,Y,we,ut,Oe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(H);#t=M(Te);#i=M(et);#n=M(it);#s=M($e);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:d(te.autoRun),nextTime:d(te.nextTime),runAgain:d(te.runAgain)};settings=d([]);optionsFields={remoteVolumeSize:d("50MB"),backupRetention:d("all"),backupRetentionTime:d(""),backupRetentionVersions:d(0),backupRetentionCustom:d("")};targetUrlModel=d(null);backupMetadata=d(null);isDraft=d(!1);backupId=d(null);backupName=I(()=>this.generalFormSignal()?.name??"");isSubmitting=d(!1);finishedLoading=d(!1);backupDefaults=d(null);applicationOptions=d(null);isNew=I(()=>this.backupId()==="new");osType=I(()=>this.#t.systemInfo()?.OSType);selectedOptions=d([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=I(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=d("");#l=d(null);#a=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#l.asReadonly();#p=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#a;this.#a=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#l.set(null))});setTestState(t,e){this.#o.set(t),this.#l.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=I(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[de,...t]});nonSelectedOptions=I(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(F=>`${F.Include?"":"-"}${F.Expression}`)??[],i=t.Settings?.find(F=>F.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(F=>F.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",F=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",A={name:t.Name??"",description:t.Description??""};e&&e!==""&&(A.name=e),n&&n!==""&&(A.description=n),r&&r!==""&&(A.encryption=r),o&&o!==""&&(A.password=o,A.repeatPassword=o),F&&F!==""&&(A.compression=F),this.generalForm.patchValue(A)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,L])=>L).map(([P,L])=>P):[],F=n.path?.split("\0")??[],A=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,L])=>L&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&A.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:F.filter(P=>!P.startsWith("-")),Settings:A,Filters:F.filter(P=>P.startsWith("-")).map((P,L)=>({Order:L,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==de.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:dt});break}let F=[...t,...n],A=this.settings().filter(S=>!F.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});return[...i,...o,...r,...A]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(l(0,"spk-alert",17),C(1,5),g(2,"spk-icon",26),m(),a())}function Ot(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(s,t){if(s&1&&g(0,"spk-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function wt(s,t){s&1&&(l(0,"span",35),f(1,10),a())}function kt(s,t){s&1&&(C(0,8,1),g(1,"spk-icon"),m())}function It(s,t){s&1&&(C(0,8,2),g(1,"spk-icon"),m())}function Lt(s,t){s&1&&(C(0,11,1),g(1,"spk-icon",42),m())}function Ut(s,t){s&1&&(C(0,11,2),g(1,"spk-icon"),m())}function Gt(s,t){if(s&1){let e=x();l(0,"button",41),E("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),C(1,11),y(2,Lt,2,0)(3,Ut,2,0),m(),a()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function xt(s,t){s&1&&(l(0,"spk-alert",39),f(1,12),a())}function bt(s,t){if(s&1){let e=x();l(0,"div",30)(1,"spk-form-field")(2,"label",31),C(3,7),g(4,"sup"),m(),a(),g(5,"input",32),a(),y(6,$t,1,9,"spk-progress-bar",33),l(7,"spk-form-field"),g(8,"input",34),y(9,wt,2,0,"span",35),a(),l(10,"div",36)(11,"button",37),E("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),C(12,8),y(13,kt,2,0)(14,It,2,0),m(),a(),l(15,"button",37),E("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),C(16,9),g(17,"spk-icon"),m(),a(),y(18,Gt,4,1,"button",38),a(),y(19,xt,2,0,"spk-alert",39),a()}if(s&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(l(0,"spk-select",27)(1,"label",28),f(2,6),a(),g(3,"input",29),Ye(4,Ot,1,1,"ng-template"),a(),y(5,bt,20,7,"div",30)),s&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function vt(s,t){if(s&1&&(l(0,"button",24),C(1,13),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(l(0,"button",25),C(1,14),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[Ae.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),compression:ne.control(s.compression)}),de={Key:"-",DisplayName:"None"},je=class s{#e=M(H);#t=M(oe);#i=M(rt);#n=M(J);#s=M(Te);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=d(!1);copiedPassword=d(!1);showCopyPassword=d(!1);noneOptionKey=de.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===de.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=I(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=I(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,yt,5),e&2&&me()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let F;F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let O;O=$localize`Encryption`;let P;P=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ge(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ee=Ge(ee);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,F,A,O,K,b,X,D,ee,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();l(0,"form",15,0),E("submit",function(){return c(i),p(n.next())}),l(2,"h3",16),f(3,1),a(),y(4,Rt,3,0,"spk-alert",17),l(5,"spk-form-field")(6,"label",18),C(7,2),g(8,"sup"),m(),a(),g(9,"input",19),a(),l(10,"spk-form-field")(11,"label",20),f(12,3),a(),g(13,"textarea",21),a(),y(14,Bt,6,3),l(15,"div",22)(16,"button",23),E("click",function(){return c(i),p(n.exit())}),C(17,4),g(18,"spk-icon"),m(),a(),y(19,vt,3,1,"button",24)(20,Vt,3,1,"button",25),a()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,he,De,Me,q,Y,se,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,de as b,je as c,te as d,Xe as e,pt as f,He as g,J as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ke,c as $e,d as L}from"./chunk-B26UYXA3.js";import{b as Re}from"./chunk-LDIZ5E5Z.js";import{a as ue}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{b as Pe,c as Te,d as g,e as Ce,f as Ee,j as me,o as Se,q as ge,r as fe,t as Oe}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as te,d as ne,e as ie}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{A as ce,C as Fe,a as re,b as se,f as ae,g as le,l as _e,p as pe}from"./chunk-Y5IRBMLB.js";import{c as oe,h as de}from"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as _,Eb as M,H as I,Hc as N,Ic as B,Kb as p,Lb as c,Mb as m,Nb as h,Ob as y,P as J,Pb as X,Qa as s,Qb as S,Rb as u,Z as T,ab as W,bc as R,da as A,ea as x,ec as D,fc as Y,hc as Z,na as C,sb as F,sc as ee,tb as d,xb as E,yb as a,zb as r}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var we=()=>["/"];function Ae(t,o){t&1&&(a(0,"spk-toggle",23),p(1,5),_(2,"input",26),c(),r())}function xe(t,o){t&1&&(a(0,"span",29),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",29),m(1,10),r()),t&2){let e=u(2);s(),h(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),y(1)}}function Ne(t,o){if(t&1&&_(0,"spk-progress-bar",36),t&2){let e=u(2);R("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),E("value",e.calculatePasswordStrength()*(100/5))}}function Ie(t,o){t&1&&(a(0,"span",29),m(1,11),r())}function Me(t,o){t&1&&(a(0,"span",29),m(1,12),r())}function he(t,o){if(t&1&&(a(0,"span",29),m(1,13),r()),t&2){let e=u(2);s(),h(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),y(1)}}function ye(t,o){t&1&&(p(0,7,1),_(1,"spk-icon"),c())}function Xe(t,o){t&1&&(p(0,7,2),_(1,"spk-icon"),c())}function Be(t,o){t&1&&(p(0,14,1),_(1,"spk-icon",38),c())}function Le(t,o){t&1&&(p(0,14,2),_(1,"spk-icon"),c())}function be(t,o){if(t&1){let e=M();a(0,"button",37),S("click",function(){A(e);let i=u(2);return x(i.copyPassword())}),p(1,14),F(2,Be,2,0)(3,Le,2,0),c(),r()}if(t&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(t,o){t&1&&(a(0,"spk-alert",35),m(1,15),r())}function Ge(t,o){if(t&1){let e=M();a(0,"div",24)(1,"spk-form-field")(2,"label",27),p(3,6),_(4,"sup"),c(),r(),_(5,"input",28),F(6,xe,2,0,"span",29)(7,De,2,1,"span",29),r(),F(8,Ne,1,9,"spk-progress-bar",30),a(9,"spk-form-field"),_(10,"input",31),F(11,Ie,2,0,"span",29)(12,Me,2,0,"span",29)(13,he,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),S("click",function(){A(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),p(16,7),F(17,ye,2,0)(18,Xe,2,0),c(),r(),a(19,"button",33),S("click",function(){A(e);let i=u();return x(i.generatePassword())}),p(20,8),_(21,"spk-icon"),c(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"spk-alert",35),r()}if(t&2){let e=u();s(5),E("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),E("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ke(t,o){if(t&1&&(a(0,"div",25)(1,"code"),D(2),r()()),t&2){let e=u();s(2),Y(e.exportedCmd())}}var k=new fe,b=class t{#o=T(ke);#t=T(de);#e=T(te);#n=T(ne);#i=T(oe);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=k.group({exportPasswords:k.control(!0),encryption:k.control(!1,[g.required,$e()]),password:k.control("",[L("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:k.control("",[L("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=B(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=B(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(J(o=>{let e=i=>{let f=Object.entries(i);return f?"?"+f.filter(([O,P])=>P!=null).map(([O,P])=>`${encodeURIComponent(O)}=${encodeURIComponent(P)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=W({type:t,selectors:[["app-export"]],decls:26,vars:15,consts:()=>{let o;o=$localize`Remember to copy the password`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let i;i=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let O;O=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let v;v=$localize`Password`;let G;G=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let $;$=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,$=X($);let U;U=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let q;q=$localize`Passwords do not match`;let j;j=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=X(w);let Q;return Q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[e,n,i,f,O,P,K,$,U,z,V,q,j,H,w,Q,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","","spkTooltip",o,1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",v,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),D(2," Export backup configuration "),a(3,"div",16)(4,"button",17),p(5,0),_(6,"spk-icon"),c(),r(),a(7,"button",18),S("click",function(){return n.submit()}),p(8,1),_(9,"spk-icon"),c(),r()()(),a(10,"p"),D(11),r()(),a(12,"form",19)(13,"spk-button-group")(14,"button",20),S("click",function(){return n.exportType.set("cmd")}),p(15,2),_(16,"spk-icon"),c(),r(),a(17,"button",20),S("click",function(){return n.exportType.set("file")}),p(18,3),_(19,"spk-icon"),c(),r()(),a(20,"spk-toggle",21),p(21,4),_(22,"input",22),c(),r(),F(23,Ae,3,0,"spk-toggle",23),F(24,Ge,24,8,"div",24),F(25,Ke,3,1,"div",25),r()),e&2){let i;s(4),E("routerLink",ee(14,we)),s(3),R("loading",n.isExporting()),E("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),s(4),Z("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),E("formGroup",n.exportForm),s(2),R("active",n.exportType()==="cmd"),s(3),R("active",n.exportType()==="file"),s(6),d(n.exportType()==="file"?23:-1),s(),d(n.encryptionFieldSignal()?24:-1),s(),d(n.exportedCmd()?25:-1)}},dependencies:[Oe,me,Te,Pe,Ce,Ee,Se,ge,ie,ae,ce,re,_e,le,se,pe,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-6JQM2X3B.js";import{b as L,d as j}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-6JQM2X3B.js";import{b as L,d as j}from"./chunk-3ZVSHKLD.js";import{e as m}from"./chunk-Y5IRBMLB.js";import{h as b}from"./chunk-DNJOKPEL.js";import{qa as $}from"./chunk-CWLTHXVS.js";import{Ab as I,Hc as d,Ic as G,Kb as _,Lb as w,Mb as A,Nb as F,Ob as M,Q as O,Qa as R,U as p,Z as c,ab as N,f as g,i as k,na as n,wc as P,yb as y,yc as W,zb as C}from"./chunk-BTMXQPBB.js";var S=class i{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=G(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=N({type:i,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(y(0,"header",2)(1,"h3"),A(2,0),C()(),y(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),P(7,"number"),w(),C()()),t&2&&(R(7),F(W(7,1,s.countdown(),"2.0-0")),M(5))},dependencies:[$],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var v=class i{dialog=c(m);#t=c(b);#i=n("disconnected");#s=n(null);#e=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#n=void 0;duration=c(L).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#o()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#o(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(O(this.#u)).subscribe({next:e=>{e&&this.#c(e),this.#a()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#n||(this.#n=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#n.component.reconnectTimer.set(a),setTimeout(()=>{this.#o()},a)}})}#c(e){this.#i.set("connected"),this.#s.set(e),this.#e.set(e.LastEventID??-1),this.#r.set(0)}#a(){this.#l()&&this.#o()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var u=!1,T=class i{#t=c(j);#i=c(D);dialog=c(m);#s=null;#e=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#n=n(null);#o=void 0;#c=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();subscriptions=this.#c.asReadonly();serverTaskQueue=this.#u.asReadonly();backupListState=this.#n.asReadonly();#a=null;taskCompleted=new g(e=>{this.#a=e});#p=0;start(){this.#h(),this.shouldConnect.set(!0)}#h(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,f=this.#i.hasWebSocketAuth()?`${t}//${a}${s}/notifications`:`${t}//${a}${s}/notifications?token=${e}`;this.#e.set("connecting"),this.#s=new WebSocket(f),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#s.onmessage=h=>{if(this.#e()==="authenticating")try{let o=JSON.parse(h.data);o.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",o.Message),this.#e.set("disconnected"));return}catch(o){console.error("Error parsing WebSocket authentication reply",o),this.#e.set("disconnected");return}try{let o=JSON.parse(h.data),l=o?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",o),this.#r.set(o);else if(l==="reply"){let r=o;r.Success||console.error("WebSocket reply error:",r.Message)}else if(l==="progress"){let r=o;u&&console.log("Received progress update:",r.Data),this.#l.set(r.Data)}else if(l==="taskqueue"){let r=o;u&&console.log("Received task update:",r.Data),this.#u.set(r.Data)}else if(l==="taskcompleted"){let r=o;u&&console.log("Received task completed:",r.Data),this.#a?.next(r.Data)}else if(l==="backuplist"){let r=o;u&&console.log("Received backup list update:",r.Data),this.#n.set(r.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(o){console.error("Error parsing WebSocket message",o)}},this.#s.onclose=h=>{u&&console.log("WebSocket connection closed",h),this.#e.set("disconnected"),this.shouldConnect()&&(this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#o.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#h(),5e3))},this.#s.onerror=h=>{console.error("WebSocket error",h),this.#e.set("disconnected")}}#d(){this.#e.set("connected");let e=this.#c();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#o&&this.#o.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#p}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#c(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#c.set(s),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#c();t[e]&&(delete t[e],this.#c.set(t),this.#e()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#p}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};var x=10,q=class i{#t=c(T);#i=c(v);#s=c(b);#e=c(D);#r=n("longpoll");#l=n(!1);#u=d(()=>this.#e.hasTaskCompletedOption()&&this.#r()==="websocket");#n={};#o=null;#c=!1;#a=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#a.unshift(e),this.#a.length>x&&this.#a.pop(),!e.ID)return;let t=this.#n[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#n[e.ID])})}connectionStatus=d(()=>this.#r()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=d(()=>this.#r()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=d(()=>this.#r()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=d(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new g(t=>{let s=this.#a.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#n[e]=this.#n[e]||[],this.#n[e].push(t),this.#p()})}#p(){this.#c||this.#u()||(this.#c=!0,this.#h())}#h(){let e=Object.keys(this.#n).map(s=>parseInt(s,10));if(e.length===0){this.#d();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#a.unshift(s),this.#a.length>x&&this.#a.pop(),this.#n[t].forEach(f=>{f.next(s),f.complete()}),delete this.#n[t])},complete:()=>{this.#o=window.setTimeout(()=>{this.#h()},1e3)},error:s=>{this.#o=window.setTimeout(()=>{this.#h()},3e3)}})}#d(){this.#o!==null&&(clearTimeout(this.#o),this.#o=null),this.#c=!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})};export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ue}from"./chunk-N57J64DN.js";import{a as se}from"./chunk-WZNH4JPF.js";import{a as ne}from"./chunk-BCHZRC5K.js";import{b as pe}from"./chunk-LDIZ5E5Z.js";import{a as Ve}from"./chunk-J6BHRR34.js";import{a as H}from"./chunk-2BX65XJQ.js";import{a as oe}from"./chunk-6JQM2X3B.js";import{a as xe}from"./chunk-WXARH2SG.js";import{b as We,c as v,e as w,f as G,i as ze,j as B,l as Xe,o as x,q as V,r as W,s as Ye,t as z}from"./chunk-NSIELNIY.js";import{b as N,d as h}from"./chunk-2W6BEUGU.js";import{A as Be,a as b,e as De,g as D,l as Ae,p as ve,q as we,t as Ge}from"./chunk-Y5IRBMLB.js";import{h as A}from"./chunk-DNJOKPEL.js";import{la as ie}from"./chunk-CWLTHXVS.js";import{Ab as c,B as Oe,Bb as M,Cb as k,Eb as j,F as Y,H as O,Hc as le,Ic as L,Kb as d,L as fe,Lb as F,Mb as T,Nb as he,Ob as Pe,P as Ce,Q,Qa as u,Qb as f,Rb as $,U as Re,Z as p,ab as y,bc as Ie,da as C,ea as R,ec as q,fb as Ne,gc as ye,hc as Me,i as ge,jc as Z,kc as ee,lc as te,na as _,o as Te,rc as ke,sb as U,sc as $e,tb as K,wc as ae,x as re,xb as m,xc as Le,y as Ee,yb as r,yc as be,zb as l}from"./chunk-BTMXQPBB.js";var Ke=new W,He=()=>Ke.group({passphrase:Ke.control("")}),_e=class a{#t=p(A);#e=p(P);#o=p(h);#n=p(N);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);settings=_([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["destination"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),f("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",5),T(3,0),l(),c(4,"input",6),l(),r(5,"app-toggle-card"),M(6,7),T(7,1),k(),r(8,"app-options-list",8),te("optionsChange",function(n){return ee(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),f("click",function(){return t.back()}),d(11,2),c(12,"spk-icon"),F(),l(),r(13,"button",11),d(14,3),c(15,"spk-icon"),F(),l()()()),e&2&&(m("formGroup",t.encryptionForm),u(8),Z("options",t.settings),m("hasFreeTextSettings",!0))},dependencies:[z,B,v,w,G,x,V,Ae,b,D,ne,Ue],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ze=()=>({standalone:!0});function et(a,i){a&1&&c(0,"spk-progress-bar",7)}function tt(a,i){if(a&1&&(q(0),ae(1,"bytes")),a&2){let e=$().$implicit;ye(" (",Le(1,1,e.FileSizes),") ")}}function it(a,i){if(a&1&&(r(0,"div",14),q(1),ae(2,"date"),U(3,tt,2,3),l()),a&2){let e=i.$implicit;u(),Me(" ",e.Version,": ",be(2,3,e.Time,"medium")," "),u(2),K(e.FileSizes?3:-1)}}function ot(a,i){a&1&&c(0,"spk-progress-bar",7)}function nt(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),T(2,4),l(),c(3,"input",16),l()),a&2){let e=$(2);m("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function st(a,i){if(a&1){let e=j();r(0,"spk-select",11),f("cleared",function(){C(e);let o=$();return R(o.abortLoading())}),r(1,"input",12),te("ngModelChange",function(o){C(e);let n=$();return ee(n.selectOption,o)||(n.selectOption=o),R(o)}),l(),Ne(2,it,4,6,"ng-template"),l(),U(3,ot,1,0,"spk-progress-bar",7),U(4,nt,4,5,"app-file-tree",13)}if(a&2){let e=$();m("options",e.versionOptions())("isClearable",!1),u(),Z("ngModel",e.selectOption),m("ngModelOptions",$e(6,Ze)),u(2),K(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),u(),K(e.showFileTree()?4:-1)}}var ue=new W,Je=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=p(A);#e=p(P);#o=p(Ve);#n=p(oe);#i=p(h);#s=p(N);#l=p(ie);#a=null;#p=null;#r=_([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);initialNodes=_([]);loadingRootPath=_(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=_({});loadingEffect=L(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=L(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(J=>J.Version===parseInt(e))?.Time??null;if(!s)return;let S=`${i}+${s}`,E=o[S];if(this.needsDatabaseRepair()&&(!E||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=L(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#p===n||(this.#p=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Q(this.abortLoading$),O(()=>{this.#p=null})).subscribe(s=>{let S=s.ID;this.#o.waitForTaskToComplete(S).pipe(Y(1)).subscribe(()=>{this.#r.update(E=>E.filter(I=>I!==n)),this.loadedVersions.update(E=>(E[n]=!0,E))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new ge;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-select-files"]],features:[ke([ie])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=j();r(0,"form",5,0),f("submit",function(){return C(o),R(t.next())}),r(2,"h3",6),T(3,1),l(),U(4,et,1,0,"spk-progress-bar",7)(5,st,5,7),r(6,"div",8)(7,"button",9),f("click",function(){return C(o),R(t.back())}),d(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),d(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(m("formGroup",t.selectFilesForm),u(4),K(t.versionOptionsLoading()?4:5),u(5),he(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[Ye,B,v,w,G,ze,z,x,V,ie,xe,se,D,b,Ge,ve],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(h);#e=p(N);#o=p(oe);#n=p(De);#i=p(A);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=Je();optionsForm=Qe();encryptionForm=He();optionsFormSignal=pe(this.optionsForm.valueChanges);selectFilesFormSignal=pe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);#s=_("");#l=_(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#p=L(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#n.open(H,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(H,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#_(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?Te(()=>t):Ee(1e3).pipe(Ce(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(Y(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);if(!(t.Backup?.IsTemporary??!0)&&t?.Backup?.DBPathExists===!1){this.#n.open(H,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#t.navigate(["/backup",e,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",S=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(S=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(S=$localize`The backup storage folder was not found.`),s&&(S=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(H,{data:{title:$localize`Failed to load backup filesets`,message:S,confirmText:$localize`OK`,cancelText:void 0},closed:E=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(fe(3))]).pipe(Y(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#_(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Re({token:a,factory:a.\u0275fac,providedIn:"root"})};var X=new W,Qe=()=>X.group({restoreFrom:X.control("orignal"),restoreFromPath:X.control(""),handleExisting:X.control("overwrite"),permissions:X.control(!1),includeMetadata:X.control(!0)}),Fe=class a{#t=p(P);#e=p(h);#o=p(N);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=y({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let S;S=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let E;E=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let me;me=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let Se;return Se=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,S,E,I,J,me,Se,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=j();r(0,"form",13,0),f("submit",function(){return C(o),R(t.submit())}),r(2,"h3",14),T(3,1),l(),r(4,"app-toggle-card",15),M(5,16),T(6,2),k(),r(7,"spk-radio",17),d(8,3),c(9,"input",18),F(),l(),r(10,"spk-radio",17),d(11,4),c(12,"input",19),F(),l(),r(13,"app-file-tree",20)(14,"label",21),q(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),M(18,16),T(19,5),k(),r(20,"spk-radio",17),d(21,6),c(22,"input",23),F(),l(),r(23,"spk-radio",17),d(24,7),c(25,"input",24),F(),l()(),r(26,"app-toggle-card"),M(27,16),T(28,8),k(),r(29,"spk-toggle",25),d(30,9),c(31,"input",26),F(),l(),r(32,"spk-toggle",25),d(33,10),c(34,"input",27),F(),l()(),r(35,"div",28)(36,"button",29),f("click",function(){return C(o),R(t.goBack())}),d(37,11),c(38,"spk-icon"),F(),l(),r(39,"button",30),d(40,12),c(41,"spk-icon"),F(),l()()()}if(e&2){let o;m("formGroup",t.optionsForm),u(4),m("disallowToggle",!0),u(9),m("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),u(4),m("disallowToggle",!0),u(22),Ie("loader",t.isSubmitting())}},dependencies:[z,B,v,We,Xe,w,G,x,V,ne,se,Be,we,D,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Qe as a,Fe as b,He as c,_e as d,Je as e,de as f,P as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ue}from"./chunk-XIOHRQ3X.js";import{a as ze}from"./chunk-BCHZRC5K.js";import{b as Xe,c as ue}from"./chunk-LDIZ5E5Z.js";import"./chunk-WZRDKVOR.js";import{a as Ke}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{a as Z}from"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as ye,e as Be}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as j,g as se,j as xe,k as be,p as Fe,y as he}from"./chunk-Y5IRBMLB.js";import{h as pe}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import{la as W,oa as re}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{a as ee}from"./chunk-AM7RYTIO.js";import"./chunk-B6OIHB5W.js";import{Ab as s,Bb as P,Cb as G,Eb as K,Hc as ve,Kb as L,Lb as S,Mb as _,Nb as p,Nc as _e,Ob as u,Pb as D,Qa as l,Qb as $,Rb as E,Z as B,ab as z,bc as f,da as M,ea as R,ec as g,fc as U,gc as I,hc as $e,ic as fe,mc as Ie,na as N,nc as ke,oc as V,r as X,sb as C,tb as m,ub as x,vb as b,wb as h,wc as c,xb as w,xc as T,yb as a,yc as A,zb as i,zc as k}from"./chunk-BTMXQPBB.js";import{a as le}from"./chunk-EUDKD2JW.js";function We(n,t){n&1&&s(0,"spk-progress-bar",32)}function je(n,t){n&1&&s(0,"div",35)}function Je(n,t){n&1&&s(0,"div",35)}function qe(n,t){n&1&&s(0,"div",36)}function He(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(a(0,"details",46)(1,"summary"),L(2,15),s(3,"spk-icon"),a(4,"div",47),s(5,"spk-icon",40),i(),S(),i(),a(6,"div",48)(7,"p"),_(8,16),c(9,"date"),i(),a(10,"p"),_(11,17),c(12,"date"),i(),a(13,"p"),_(14,18),c(15,"durationFormat"),i(),a(16,"p"),_(17,19),i(),s(18,"spk-divider"),a(19,"p"),_(20,20),i(),a(21,"p"),_(22,21),i()()(),a(23,"details",46)(24,"summary"),L(25,22),s(26,"spk-icon"),a(27,"div",47),s(28,"spk-icon",40),i(),S(),i(),a(29,"div",48)(30,"p"),_(31,23),c(32,"date"),i(),a(33,"p"),_(34,24),c(35,"date"),i(),a(36,"p"),_(37,25),c(38,"durationFormat"),i(),s(39,"spk-divider"),a(40,"p"),_(41,26),c(42,"bytes"),i(),a(43,"p"),_(44,27),c(45,"bytes"),i(),a(46,"p"),_(47,28),c(48,"bytes"),i(),s(49,"spk-divider"),a(50,"p"),_(51,29),i(),a(52,"p"),_(53,30),i()()()),n&2){let e=E(2).$implicit;l(9),p(A(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),u(8),l(3),p(A(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),u(11),l(3),p(T(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),u(14),l(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),u(17),l(3),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),u(20),l(2),p(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),u(22),l(10),p(A(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),u(31),l(3),p(A(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),u(34),l(3),p(T(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),u(37),l(4),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(k(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),u(41),l(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(k(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),u(44),l(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(k(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),u(47),l(3),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),u(51),l(2),p(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),u(53)}}function Ye(n,t){if(n&1&&(a(0,"code"),g(1),c(2,"json"),i()),n&2){let e=t.$implicit;l(),U(T(2,1,e))}}function Ze(n,t){if(n&1&&(a(0,"details",46)(1,"summary"),L(2,31),s(3,"spk-icon"),a(4,"div",47),s(5,"spk-icon",40),i(),S(),i(),a(6,"div",48),b(7,Ye,3,3,"code",null,x),i()()),n&2){let e=E(2).$implicit;l(5),p(e.data.VerificationsActualLength),u(2),l(2),h(e.data.Verifications)}}function en(n,t){if(n&1&&(a(0,"code"),g(1),c(2,"json"),i()),n&2){let e=t.$implicit;l(),U(T(2,1,e))}}function nn(n,t){n&1&&(a(0,"p"),g(1,"No errors"),i())}function tn(n,t){if(n&1&&(a(0,"code"),g(1),c(2,"json"),i()),n&2){let e=t.$implicit;l(),U(T(2,1,e))}}function on(n,t){if(n&1&&(a(0,"section",41)(1,"app-toggle-card",42),P(2,43),a(3,"h3"),_(4,0),i(),G(),P(5,44),a(6,"p"),_(7,1),c(8,"date"),i(),a(9,"p"),_(10,2),c(11,"date"),i(),a(12,"p"),_(13,3),c(14,"durationFormat"),i(),G(),i(),a(15,"app-toggle-card",42),P(16,43),a(17,"h3"),_(18,4),i(),G(),P(19,44),a(20,"p"),_(21,5),c(22,"bytes"),i(),a(23,"p"),_(24,6),c(25,"bytes"),i(),a(26,"p"),_(27,7),c(28,"bytes"),i(),a(29,"p"),_(30,8),c(31,"bytes"),i(),a(32,"p"),_(33,9),i(),a(34,"p"),_(35,10),i(),a(36,"p"),_(37,11),i(),G(),i(),a(38,"div",45),s(39,"spk-divider"),C(40,Qe,54,45),C(41,Ze,9,1,"details",46),a(42,"details",46)(43,"summary"),L(44,12),s(45,"spk-icon"),a(46,"div",47),s(47,"spk-icon",40),i(),S(),i(),a(48,"div",48),b(49,en,3,3,"code",null,x),i()(),a(51,"details",46)(52,"summary"),L(53,13),s(54,"spk-icon"),a(55,"div",47),s(56,"spk-icon",40),i(),S(),i(),a(57,"div",48),C(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,x),i()(),s(61,"spk-divider"),a(62,"details")(63,"summary"),L(64,14),s(65,"spk-icon"),a(66,"div",47),s(67,"spk-icon",40),i(),S(),i(),a(68,"code")(69,"button",49),g(70,"Copy"),i(),g(71),c(72,"json"),i()()()()),n&2){let e=E().$implicit;l(),w("disallowToggle",!0),l(7),p(A(8,22,e.data==null?null:e.data.BeginTime,"medium")),u(7),l(3),p(A(11,25,e.data==null?null:e.data.EndTime,"medium")),u(10),l(3),p(T(14,28,e.data==null?null:e.data.Duration)),u(13),l(),w("disallowToggle",!0),l(7),p(e.data==null?null:e.data.ExaminedFiles)(k(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),u(21),l(3),p(e.data==null?null:e.data.OpenedFiles)(k(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),u(24),l(3),p(e.data==null?null:e.data.AddedFiles)(k(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),u(27),l(3),p(e.data==null?null:e.data.ModifiedFiles)(k(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),u(30),l(2),p(e.data==null?null:e.data.DeletedFiles),u(33),l(2),p(e.data==null?null:e.data.TooLargeFiles),u(35),l(2),p(e.data==null?null:e.data.FilesWithError),u(37),l(3),m(e.data!=null&&e.data.TestResults?40:-1),l(),m((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),l(6),p(e.data==null?null:e.data.WarningsActualLength),u(44),l(2),h(e.data==null?null:e.data.Warnings),l(7),p(e.data==null?null:e.data.ErrorsActualLength),u(53),l(2),m((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),l(),h(e.data==null?null:e.data.Errors),l(12),I(" ",T(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=K();a(0,"article",33)(1,"header",34),$("click",function(){let r=M(e).$implicit,d=E();return R(d.toggleOpenEntry(r.id))}),C(2,je,1,0,"div",35)(3,Je,1,0,"div",35)(4,qe,1,0,"div",36)(5,He,1,0,"div",37),a(6,"h3"),g(7),c(8,"date"),i(),a(9,"p"),g(10),i(),s(11,"div",38),a(12,"div",39)(13,"spk-icon",40),g(14,"caret-down"),i()()(),C(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,o=E(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";l(2),m(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),l(5),U(A(8,7,e.timestamp,"medium")),l(3),$e(" ",e.data==null?null:e.data.MainOperation," ",o.getLocalizedSummary(e)," "),l(3),f("open",e.id===o.openEntry()),l(2),m(e.id===o.openEntry()?15:-1)}}var ce=class n{#e=B(pe);#n=new Z;#t=new ee;backupId=_e.required();openEntry=N(null);pagination=N({offset:0,pagesize:100});resource=ue({params:()=>le({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(X(e=>e.map(o=>({id:o.ID,operationId:o.OperationID,timestamp:o.Timestamp*1e3,type:o.Type,data:JSON.parse(o.Message),exception:JSON.stringify(o.Exception)==="{}"?null:o.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,o=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let d=this.#t.transform(t.data?.Duration,!0);d.startsWith("0h ")&&(d=d.slice(3)),d.startsWith("0m ")&&(d=d.slice(3)),r.push($localize`took ${d}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),o!==0&&r.push($localize`:@@warningCount:${o} warning${o===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let o;o=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let d;d=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let H;H=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=D(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=D(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=D(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=D(ie);let Ee;Ee=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SPK_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=D(oe);let Se;Se=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Me;Me=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Re;Re=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=D(ae),[t,e,o,r,d,v,y,J,q,H,Q,Y,O,ne,te,ie,Ee,Ce,me,Oe,Te,Le,oe,Se,Ae,Pe,Ge,Ne,De,Me,Re,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,o){e&1&&(C(0,We,1,0,"spk-progress-bar",32),b(1,an,16,10,"article",33,x)),e&2&&(m(o.resource.isLoading()?0:-1),l(),h(o.resource.value()))},dependencies:[ze,be,Fe,se,j,Z,W,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function ln(n,t){n&1&&s(0,"spk-progress-bar",1)}function _n(n,t){n&1&&(L(0,0,1),s(1,"spk-icon"),S())}function rn(n,t){n&1&&(L(0,0,2),s(1,"spk-icon"),S())}function sn(n,t){if(n&1){let e=K();a(0,"section",6)(1,"button",7),$("click",function(){M(e);let r=E(),d=r.$implicit,v=r.$index,y=E();return R(y.copyToClipboard(d.data,v))}),L(2,0),C(3,_n,2,0)(4,rn,2,0),S(),i(),a(5,"code"),g(6),c(7,"json"),i()()}if(n&2){let e=E(),o=e.$implicit,r=e.$index,d=E();l(),f("success",d.copiedFromIndex()===r),l(2),m(d.copiedFromIndex()===r?3:4),l(3),U(T(7,4,o.data))}}function Fn(n,t){if(n&1){let e=K();a(0,"article",2)(1,"header",3),$("click",function(){let r=M(e).$implicit,d=E();return R(d.toggleOpenEntry(r.id))}),a(2,"h3"),g(3),c(4,"date"),i(),a(5,"div",4)(6,"spk-icon",5),g(7,"caret-down"),i()()(),C(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,o=E();l(3),fe("",A(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),l(3),f("open",e.id===o.openEntry()),l(2),m(e.id===o.openEntry()?8:-1)}}var de=class n{#e=B(pe);backupId=_e.required();openEntry=N(null);pagination=N({offset:0,pagesize:100});copiedFromIndex=N(null);resource=ue({params:()=>le({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(X(e=>e.map((o,r)=>({id:o.ID,operationId:o.OperationID,timestamp:o.Timestamp*1e3,operation:o.Operation,path:o.Path,data:typeof o.Data=="string"?JSON.parse(o.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let o=JSON.stringify(t,null,2);navigator.clipboard.writeText(o),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=D(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["spk-button","",1,"small",3,"click"]]},template:function(e,o){e&1&&(C(0,ln,1,0,"spk-progress-bar",1),b(1,Fn,9,9,"article",2,x)),e&2&&(m(o.resource.isLoading()?0:-1),l(),h(o.resource.value()))},dependencies:[re,Fe,j,W],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function pn(n,t){if(n&1&&(g(0," - "),P(1),_(2,6),G(),g(3),c(4,"durationFormat")),n&2){E(2);let e=V(6);l(3),I(" ",T(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function un(n,t){n&1&&(P(0),_(1,7),G())}function cn(n,t){if(n&1&&(g(0),c(1,"bytes")),n&2){E(2);let e=V(6);I(" ",T(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function dn(n,t){n&1&&(P(0),_(1,8),G())}function gn(n,t){if(n&1&&(g(0),c(1,"bytes")),n&2){E(2);let e=V(6);I(" ",T(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function En(n,t){n&1&&(P(0),_(1,9),G())}function Cn(n,t){if(n&1&&(a(0,"spk-chip",19),_(1,10),i()),n&2){E(2);let e=V(6);l(),p(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),u(1)}}function mn(n,t){n&1&&(a(0,"spk-chip",20),_(1,11),i())}function On(n,t){if(n&1&&(a(0,"div",14)(1,"div",18)(2,"h3"),g(3),a(4,"spk-icon"),g(5,"database"),i()(),a(6,"p")(7,"span"),_(8,3),i(),g(9),c(10,"date"),C(11,pn,5,3)(12,un,2,0,"ng-container"),i(),a(13,"p")(14,"span"),_(15,4),i(),C(16,cn,2,3)(17,dn,2,0,"ng-container"),i(),a(18,"p")(19,"span"),_(20,5),i(),C(21,gn,2,3)(22,En,2,0,"ng-container"),i()(),C(23,Cn,2,1,"spk-chip",19)(24,mn,2,0,"spk-chip",20),i()),n&2){let e=E(),o=V(6);l(3),I(" ",(o.Backup==null?null:o.Backup.Name)??e.MISSING_BACKUP_NAME," "),l(6),I(" ",A(10,6,o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.LastBackupDate,"short")," "),l(2),m(!(o.Backup==null||o.Backup.Metadata==null)&&o.Backup.Metadata.LastBackupDuration?11:12),l(5),m(!(o.Backup==null||o.Backup.Metadata==null)&&o.Backup.Metadata.SourceFilesSize?16:17),l(5),m(!(o.Backup==null||o.Backup.Metadata==null)&&o.Backup.Metadata.TargetFilesSize?21:22),l(2),m(!(o.Backup==null||o.Backup.Metadata==null)&&o.Backup.Metadata.BackupListCount?23:24)}}function Tn(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=E();w("backupId",e.backupId())}}function Ln(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=E();w("backupId",e.backupId())}}var ge=class n{#e=B(ye);#n=B(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=N("general");backupId=Xe(this.#e.params.pipe(X(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let o;o=$localize` Destination `;let r;r=$localize`Last successful backup:`;let d;d=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let J;J=$localize`N/A`;let q;q=$localize`N/A`;let H;H=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,o,r,d,v,y,J,q,H,Q,Y,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,o){if(e&1){let r=K();s(0,"app-status-bar"),a(1,"section")(2,"div",12)(3,"button",13),L(4,0),s(5,"spk-icon"),S(),i()(),Ie(6),C(7,On,25,9,"div",14),a(8,"spk-tabs",15)(9,"button",16),$("click",function(){return M(r),R(o.activeTab.set("general"))}),_(10,1),i(),a(11,"button",16),$("click",function(){return M(r),R(o.activeTab.set("destination"))}),_(12,2),i()(),C(13,Tn,1,1,"app-general-log",17),C(14,Ln,1,1,"app-remote-log",17),i()}if(e&2){l(6);let r=ke(o.backup());l(),m(r?7:-1),l(2),f("active",o.activeTab()==="general"),l(2),f("active",o.activeTab()==="destination"),l(2),m(o.activeTab()==="general"?13:-1),l(),m(o.activeTab()==="destination"?14:-1)}},dependencies:[he,ce,de,Be,Z,ee,W,Ue,j,se,xe],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{ge as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as mt}from"./chunk-JI7GCFQB.js";import{a as Et,b as Ot,c as Ct}from"./chunk-H52UO57S.js";import"./chunk-X7SFNRJF.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as Dt}from"./chunk-V6EWWEIG.js";import{h as dt}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import{a as m}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as _t,e as ct,f as ut,g as Tt,i as pt,j as gt,s as St}from"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import{b as nt,d as it}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as p,Bb as L,Cb as b,Eb as E,Hc as G,Kb as u,Lb as T,Mb as f,Nb as k,Ob as $,Oc as et,Pb as w,Qa as r,Qb as S,Rb as l,Z as O,Zb as Q,_b as q,ab as H,bc as Y,da as _,ea as c,ec as N,fc as B,gc as J,ha as j,jc as A,kc as M,lc as P,na as C,rc as Z,sb as D,sc as tt,tb as d,ub as y,vb as h,wb as x,xb as I,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function Nt(i,n){if(i&1){let t=E();u(0,2,1),s(1,"button",30),S("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),I("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=E();u(0,2,2),s(1,"button",20),S("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function kt(i,n){i&1&&(s(0,"spk-alert"),u(1,5),p(2,"spk-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"spk-alert",21),u(1,6),p(2,"spk-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"spk-alert",22),u(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"spk-alert",23),u(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1){let t=E();s(0,"p",32),S("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),k((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,n){if(i&1){let t=E();s(0,"div",39),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),N(2),F(),s(3,"p"),N(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function ht(i,n){if(i&1){let t=E();s(0,"button",40,1),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),N(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function xt(i,n){if(i&1&&(s(0,"div",34),h(1,yt,5,2,"div",35,y),F(),s(3,"spk-menu",36)(4,"button",37),f(5,10),F(),L(6,19),h(7,ht,3,1,"button",38,y),b(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),I("searchable",!0),r(4),x(t.destinationTypeOptions())}}function Lt(i,n){if(i&1){let t=E();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),p(1,"spk-icon",28),T())}function wt(i,n){i&1&&(u(0,4,2),p(1,"spk-icon"),T())}function Bt(i,n){if(i&1){let t=E();s(0,"spk-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),f(3,11),F(),s(4,"spk-alert",22),f(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),N(11,"Cancel"),F(),s(12,"button",47),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),I("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(Et);injector=O(j);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=G(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=H({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([dt])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=w(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=w(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let V;V=$localize`All destinations`;let W;W=$localize`Edit target URL`;let z;z=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,K,V,W,z,X,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"disabled","loader"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["spk-button","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=E();s(0,"form",14,0),S("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,Nt,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),L(10,19),s(11,"button",20),S("click",function(){return _(e),c(o.openTargetUrlDialog())}),p(12,"spk-icon"),F(),D(13,ft,3,0,"button",18),b(),F()(),T(),F(),D(14,kt,3,0,"spk-alert")(15,$t,3,0,"spk-alert",21)(16,At,3,1,"spk-alert",22)(17,Mt,3,1,"spk-alert",23),D(18,Pt,5,1,"p"),F(),D(19,xt,9,1),D(20,Lt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),S("click",function(){return _(e),c(o.goBack())}),u(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"spk-icon",28)(28,wt,2,0,"spk-icon"),T(),F()()(),D(29,Bt,15,4,"spk-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),d(e?6:-1),r(7),d(e?13:-1),r(),d(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),d(e?18:-1),r(),d(e?-1:19),r(),d(e?20:-1),r(5),I("disabled",o.testSignal()=="testing"||!e),r(2),d(o.testSignal()=="testing"?27:28),r(2),d(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,St,gt,_t,ct,ut,pt,Tt,rt,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-N57J64DN.js";import{a as se,b as ae}from"./chunk-2G6TVFPZ.js";import{h as ie}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{c as Z,e as J,i as ee,k as ne,s as te,t as oe}from"./chunk-NSIELNIY.js";import{b as V,d as q}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as g,Eb as M,Hc as k,Kb as S,Lb as O,Mb as r,Oc as W,Qa as p,Qb as I,Rb as c,Z as C,Zb as x,_b as G,ab as K,bc as U,da as P,ea as f,jc as u,kc as d,lc as m,na as v,sb as N,sc as X,tb as F,xb as T,yb as t,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,l){s&1&&(S(0,1,1),g(1,"spk-icon",20),O())}function ce(s,l){s&1&&(t(0,"p",21),r(1,6),i())}function ue(s,l){s&1&&(t(0,"p"),r(1,7),i())}function de(s,l){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,a)||(o.optionsFields.backupRetentionTime=a),f(a)}),t(3,"label",30),r(4,9),i()()}if(s&2){let n=c();p(2),T("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,l){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,a)||(o.optionsFields.backupRetentionVersions=a),f(a)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,l){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,l){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,a)||(o.optionsFields.backupRetentionCustom=a),f(a)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Te=["Bytes","KB","MB","GB","TB","PB"],ge=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(ie);#n=C(q);#t=C(V);formRef=W.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=v(ge);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let l=this.sizeSplit().value,n=this.sizeSplit().unit;if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,Te.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&x(e.formRef,_e,5),n&2&&G()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[l,n,e,a,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),g(12,"spk-icon",23),i(),O(),i()(),t(13,"spk-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),g(26,"spk-icon"),O(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),g(29,"spk-icon"),O(),i()()()),n&2&&(p(4),T("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),T("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),T("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",X(15,re)),p(5),U("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,le,H,Y,j,se,ae,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"./chunk-LDIZ5E5Z.js";import{a as w}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-LDIZ5E5Z.js";import{a as w}from"./chunk-J6BHRR34.js";import{a as b}from"./chunk-6JQM2X3B.js";import"./chunk-3ZVSHKLD.js";import"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as I,g as U,p as $}from"./chunk-Y5IRBMLB.js";import{h as x}from"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as d,Eb as f,H as m,Hc as L,Kb as v,Lb as M,Mb as F,Na as O,Nb as E,Ob as T,Qa as l,Qb as k,Rb as c,Z as _,ab as P,bc as D,da as g,ea as C,ec as u,fc as R,na as S,r as G,sb as s,tb as p,xb as h,yb as a,zb as r}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"spk-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),v(1,2),d(2,"spk-icon"),M(),r()),n&2){let e,t,i=c(2);h("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),E((t=i.serverState())==null?null:t.UpdatedVersion),T(1)}}function X(n,o){if(n&1){let e=f();a(0,"button",6),k("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();D("loader",t.checkingForUpdates()),l(2),p((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function z(n,o){if(n&1){let e=f();a(0,"button",6),k("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function K(n,o){n&1&&d(0,"spk-progress-bar",3)}var A=class n{#e=_(x);#t=_(w);#n=_(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=L(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"spk-progress-bar",3),a(1,"section")(2,"h3"),F(3,0),r(),a(4,"p"),F(5,1),r(),a(6,"div",4),s(7,X,3,3)(8,z,2,0,"button",5),s(9,K,1,0,"spk-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,N;p(t.isLoading()?0:-1),l(5),E(t.duplicatiVersion()),T(5),l(2),p(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),p(((N=t.serverState())==null?null:N.UpdaterState)==="Downloading"?9:-1),l(2),R(t.generalInfo())}},dependencies:[$,U,I],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{A as default};
|