@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
package/chunk-6JDDO2JR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ct,b as mt,c as It}from"./chunk-FCCV5HAI.js";import"./chunk-X7SFNRJF.js";import"./chunk-2G6TVFPZ.js";import"./chunk-ZFONU33Q.js";import{h as St}from"./chunk-FUEIZLWH.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import{a as E}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{c as ct,e as ut,f as _t,g as Tt,i as pt,j as gt,r as Dt,s as dt}from"./chunk-NSIELNIY.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 b,Cb as U,Eb as C,Hc as L,Kb as _,Lb as T,Mb as O,Nb as A,Ob as $,Oc as et,Pb as w,Qa as r,Qb as D,Rb as l,Z as m,Zb as Y,_b as q,ab as Q,bc as J,da as c,ea as u,ec as k,fc as G,gc as Z,ha as H,jc as P,kc as M,lc as y,na as I,sb as d,sc as tt,tb as S,ub as x,vb as B,wb as R,xb as N,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],Et=()=>({maxWidth:"700px",width:"100%"});function ft(i,o){if(i&1){let t=C();_(0,2,1),s(1,"button",30),D("click",function(){c(t);let e=l();return u(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),J("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function kt(i,o){if(i&1){let t=C();_(0,2,2),s(1,"button",20),D("click",function(){c(t);let e=l();return u(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function Ot(i,o){i&1&&(s(0,"spk-alert"),_(1,5),p(2,"spk-icon",31),T(),F())}function At(i,o){i&1&&(s(0,"spk-alert",21),_(1,6),p(2,"spk-icon",31),T(),F())}function $t(i,o){if(i&1&&(s(0,"spk-alert",22),_(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),A(t.testErrorMessage()),$(1)}}function Pt(i,o){if(i&1&&(s(0,"spk-alert",23),_(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),A(t.testErrorMessage()),$(1)}}function Mt(i,o){if(i&1){let t=C();s(0,"p",32),D("click",function(){c(t);let e=l();return u(e.removeDestination())}),_(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,n=l();r(4),A((t=n.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,o){if(i&1){let t=C();s(0,"div",39),D("click",function(){let e=c(t).$implicit,a=l(2);return u(a.setDestination(e.key))}),s(1,"h3"),k(2),F(),s(3,"p"),k(4),F()()}if(i&2){let t=o.$implicit;r(2),G(t.displayName),r(2),G(t.description)}}function ht(i,o){if(i&1){let t=C();s(0,"button",40,1),D("click",function(){let e=c(t).$implicit,a=l(2);return u(a.setDestination(e.key))}),k(2),F()}if(i&2){let t=o.$implicit;r(2),Z(" ",t.displayName," ")}}function xt(i,o){if(i&1&&(s(0,"div",34),B(1,yt,5,2,"div",35,x),F(),s(3,"spk-menu",36)(4,"button",37),O(5,10),F(),b(6,19),B(7,ht,3,1,"button",38,x),U(),F()),i&2){let t=l();r(),R(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),R(t.destinationTypeOptions())}}function Bt(i,o){if(i&1){let t=C();s(0,"app-single-destination",41),y("targetUrlChange",function(e){c(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),u(e)}),F()}if(i&2){let t=l();P("targetUrl",t.targetUrlModel),N("useBackupState",!0)}}function Rt(i,o){i&1&&(_(0,4,1),p(1,"spk-icon",28),T())}function bt(i,o){i&1&&(_(0,4,2),p(1,"spk-icon"),T())}function Ut(i,o){if(i&1){let t=C();s(0,"spk-dialog",42),y("isOpenChange",function(e){c(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),u(e)}),s(1,"header",43)(2,"h2"),O(3,11),F(),s(4,"spk-alert",22),O(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),y("ngModelChange",function(e){c(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),u(e)}),F()()(),s(9,"footer",46)(10,"button",26),D("click",function(){c(t);let e=l();return u(e.closeTargetUrlDialog(!1))}),k(11,"Cancel"),F(),s(12,"button",47),D("click",function(){c(t);let e=l();return u(e.closeTargetUrlDialog(!0))}),_(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();P("isOpen",t.targetUrlDialogOpen),N("options",tt(3,Et)),r(8),P("ngModel",t.targetUrlCtrl)}}var h=new Dt,te=(i={destinations:[]})=>h.group({destinations:h.array(i.destinations)}),ee=({key:i,customGroup:o,dynamicGroup:t,advancedGroup:n})=>h.group({destinationType:h.control(i),custom:o,dynamic:t,advanced:n}),v=class i{#i=m(it);#o=m(nt);#t=m(St);#a=m(mt);#e=m(Ft);#s=m(Ct);injector=m(H);formRef=et.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=I(null);targetUrlInitial=I(null);targetUrlDialogOpen=I(!1);toggleNewDestination=I(!0);destinationTypeOptionsInFocus=I(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#a.destinationTypeOptions;testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsFocused=L(()=>{let o=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return o.map(n=>t.find(e=>e.key===n))});selectedDestinationType=L(()=>{let o=this.#t.targetUrlModel();if(!o)return null;let t=o.split("://")[0];return this.destinationTypeOptions().find(e=>t===e.key)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.targetUrlModel()??"")}openTargetUrlDialog(){let o=this.#t.targetUrlModel();this.targetUrlCtrl.set(o),this.targetUrlInitial.set(o),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(o=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();!o||t===n||!t||this.#t.setTargetUrl(t)}testDestination(o,t,n){let e=this.#t.targetUrlModel();e&&(this.#t.setTestState("testing"),this.#s.testDestination(e,o,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),this.#t.isNew()&&(a.containsBackup===!0?(this.#t.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),t||this.#e.open(E,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#t.setTestState("warning",$localize`The remote destination contains unknown files.`),t||this.#e.open(E,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),n?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){n?.();return}let f=e.includes("?");a.action==="trust-cert"&&this.#t.setTargetUrl(e+`${f?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.setTargetUrl(e+`${f?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):n?.()}}))}setDestination(o){this.#t.setTargetUrl(`${o}://`)}removeDestination(){this.#t.setTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let o=this.#t.isNew(),t=this.testSignal();if(!o){this.#n();return}if(t===""){this.#e.open(E,{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:n=>{n?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(E,{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(t!=="success"){this.#e.open(E,{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:n=>{n&&this.#n()}});return}this.#n()}#n(){this.#t.isNew()||this.#t.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Q({type:i,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&Y(n.formRef,Nt,5),t&2&&q()},decls:30,vars:9,consts:()=>{let o;o=$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:`,o=w(o);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$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 `,n=w(n);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 f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$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 z;z=$localize`All destinations`;let X;X=$localize`Edit target URL`;let W;W=$localize`Be careful, this will overwrite everything you have in your destination.`;let j;return j=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],o,t,n,e,a,f,K,V,z,X,W,j,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","disabled"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl","useBackupState"],[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","useBackupState"],[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,n){if(t&1){let e=C();s(0,"form",14,0),D("submit",function(){return c(e),u(n.next())}),s(2,"header")(3,"h3",15),_(4,2),s(5,"div",16),d(6,ft,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),b(10,19),s(11,"button",20),D("click",function(){return c(e),u(n.openTargetUrlDialog())}),p(12,"spk-icon"),F(),d(13,kt,3,0,"button",18),U(),F()(),T(),F(),d(14,Ot,3,0,"spk-alert")(15,At,3,0,"spk-alert",21)(16,$t,3,1,"spk-alert",22)(17,Pt,3,1,"spk-alert",23),d(18,Mt,5,1,"p"),F(),d(19,xt,9,1),d(20,Bt,1,2,"app-single-destination",24),s(21,"div",25)(22,"button",26),D("click",function(){return c(e),u(n.goBack())}),_(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),_(26,4),d(27,Rt,2,0,"spk-icon",28)(28,bt,2,0,"spk-icon"),T(),F()()(),d(29,Ut,15,4,"spk-dialog",29)}if(t&2){let e=!!n.targetUrlModel();r(6),S(e?6:-1),r(7),S(e?13:-1),r(),S(n.testSignal()=="testing"?14:n.testSignal()=="success"?15:n.testSignal()=="warning"?16:n.testSignal()=="error"?17:-1),r(4),S(e?18:-1),r(),S(e?-1:19),r(),S(e?20:-1),r(5),N("disabled",n.testSignal()=="testing"||!e),r(2),S(n.testSignal()=="testing"?27:28),r(2),S(n.targetUrlDialogOpen()?29:-1)}},dependencies:[It,dt,gt,ct,ut,_t,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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}"],changeDetection:0})};export{te as createDestinationForm,ee as createDestinationFormGroup,v as default};
|
package/chunk-6NTCVCCY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as J}from"./chunk-VPTK3JCV.js";import"./chunk-32366MQR.js";import{g as q}from"./chunk-3B3CD5KI.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-LDIZ5E5Z.js";import{b as Z}from"./chunk-B5ABLFSQ.js";import"./chunk-43A44MVC.js";import{a as K}from"./chunk-ROOTIQEO.js";import"./chunk-FUZLIOUQ.js";import{a as H}from"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{a as V}from"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{b as w}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as W,h as X,p as z,s as B}from"./chunk-Y5IRBMLB.js";import{h as j}from"./chunk-DNJOKPEL.js";import{qa as b}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as S,Bb as T,Cb as u,Hc as x,Kb as y,Lb as v,Mb as r,Nb as D,Ob as I,Qa as _,Rb as g,Z as R,ab as L,ec as M,fa as C,ga as f,hc as F,na as A,sb as p,tb as O,wc as d,xb as P,xc as m,yb as i,zb as s}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"spk-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"spk-card",10),T(1,16),r(2,2),u(),p(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();_(3),O(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),d(1,"number"),d(2,"number")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(T(0),r(1,8),u())}function ne(n,t){if(n&1&&(M(0),d(1,"bytes"),d(2,"bytes")),n&2){let e,o=g(2);F(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(T(0),r(1,9),u())}function ie(n,t){if(n&1&&(i(0,"spk-card",10)(1,"h3"),y(2,5),S(3,"spk-spinner",23),v(),s(),i(4,"div",24),S(5,"spk-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),p(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),p(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,c=g();_(3),D((e=c.statusData())==null?null:e.statusText),I(2),_(2),P("value",(o=c.statusData())==null?null:o.OverallProgress),_(4),O((l=c.statusData())!=null&&l.ProcessedFileCount?9:10),_(5),O((E=c.statusData())!=null&&E.ProcessedFileSize?14:15)}}var N=class n{#i=R(j);#s=R(H);#t=R(K);#n=R(q);#r=R(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=A("");#e=null;lastRestoreStarted=x(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return{predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??!1}};ngOnInit(){let t=this.#r.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#a(e.ID);return}this.#o(e)},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.")}})}#a(t){this.#s.waitForTaskToComplete(t).subscribe(e=>{this.#o(e)})}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error")}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=L({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let c;c=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let G;G=$localize`Files processed:`;let k;k=$localize`Size processed:`;let $;$=$localize`N/A`;let h;return h=$localize`N/A`,[t,e,o,l,E,c,G,k,$,h,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,o){if(e&1&&(i(0,"section"),p(1,Y,5,1,"spk-card",10)(2,ie,16,4,"spk-card",10),i(3,"spk-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),S(7,"app-notifications",13),s()(),i(8,"spk-card",14)(9,"h3"),r(10,1),s(),S(11,"app-logs-live",15),s()()),e&2){let l;_(),O(o.restoreResult()!=""?1:2),_(6),P("notificationFilterPredicate",o.notificationFilterPredicate()),_(4),P("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[J,z,B,W,X,Z,V,b],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{N as default};
|
package/chunk-7HKUM56D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as se,b as _e}from"./chunk-2G6TVFPZ.js";import{a as pe}from"./chunk-XIIFTZ5G.js";import{a as te}from"./chunk-6JQM2X3B.js";import{b as ne,c as ie,e as oe,i as re,k as le,s as ae}from"./chunk-NSIELNIY.js";import{A as Z,C as ee,a as q,g as H,l as J,o as Q,t as W,z as Y}from"./chunk-Y5IRBMLB.js";import{ea as j}from"./chunk-CWLTHXVS.js";import{$b as x,Ab as h,Ac as P,Bb as v,Cb as M,Db as T,Eb as C,Hc as B,Kb as $,Lb as b,Mb as K,Nc as N,Qa as l,Qb as g,Qc as X,Rb as p,Z as G,ab as z,bc as A,da as d,ea as u,ec as m,fb as f,fc as D,gc as k,mc as U,na as E,nc as R,oc as S,sb as O,tb as F,ub as V,vb as I,wb as L,xb as _,yb as a,zb as s}from"./chunk-BTMXQPBB.js";import{a as w,b as y}from"./chunk-EUDKD2JW.js";function de(t,o){if(t&1){let e=C();a(0,"button",14),g("click",function(){d(e);let n=p();return u(n.addFreeTextSetting())}),$(1,6),h(2,"spk-icon"),b(),s()}}function ue(t,o){if(t&1){let e=C();a(0,"button",16,0),g("click",function(){let n=d(e).$implicit,r=p(2);return u(r.addSetting(n))}),m(2),s()}if(t&2){let e=o.$implicit;A("deprecated",e.deprecatedDescription),l(2),k(" ",e.name," ")}}function ge(t,o){if(t&1&&(a(0,"h3",8),m(1),s(),I(2,ue,3,3,"button",15,V)),t&2){let e=o.$implicit;l(),D(e.displayName),l(),L(e.options)}}function Ce(t,o){t&1&&(a(0,"div",13),m(1,"Add a setting above to get started."),s())}function fe(t,o){t&1&&(a(0,"spk-icon",24),m(1," warning-octagon "),s())}function xe(t,o){if(t&1&&(a(0,"spk-icon",25),m(1,"archive"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.deprecatedDescription)}}function Se(t,o){if(t&1&&(a(0,"spk-icon",26),m(1,"question"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.longDescription)}}function Te(t,o){if(t&1&&(O(0,fe,2,0,"spk-icon",24),a(1,"span"),m(2),s(),O(3,xe,2,1,"spk-icon",25)(4,Se,2,1,"spk-icon",26)),t&2){let e=p().$implicit,i=S(1);F(i?0:-1),l(),A("deprecated",e.FormView.deprecatedDescription),l(),D(e.FormView.shortDescription),l(),F(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Oe(t,o){t&1&&T(0)}function Fe(t,o){if(t&1){let e=C();a(0,"div",18)(1,"label"),f(2,Oe,1,0,"ng-container",27),s(),a(3,"div",28)(4,"spk-form-field")(5,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateFreeTextSettingName(r,n))}),s(),a(6,"spk-icon",30),m(7,"rectangle-dashed"),s()(),a(8,"spk-form-field")(9,"input",29),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(10,"spk-icon",30),m(11,"textbox"),s()()()()}if(t&2){let e=p().$implicit,i=x(3);l(2),_("ngTemplateOutlet",i),l(3),_("ngModel",e.Name),l(4),_("ngModel",e.Value())}}function we(t,o){t&1&&T(0)}function ye(t,o){if(t&1){let e=C();a(0,"app-file-tree",19)(1,"label",31),f(2,we,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ve(t,o){if(t&1){let e=C();a(0,"app-file-tree",20),h(1,"label",31),a(2,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=S(0);_("startingPath",e.Value()),l(),_("for",i),l(),_("id",i)("ngModel",e.Value())}}function Ie(t,o){t&1&&T(0)}function Le(t,o){t&1&&(a(0,"spk-icon",30),m(1,"link"),s())}function he(t,o){t&1&&(a(0,"spk-icon",30),m(1,"textbox"),s())}function Me(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Ie,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),O(4,Le,2,0,"spk-icon",30)(5,he,2,0,"spk-icon",30),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value()),l(),F(e.FormView.type==="Path"?4:5)}}function ke(t,o){t&1&&T(0)}function Pe(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye "),s()}}function Ne(t,o){if(t&1){let e=C();a(0,"spk-icon",35),g("click",function(){d(e);let n=p(2).$implicit;return u(n.showPassword=!n.showPassword)}),m(1," eye-slash "),s()}}function Ee(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,ke,1,0,"ng-container",27),s(),a(3,"input",33),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"password"),s(),O(6,Pe,2,0,"spk-icon",34)(7,Ne,2,0,"spk-icon",34),s()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),F(e.showPassword?6:7)}}function ve(t,o){t&1&&T(0)}function $e(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function be(t,o){if(t&1){let e=C();a(0,"spk-select",36)(1,"label",31),f(2,ve,1,0,"ng-container",27),s(),a(3,"input",32),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,$e,1,1,"ng-template",null,2,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("isClearable",!1)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("id",r)("ngModel",i.Value())}}function Ae(t,o){t&1&&T(0)}function De(t,o){if(t&1){let e=C();a(0,"app-size",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,Ae,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function Re(t,o){t&1&&T(0)}function Be(t,o){if(t&1){let e=C();a(0,"spk-form-field")(1,"label",31),f(2,Re,1,0,"ng-container",27),s(),a(3,"input",38),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),m(5,"numpad"),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ge(t,o){t&1&&T(0)}function ze(t,o){if(t&1){let e=C();a(0,"spk-toggle",22)(1,"label",31),f(2,Ge,1,0,"ng-container",27),s(),a(3,"input",39),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);l(),_("for",n),l(),_("ngTemplateOutlet",i),l(),_("id",n)("ngModel",e.Value())}}function Ke(t,o){t&1&&T(0)}function Ue(t,o){if(t&1&&m(0),t&2){let e=o.$implicit;k(" ",e," ")}}function Xe(t,o){if(t&1){let e=C();a(0,"spk-select",40)(1,"label",31),f(2,Ke,1,0,"ng-container",27),s(),a(3,"input",41),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),s()(),f(4,Ue,1,1,"ng-template",null,3,P)}if(t&2){let e=x(5),i=p().$implicit,n=x(3),r=S(0);_("options",i.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),_("for",r),l(),_("ngTemplateOutlet",n),l(),_("ngModel",i.Value())}}function je(t,o){t&1&&T(0)}function qe(t,o){if(t&1){let e=C();a(0,"app-timespan",37),g("ngModelChange",function(n){d(e);let r=p().$implicit,c=p();return u(c.updateSettingValue(r,n))}),a(1,"label",31),f(2,je,1,0,"ng-container",27),s()()}if(t&2){let e=p().$implicit,i=x(3),n=S(0);_("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),_("for",n),l(),_("ngTemplateOutlet",i)}}function He(t,o){if(t&1){let e=C();U(0)(1),f(2,Te,5,5,"ng-template",null,1,P),a(4,"div",17),O(5,Fe,12,3,"div",18)(6,ye,4,9,"app-file-tree",19)(7,Ve,3,4,"app-file-tree",20)(8,Me,6,5,"spk-form-field")(9,Ee,8,6,"spk-form-field")(10,be,6,7)(11,De,3,5,"app-size",21)(12,Be,6,4,"spk-form-field")(13,ze,4,4,"spk-toggle",22)(14,Xe,6,6)(15,qe,3,5,"app-timespan",21),a(16,"button",23),g("click",function(){let n=d(e).$implicit,r=p();return u(r.removeSetting(n))}),a(17,"spk-icon"),m(18,"x-bold"),s()()()}if(t&2){let e=o.$implicit,i=o.$index,n=p();R("destination-"+e.Name+i),l(),R(n.inAppOptions(e.Name)),l(4),F(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}var ce=class t{#e=G(te);options=X.required();hiddenOptions=N([]);hasFreeTextSettings=N(!1);applicationOptions=N();allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=B(()=>{let o=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(me=>me.name===n.Name?.replace("--","")),c=n.Value??"";return r&&o.includes(r.name)?null:r?(r.type==="Boolean"&&(c=c&&c.toLowerCase()==="true"||!1),r.type==="Integer"&&(c=parseInt(c)||0),y(w({},n),{Value:E(c),FormView:r})):this.hasFreeTextSettings()?y(w({},n),{Value:E(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}}):null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=B(()=>{let o=this.options().map(i=>i.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>y(w({},i),{options:i.options.filter(n=>!o.includes(n.name)&&!e.includes(n.name))})).filter(i=>i.options.length>0)});inAppOptions(o){let e=this.applicationOptions()?.findIndex(i=>i.Name?.replace("--","")===o);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return o.FormView.type==="Boolean"?(n[r].Value=e?"True":"False",n):o.FormView.type==="Integer"?(n[r].Value=e.toString(),n):(n[r].Value=e,n)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let n=[...i],r=n.findIndex(c=>c.Name===o.Name);return n[r].Name=e,n})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let n;return n=$localize`By adding this option it will override the matching global option`,[["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],["spkTooltip",n,1,"error"],[1,"warn",3,"spkTooltip"],[1,"primary",3,"spkTooltip"],[4,"ngTemplateOutlet"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(a(0,"spk-toggle-card",7),v(1,8)(2),K(3,4),M(),a(4,"div",9),O(5,de,3,0,"button",10),a(6,"spk-menu",11)(7,"button",10),$(8,5),h(9,"spk-icon"),b(),s(),v(10,12),I(11,ge,4,1,null,null,V),M(),s()(),M(),O(13,Ce,2,0,"div",13),I(14,He,19,3,null,null,V),s()),e&2&&(_("disallowToggle",!0),l(5),F(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),L(i.nonSelectedOptionsGrouped()),l(2),F(i.selectedSettings().length===0?13:-1),l(),L(i.selectedSettings()))},dependencies:[ae,ie,le,ne,oe,re,pe,Y,J,H,Q,ee,q,W,Z,se,_e,j],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem;position:relative;z-index:1}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}"],changeDetection:0})};export{ce as a};
|
package/chunk-7N3LIJV6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Z,d as rn}from"./chunk-ZFONU33Q.js";import{a as cn}from"./chunk-XLKQSWFD.js";import{a as ln}from"./chunk-ROOTIQEO.js";import{a as an}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{e as je}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Y,f as qe,g as Je,h as Qe,j as Ye,k as Ze,o as en,p as nn,w as tn,x as on}from"./chunk-Y5IRBMLB.js";import{h as _n}from"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{$b as W,Ab as g,Ac as Q,Bb as M,Cb as m,Db as D,Eb as x,H as w,Ic as We,Kb as s,Lb as u,Mb as p,Nb as y,Ob as L,Pb as q,Qa as l,Qb as f,Rb as F,Z as z,a as ve,ab as he,b as j,bc as B,da as N,ea as k,ec as d,fb as P,fc as ze,gc as O,jc as Ve,kc as Ke,lc as Ue,na as H,pb as Xe,qb as we,sb as S,sc as J,tb as E,tc as $,ub as V,vb as K,wb as U,wc as I,xb as T,xc as G,yb as o,yc as b,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function sn(...n){let t=H(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}function un(n,t,e){let _=localStorage.getItem(t);_!=null&&(n=JSON.parse(_));let r=sn(n),c=r[ve];e?.equal&&(c.equal=e.equal);function R(C){C==null?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(C))}return r.set=C=>{R(C),j(c,C)},r.update=C=>{let A=C(r());R(A),j(c,A)},r}var gn=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Y,Ye,on,tn,import("./chunk-Y5UKX3VC.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-IQHBPLHL.js").then(n=>n.RelativeTimePipe)],dn=()=>["/add-backup"],Tn=()=>["/restore"],Fn=n=>({$implicit:n}),Cn=n=>["/backup",n],Sn=n=>["/restore",n],En=n=>["/backup",n,"export"],Mn=n=>["/backup",n,"delete"],mn=n=>["/backup",n,"database"],On=n=>["/backup",n,"commandline"],Nn=n=>["/backup",n,"log"];function kn(n,t){if(n&1){let e=x();o(0,"button",57),f("click",function(){let r=N(e).$implicit,c=F(2);return k(c.sortByColumn.set(r.value))}),p(1,15),i()}if(n&2){let e=t.$implicit,_=F(2);B("active",_.orderBy()===e.value),l(),y(e.label),L(1)}}function Pn(n,t){if(n&1&&(o(0,"spk-menu",58)(1,"button",59),s(2,14),g(3,"strong")(4,"spk-icon"),u(),i(),M(5,60),K(6,kn,2,3,"button",61,V),m(),i()),n&2){let e=F();l(4),y(e.orderBy()),L(2),l(2),U(e.sortOrderOptions())}}function fn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,_=F(4);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function $n(n,t){n&1&&(M(0),p(1,21),m())}function Dn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function In(n,t){n&1&&(M(0),p(1,22),m())}function An(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Rn(n,t){n&1&&(M(0),p(1,23),m())}function Hn(n,t){n&1&&D(0)}function yn(n,t){if(n&1&&(o(0,"div",64)(1,"div",51)(2,"h3"),d(3),o(4,"spk-chip")(5,"spk-icon"),d(6),i(),d(7),i()(),o(8,"p")(9,"span"),p(10,16),i(),d(11),I(12,"relativeTime"),i(),o(13,"p")(14,"span"),p(15,17),i(),S(16,fn,2,4)(17,$n,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,18),i(),S(21,Dn,2,3)(22,In,2,0,"ng-container"),i(),o(23,"p")(24,"span"),p(25,19),i(),S(26,An,2,3)(27,Rn,2,0,"ng-container"),i()(),o(28,"spk-chip",65),p(29,20),i(),o(30,"div",55),P(31,Hn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,_=F(4),r=W(51);l(3),O(" ",(e.Backup==null?null:e.Backup.Name)??_.MISSING_BACKUP_NAME," "),l(3),ze(_.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),l(),O(" ",_.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(4),O(" ",b(12,11,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?16:17),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?21:22),l(5),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?26:27);let c=_.getBackupVersionCount(e);l(3),y(c)(c),L(29),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(14,Fn,e))}}function Ln(n,t){if(n&1&&K(0,yn,32,16,"div",64,V),n&2){let e=F(3);U(e.backups())}}function Bn(n,t){n&1&&(M(0),p(1,24),m())}function xn(n,t){if(n&1&&(o(0,"div",62),S(1,Ln,2,0)(2,Bn,2,0,"ng-container"),i()),n&2){let e=F(2);l(),E(e.backups().length?1:2)}}function Gn(n,t){n&1&&(s(0,25,1),D(1),u())}function bn(n,t){n&1&&(s(0,26,1),D(1),u())}function vn(n,t){n&1&&(s(0,27,1),D(1),u())}function hn(n,t){n&1&&(s(0,28,1),D(1),u())}function Xn(n,t){n&1&&(s(0,29,1),D(1),u())}function wn(n,t){n&1&&(s(0,30,1),D(1),u())}function zn(n,t){if(n&1&&(d(0),I(1,"relativeTime")),n&2){let e=F().$implicit,_=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Vn(n,t){n&1&&(M(0),p(1,34),m())}function Kn(n,t){if(n&1&&(d(0),I(1,"durationFormat")),n&2){let e=F().$implicit,_=F(3);O(" ",b(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Un(n,t){n&1&&(M(0),p(1,35),m())}function Wn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function jn(n,t){n&1&&(M(0),p(1,36),m())}function qn(n,t){if(n&1&&(d(0),I(1,"bytes")),n&2){let e=F().$implicit;O(" ",G(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Jn(n,t){n&1&&(M(0),p(1,37),m())}function Qn(n,t){n&1&&D(0)}function Yn(n,t){if(n&1&&(o(0,"tr")(1,"td"),d(2),i(),o(3,"td"),d(4),i(),o(5,"td"),S(6,zn,2,4)(7,Vn,2,0,"ng-container"),i(),o(8,"td"),S(9,Kn,2,4)(10,Un,2,0,"ng-container"),i(),o(11,"td"),S(12,Wn,2,3)(13,jn,2,0,"ng-container"),i(),o(14,"td"),S(15,qn,2,3)(16,Jn,2,0,"ng-container"),i(),o(17,"td")(18,"span"),p(19,33),i()(),o(20,"td"),P(21,Qn,1,0,"ng-container",66),i()()),n&2){let e=t.$implicit,_=F(3),r=W(51);l(2),O(" ",(e.Backup==null?null:e.Backup.Name)??_.MISSING_BACKUP_NAME," "),l(2),O(" ",_.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),l(2),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?9:10),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?12:13),l(3),E(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?15:16);let c=_.getBackupVersionCount(e);l(4),y(c)(c),L(19),l(2),T("ngTemplateOutlet",r)("ngTemplateOutletContext",$(10,Fn,e))}}function Zn(n,t){if(n&1){let e=x();o(0,"spk-table",67),Ue("sortByColumnChange",function(r){N(e);let c=F(2);return Ke(c.sortByColumn,r)||(c.sortByColumn=r),k(r)}),o(1,"tr",68)(2,"th",69),s(3,25),P(4,Gn,2,0,"ng-container",70),u(),i(),o(5,"th",71),s(6,26),P(7,bn,2,0,"ng-container",70),u(),i(),o(8,"th",72),s(9,27),P(10,vn,2,0,"ng-container",70),u(),i(),o(11,"th",73),s(12,28),P(13,hn,2,0,"ng-container",70),u(),i(),o(14,"th",74),s(15,29),P(16,Xn,2,0,"ng-container",70),u(),i(),o(17,"th",75),s(18,30),P(19,wn,2,0,"ng-container",70),u(),i(),o(20,"th"),p(21,31),i(),o(22,"th"),p(23,32),i()(),K(24,Yn,22,12,"tr",null,V),i()}if(n&2){let e=F(2),_=W(53);T("data",e.backups())("loading",e.backupsLoading()),Ve("sortByColumn",e.sortByColumn),l(4),T("ngTemplateOutlet",_),l(3),T("ngTemplateOutlet",_),l(3),T("ngTemplateOutlet",_),l(3),T("ngTemplateOutlet",_),l(3),T("ngTemplateOutlet",_),l(3),T("ngTemplateOutlet",_),l(5),U(e.backups())}}function et(n,t){if(n&1&&S(0,xn,3,1,"div",62)(1,Zn,26,9,"spk-table",63),n&2){let e=F();E(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function nt(n,t){n&1&&(o(0,"div",76),g(1,"spk-progress-bar",77),o(2,"div",51)(3,"h3"),p(4,38),i()()())}function tt(n,t){n&1&&p(0,39,1)}function it(n,t){n&1&&(o(0,"spk-icon"),d(1,"check"),i())}function ot(n,t){n&1&&(o(0,"spk-icon"),d(1,"dots-three-vertical"),i())}function _t(n,t){if(n&1){let e=x();o(0,"button",78),f("click",function(){let r=N(e).$implicit,c=F();return k(c.startBackup(r.Backup==null?null:r.Backup.ID))}),s(1,39),g(2,"spk-icon"),S(3,tt,1,0),u(),i(),o(4,"button",79)(5,"spk-icon"),d(6,"pencil-simple"),i()(),o(7,"spk-menu",80)(8,"button",52),S(9,it,2,0,"spk-icon")(10,ot,2,0,"spk-icon"),i(),M(11,60),o(12,"h3",81),d(13,"Operations"),i(),o(14,"button",82),s(15,40),g(16,"spk-icon"),u(),i(),o(17,"button",82),s(18,41),g(19,"spk-icon"),u(),i(),o(20,"button",82),s(21,42),g(22,"spk-icon"),u(),i(),g(23,"spk-divider"),o(24,"h3",81),d(25,"Advanced"),i(),o(26,"button",82),s(27,43),g(28,"spk-icon"),u(),i(),o(29,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.verifyFiles(r.Backup==null?null:r.Backup.ID))}),s(30,44),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.compressBackup(r.Backup==null?null:r.Backup.ID))}),s(33,45),g(34,"spk-icon"),u(),i(),o(35,"button",82),s(36,46),g(37,"spk-icon"),u(),i(),g(38,"spk-divider"),o(39,"h3",81),d(40,"Reporting"),i(),o(41,"button",82),s(42,47),g(43,"spk-icon"),u(),i(),o(44,"button",57),f("click",function(){let r=N(e).$implicit,c=F();return k(c.createErrorReport(r.Backup==null?null:r.Backup.ID))}),s(45,48),g(46,"spk-icon"),u(),i(),m(),i()}if(n&2){let e=t.$implicit,_=F();B("loader",_.startingBackup()===(e.Backup==null?null:e.Backup.ID)),l(3),E(_.viewMode()==="list"?3:-1),l(),T("routerLink",$(16,Cn,e.Backup==null?null:e.Backup.ID)),l(3),T("right",!0),l(),B("loader",_.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",_.successId()===(e.Backup==null?null:e.Backup.ID)),l(),E(_.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),l(5),T("routerLink",$(18,Sn,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(20,En,e.Backup==null?null:e.Backup.ID)),l(3),T("routerLink",$(22,Mn,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(24,mn,e.Backup==null?null:e.Backup.ID)),l(9),T("routerLink",$(26,On,e.Backup==null?null:e.Backup.ID)),l(6),T("routerLink",$(28,Nn,e.Backup==null?null:e.Backup.ID))}}function at(n,t){n&1&&(o(0,"spk-icon",83),d(1,"funnel-simple"),i(),o(2,"spk-icon",84),d(3,"sort-ascending"),i(),o(4,"spk-icon",85),d(5,"sort-descending"),i())}var pn={file:{Display:$localize`Local`,Icon:null}},ee=class n{#n=z(_n);#t=z(ln);#e=z(an);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=un("list","viewMode");sortByColumn=H(this.#e.orderBy());loadingId=H(null);successId=H(null);sortEffect=We(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#t.resumeDialogCheck(()=>this.#e.startBackup(t))}getBackendIcon(t){if(!t)return"";let e=t.split("://")[0],_=Z(e);return pn[_.key]?.Icon??"database"}getBackendType(t){if(!t)return"";let e=t.split("://")[0],_=Z(e);if(!_)return"";let r=pn[_.key];if(r?.Display)return r.Display;if(_.key==="s3"){let c="http://null?"+t.split("?")[1],C=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[A,v]of Object.entries(rn))if(C.endsWith(A))return v}return _.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdVerify({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCompact({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}createErrorReport(t){this.loadingId.set(t),this.#n.postApiV1BackupByIdCreatereport({id:t}).pipe(w(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=he({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let t;t=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let r;r=$localize`Restores`;let c;c=$localize`Restores allow you to restore your data from the cloud.`;let R;R=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let C;C=$localize`My backups`;let A;A=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let v;v=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ne;ne=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let te;te=$localize`Relative time`;let ie;ie=$localize`Actual time`;let oe;oe=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let _e;_e=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let le;le=$localize`Duration:`;let re;re=$localize`Source:`;let ce;ce=$localize`Destination:`;let h;h=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,h=q(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let se;se=$localize` ${h}:ICU@@6502601490918455200: `;let ue;ue=$localize`N/A`;let pe;pe=$localize`N/A`;let Fe;Fe=$localize`N/A`;let ge;ge=$localize`No backups founds`;let de;de=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Last successful backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Duration ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Source ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Me;Me=$localize` Destination ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let me;me=$localize`Version`;let Oe;Oe=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=q(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${X}:ICU@@6502601490918455200: `;let ke;ke=$localize`N/A`;let Pe;Pe=$localize`N/A`;let fe;fe=$localize`N/A`;let $e;$e=$localize`N/A`;let De;De=$localize`Loading backups...`;let Ie;Ie=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ae;Ae=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let Re;Re=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let He;He=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let ye;ye=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let Le;Le=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Be;Be=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let xe;xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Ge;Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let be;return be=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `,[["actions",""],["sortIcons",""],t,e,_,r,c,R,C,A,v,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,pe,Fe,ge,de,Te,Ce,Se,Ee,Me,me,Oe,Ne,ke,Pe,fe,$e,De,Ie,Ae,Re,He,ye,Le,Be,xe,Ge,be,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,_){if(e&1){let r=x();g(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",49),g(4,"img",50),o(5,"div",51)(6,"h3"),p(7,2),i(),o(8,"p"),p(9,3),i()(),o(10,"button",52),s(11,4),g(12,"spk-icon"),u(),i()(),o(13,"spk-card",49),g(14,"img",53),o(15,"div",51)(16,"h3"),p(17,5),i(),o(18,"p"),p(19,6),i()(),o(20,"button",52),s(21,7),g(22,"spk-icon"),u(),i()()(),o(23,"div",54)(24,"h2"),M(25),p(26,8),m(),o(27,"div",55)(28,"spk-button-group",56)(29,"button",57),f("click",function(){return N(r),k(_.viewMode.set("list"))}),s(30,9),g(31,"spk-icon"),u(),i(),o(32,"button",57),f("click",function(){return N(r),k(_.viewMode.set("details"))}),s(33,10),g(34,"spk-icon"),u(),i()(),o(35,"spk-menu",58)(36,"button",59),s(37,11),g(38,"strong")(39,"spk-icon"),u(),i(),M(40,60),o(41,"button",57),f("click",function(){return N(r),k(_.setTimeType("relative"))}),p(42,12),i(),o(43,"button",57),f("click",function(){return N(r),k(_.setTimeType("actual"))}),p(44,13),i(),m(),i(),S(45,Pn,8,1,"spk-menu",58),i()(),P(46,et,2,1)(47,nt,5,0),Xe(48,46,gn,null,47),i()(),P(50,_t,47,30,"ng-template",null,0,Q)(52,at,6,0,"ng-template",null,1,Q)}e&2&&(l(3),T("routerLink",J(9,dn)),l(10),T("routerLink",J(10,Tn)),l(16),B("active",_.viewMode()==="list"),l(3),B("active",_.viewMode()==="details"),l(7),y(_.timeType()),L(37),l(6),E(_.viewMode()==="list"?45:-1),l(3),we(!_.backupsLoading()))},dependencies:[je,cn,Qe,Je,Y,Ze,en,nn,qe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{ee as default};
|
package/chunk-B5ABLFSQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-43A44MVC.js";import{a as Q}from"./chunk-2BX65XJQ.js";import{b as U,d as H}from"./chunk-2W6BEUGU.js";import{b as K,c as j,e as W,g as q,p as Y}from"./chunk-Y5IRBMLB.js";import{h as J}from"./chunk-DNJOKPEL.js";import{Ab as g,Bb as y,Cb as L,Eb as f,Hc as B,Kb as R,Lb as D,Mb as _,Na as M,Nc as S,Qa as r,Qb as u,Rb as s,Z as N,ab as A,da as C,dc as V,ea as I,ec as F,fc as P,gc as z,mc as G,nc as X,oc as O,sb as d,tb as p,vb as b,wb as v,xb as m,yb as a,zb as l}from"./chunk-BTMXQPBB.js";function it(n,e){if(n&1&&F(0),n&2){s();let t=O(0);z(" ",t.Message," ")}}function nt(n,e){if(n&1&&(a(0,"div"),R(1,1),g(2,"a",15),D(),l()),n&2){s();let t=O(0);r(2),m("href",t.DownloadLink,M)}}function ot(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doRepair(c.BackupID))}),_(1,2),l()}}function at(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doDownloadBugreport(c))}),_(1,3),l()}}function rt(n,e){if(n&1&&g(0,"spk-progress-bar",17),n&2){let t,o=s(2);m("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function lt(n,e){if(n&1){let t=f();a(0,"div",13),y(1),_(2,4),L(),a(3,"a",16),F(4),l(),d(5,rt,1,1,"spk-progress-bar",17),a(6,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowUpdate())}),_(7,5),l()()}if(n&2){let t,o,i=s(),c=O(0);r(3),m("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,M),r(),P(c.Message),r(),p(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function ct(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s(),c=O(0);return I(i.doShowLog(c.BackupID))}),_(1,6),l()}}function _t(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,7),l()}}function st(n,e){if(n&1){let t=f();a(0,"button",14),u("click",function(){C(t);let i=s();return I(i.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),_(1,8),l()}}var dt={Error:"error",Warning:"warn",Information:"primary"},E=class n{#t=N(H);#o=N(U);#a=N(W);#e=N(j);#i=N(x);#n=N(J);serverState=this.#i.serverState;index=S.required();notification=S.required();deleteNotificationByIndex(){this.#i.deleteNotification(this.index())}deleteAllNotifications(){this.#i.deleteAllNotifications()}getAlertType(e){return e&&dt[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.#a.open(Q,{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.#o})},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/${t}`}).subscribe({next:o=>{if(!o.Token){this.#e.error("Failed to get bug report URL: No token generated");return}e.DownloadLink=o.Token},error:o=>{this.#e.error(`Failed to get bug report URL: ${o.message}`)}})}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 $;$=$localize`Show Update`;let h;h=$localize`Show Log`;let k;k=$localize` Show Help `;let w;return w=$localize` Show Help `,[e,t,o,i,c,$,h,k,w,["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();G(0),a(1,"spk-alert")(2,"div",9),F(3),l(),a(4,"div",10),d(5,it,1,1),d(6,nt,3,1,"div"),a(7,"div",11),d(8,ot,2,0,"button",12),d(9,at,2,0,"button",12),d(10,lt,8,3,"div",13),d(11,ct,2,0,"button",12),d(12,_t,2,0,"button",12),d(13,st,2,0,"button",12),a(14,"button",14),u("click",function(){return C(i),I(o.deleteNotificationByIndex())}),_(15,0),l()()()()}if(t&2){let i=X(o.notification());r(),V(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),p(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),p(i!=null&&i.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:")&&!i.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:[Y,q,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var pt=(n,e)=>e.ID;function Nt(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 Tt(n,e){n&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var Z=class n{#t=N(x);notificationFilterPredicate=S();notifications=B(()=>{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&&b(0,Nt,1,2,"app-notification",1,pt,!1,Tt,3,0,"div",2),t&2&&v(o.notifications())},dependencies:[E],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{E as a,Z as b};
|
package/chunk-D7KAEUGB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as se}from"./chunk-XLKQSWFD.js";import{a as le,b as m}from"./chunk-LDIZ5E5Z.js";import"./chunk-ROOTIQEO.js";import{a as te}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import{a as E}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as ae,e as ie,i as ne,s as oe}from"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{b as q,e as j}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{C as x,a as J,e as Q,g as Y,l as Z}from"./chunk-Y5IRBMLB.js";import{h as ee}from"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{Ab as _,D as y,F as g,G,H as A,Hc as D,Ic as k,Kb as d,Lb as u,Mb as F,Nb as U,Ob as w,Qa as r,Qb as S,Z as h,ab as K,bc as P,dc as X,ec as C,jc as z,kc as H,lc as W,na as c,r as v,sb as L,tb as V,xb as p,yb as n,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function re(s,e){s&1&&(n(0,"spk-icon",18),C(1,"spinner"),i())}function ce(s,e){s&1&&(n(0,"spk-icon",19),C(1,"check"),i())}function _e(s,e){s&1&&(n(0,"spk-icon",20),C(1,"warning"),i()),s&2&&p("spkTooltip","File not found")}function pe(s,e){let a=le(s).pipe(y(e),G());return m(a,{initialValue:s()})}var b=class s{#n=h(q);#o=h(te);#e=h(ee);#a=h(Q);#t=c("");backupId=m(this.#n.params.pipe(v(e=>e.id)));activeBackup=D(()=>this.#o.backups().find(e=>e.Backup?.ID===this.backupId()));backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=D(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=D(()=>this.backupFilePath()!==this.#t());isValidatingPath=c(!1);#i=pe(this.backupFilePath,500);isWaitingForValidation=D(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=k(()=>{let e=this.#i(),a=this.activeBackup();e!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:e}}).pipe(g(1),A(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(e)))});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=k(()=>{let e=this.activeBackup();if(!e)return;let a=e.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(e=null){this.isValidatedPath()?this.#a.open(E,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(e)}}):this.doDeleteDatabase(e)}doDeleteDatabase(e=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),A(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),e?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(e=null){this.isValidatedPath()?this.#a.open(E,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(e)}}):this.doSaveDatabasePath(e)}doSaveDatabasePath(e=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(A(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),e?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let e=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:e}}).pipe(A(()=>this.isMovingDb.set(!1))).subscribe(()=>this.#t.set(e))}static \u0275fac=function(a){return new(a||s)};static \u0275cmp=K({type:s,selectors:[["app-database"]],decls:47,vars:18,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let B;B=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let $;$=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let R;R=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let O;return O=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[e,a,t,o,T,f,B,M,I,$,N,R,O,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"spkTooltip"],[1,"actions","placement"]]},template:function(a,t){if(a&1&&(_(0,"app-status-bar"),n(1,"section")(2,"div",13)(3,"button",14),d(4,0),_(5,"spk-icon"),u(),i()(),n(6,"article")(7,"h1"),F(8,1),i(),n(9,"p"),F(10,2),i()(),n(11,"article")(12,"h2"),F(13,3),i(),n(14,"p"),F(15,4),i(),n(16,"div",15)(17,"button",16),S("click",function(){return t.repairDatabase()}),d(18,5),_(19,"spk-icon"),u(),i(),n(20,"button",16),S("click",function(){return t.deleteDatabase()}),d(21,6),_(22,"spk-icon"),u(),i(),n(23,"button",16),S("click",function(){return t.restoreDatabase()}),d(24,7),_(25,"spk-icon"),u(),i()()(),n(26,"article")(27,"h2"),F(28,8),i(),n(29,"spk-form-field")(30,"input",17),W("ngModelChange",function(T){return H(t.backupFilePath,T)||(t.backupFilePath=T),T}),i(),L(31,re,2,0,"spk-icon",18)(32,ce,2,0,"spk-icon",19)(33,_e,2,1,"spk-icon",20),i(),n(34,"div",21)(35,"button",16),S("click",function(){return t.resetDatabasePath()}),d(36,9),_(37,"spk-icon"),u(),i(),n(38,"button",16),S("click",function(){return t.saveDatabasePath()}),d(39,10),_(40,"spk-icon"),u(),i(),n(41,"button",16),S("click",function(){return t.saveAndRepairDatabasePath()}),d(42,11),_(43,"spk-icon"),u(),i(),n(44,"button",16),S("click",function(){return t.moveDatabasePath()}),d(45,12),_(46,"spk-icon"),u(),i()()()()),a&2){let o;r(8),U((o=t.activeBackup())==null||o.Backup==null?null:o.Backup.Name),w(8),r(9),P("loader",t.isRepairing()),p("disabled",!t.isValidatedPath()||t.pathHasChanged()),r(3),P("loader",t.isDeleting()),p("disabled",!t.isValidatedPath()||t.pathHasChanged()),r(3),P("loader",t.isRestoring()),p("disabled",t.pathHasChanged()),r(6),X(t.isValidatedPath()?"success":"error"),r(),z("ngModel",t.backupFilePath),r(),V(t.isWaitingForValidation()?31:t.isValidatedPath()?32:33),r(4),p("disabled",!t.pathHasChanged()),r(3),p("disabled",!t.pathHasChanged()||t.isWaitingForValidation()),r(3),p("disabled",!t.pathHasChanged()||t.isWaitingForValidation()),r(3),p("disabled",!t.pathHasChanged()||t.isValidatedPath()||t.isWaitingForValidation())}},dependencies:[oe,ae,ie,ne,se,Y,Z,J,x,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{b as default};
|
package/chunk-FCCV5HAI.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as et}from"./chunk-X7SFNRJF.js";import{a as Je,b as Ye}from"./chunk-2G6TVFPZ.js";import{a as J,b as je,c as We}from"./chunk-ZFONU33Q.js";import{h as Ze}from"./chunk-FUEIZLWH.js";import{a as Qe}from"./chunk-XIIFTZ5G.js";import{a as P}from"./chunk-2BX65XJQ.js";import{a as B}from"./chunk-6JQM2X3B.js";import{a as Xe,c as ce,e as de,i as pe,k as He,s as me,t as qe}from"./chunk-NSIELNIY.js";import{A as Ke,C as ze,a as se,e as Le,g as _e,l as Pe,o as be,p as Ge,t as Re,z as Be}from"./chunk-Y5IRBMLB.js";import{h as Ue}from"./chunk-DNJOKPEL.js";import{ea as $e}from"./chunk-CWLTHXVS.js";import{$b as G,Ab as q,Ac as Q,Bb as ge,Cb as Te,Db as ie,Eb as D,Hc as L,Ic as R,Kb as j,Lb as W,Nb as Ee,Nc as Z,Ob as Ne,Pb as De,Qa as l,Qb as E,Qc as ve,Rb as s,Sb as he,Tb as Ie,U as te,Vb as ye,Wb as we,Xb as Ae,Z as k,ab as ne,bc as oe,da as T,ea as S,ec as p,f as ee,fb as v,gc as O,ha as Fe,hc as ae,jc as Oe,kc as ke,lc as Ve,mc as $,na as b,nc as w,oc as d,rc as Me,sb as C,tb as f,tc as re,ub as U,vb as X,vc as le,wb as H,xb as m,yb as _,zb as c}from"./chunk-BTMXQPBB.js";import{a as y}from"./chunk-EUDKD2JW.js";var tt=class n{#t=k(Ue);#e=k(Le);#n=k(B);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 ee(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 ee(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(P,{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(P,{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(P,{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(P,{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(P,{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(P,{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(P,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ee(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],F=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,F);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var ue=class n{#t=k(B);supportedDestinationTypes=L(()=>this.#t.backendModules().map(t=>t.Key).filter(t=>t).map(t=>J(t)));destinationTypeOptions=L(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));backendModules=L(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var at=["fileInput"],rt=[[["label"]]],lt=["label"],Ce=class n{customId=Z();content=b("");readonly=b(!1);placeholder=Z("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=R(()=>{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=ne({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&ye(at,5),e&2){let i;we(i=Ae())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Me([{provide:Xe,useExisting:n,multi:!0}])],ngContentSelectors:lt,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=D();he(rt),Ie(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),E("click",function(){return T(i),S(o.triggerBrowse())}),j(3,1),q(4,"spk-icon"),W(),c()(),_(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),ke(o.content,r)||(o.content=r),S(r)}),c()(),_(7,"input",6,0),E("change",function(r){return T(i),S(o.onFileSelected(r))}),c()}e&2&&(l(6),m("placeholder",o.placeholder()),Oe("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[me,ce,de,pe,se,_e],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 st=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),xe=n=>({$implicit:n}),_t=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),ct=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function dt(n,t){n&1&&ie(0)}function pt(n,t){if(n&1&&v(0,dt,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17);s();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,st,o,e,a,r.oauthField)))}}function mt(n,t){n&1&&ie(0)}function ut(n,t){if(n&1&&v(0,mt,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17);s();let a=d(0),r=d(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,_t,o,e,a,r.oauthField)))}}function Ct(n,t){if(n&1){let e=D();j(0,5,1),_(1,"button",13,1),E("click",function(){let i=T(e).$implicit,a=s(2);return S(a.addAdvancedOption(i))}),c(),W()}if(n&2){let e=t.$implicit;l(),Ee(e.name),Ne(0)}}function ft(n,t){n&1&&ie(0)}function gt(n,t){if(n&1&&v(0,ft,1,0,"ng-container",12),n&2){let e=t.$implicit,o=t.$index;s();let i=G(17),a=s(),r=d(0),u=d(1),F=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",re(7,xe,le(2,ct,o,F,r,u.oauthField)))}}function Tt(n,t){n&1&&(_(0,"sup",22),p(1,"*"),c())}function St(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function xt(n,t){if(n&1){let e=D();_(0,"app-file-tree",15)(1,"label",21),C(2,Tt,2,0,"sup",22),p(3),C(4,St,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",25),p(1,"*"),c())}function Et(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Nt(n,t){if(n&1){let e=D();_(0,"app-file-tree",16)(1,"label",21),C(2,Ft,2,0,"sup",25),p(3),C(4,Et,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5);m("hideShortcuts",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Dt(n,t){n&1&&(_(0,"sup",26),p(1,"*"),c())}function ht(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function It(n,t){n&1&&(_(0,"spk-icon",27),p(1," warning "),c())}function yt(n,t){n&1&&(_(0,"spk-icon",28),p(1,"x-circle"),c())}function wt(n,t){n&1&&(_(0,"spk-icon",29),p(1,"warning"),c())}function At(n,t){if(n&1&&(_(0,"spk-icon",33),p(1," link "),c()),n&2){s();let e=d(9),o=d(10);oe("error",e&&o==="error")("warn",e&&o==="warning"),m("spkTooltip",e)}}function Ot(n,t){n&1&&(_(0,"spk-icon",32),p(1,"envelope"),c())}function kt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"hard-drives"),c())}function Vt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"jar"),c())}function Mt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"textbox"),c())}function vt(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,Dt,2,0,"sup",26),p(3),C(4,ht,2,1,"spk-icon",23),C(5,It,2,0,"spk-icon",27),C(6,yt,2,0,"spk-icon",28),C(7,wt,2,0,"spk-icon",29),c(),_(8,"input",30),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))}),c(),$(9)(10),C(11,At,2,5,"spk-icon",31)(12,Ot,2,0,"spk-icon",32)(13,kt,2,0,"spk-icon",32)(14,Vt,2,0,"spk-icon",32)(15,Mt,2,0,"spk-icon",32),c()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(3),r=d(4),u=d(5),F=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!F.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!F.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let M=a,I=F.hasLeadingSlash(M??"");l(),w(I&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),w(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function $t(n,t){n&1&&(_(0,"sup",34),p(1,"*"),c())}function Lt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Pt(n,t){if(n&1){let e=D();_(0,"span",38),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 "),c()}}function bt(n,t){n&1&&(_(0,"spk-icon",32),p(1,"password"),c())}function Gt(n,t){if(n&1){let e=D();_(0,"spk-icon",39),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),c()}}function Rt(n,t){if(n&1){let e=D();_(0,"spk-icon",39),E("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),c()}}function Bt(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,$t,2,0,"sup",34),p(3),C(4,Lt,2,1,"spk-icon",23),c(),_(5,"input",35),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(),C(6,Pt,2,0,"span",36)(7,bt,2,0,"spk-icon",32),C(8,Gt,2,0,"spk-icon",37)(9,Rt,2,0,"spk-icon",37),c()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Kt(n,t){n&1&&(_(0,"sup",41),p(1,"*"),c())}function zt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Xt(n,t){if(n&1){let e=D();_(0,"spk-select",40)(1,"label",21),C(2,Kt,2,0,"sup",41),p(3),C(4,zt,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,Ut,1,2,"ng-template",null,2,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",F)("ngModel",r)}}function Ht(n,t){if(n&1&&($(0),C(1,Xt,8,9)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function qt(n,t){n&1&&(_(0,"sup",44),p(1,"*"),c())}function jt(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function Wt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Qt(n,t){if(n&1){let e=D();_(0,"spk-select",43)(1,"label",21),C(2,qt,2,0,"sup",44),p(3),C(4,jt,2,1,"spk-icon",23),c(),_(5,"input",24),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,Wt,1,2,"ng-template",null,3,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",F)("ngModel",r)}}function Zt(n,t){n&1&&q(0,"spk-progress-bar",42)}function Jt(n,t){if(n&1&&($(0),C(1,Qt,8,10)(2,Zt,1,0,"spk-progress-bar",42)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:2)}}function Yt(n,t){n&1&&(_(0,"sup",46),p(1,"*"),c())}function en(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function tn(n,t){if(n&1){let e=D();_(0,"app-size",45),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",21),C(2,Yt,2,0,"sup",46),p(3),C(4,en,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function nn(n,t){n&1&&(_(0,"sup",47),p(1,"*"),c())}function on(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function an(n,t){if(n&1){let e=D();_(0,"spk-form-field")(1,"label",21),C(2,nn,2,0,"sup",47),p(3),C(4,on,2,1,"spk-icon",23),c(),_(5,"input",48),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c(),_(6,"spk-icon",32),p(7,"numpad"),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function rn(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function ln(n,t){if(n&1){let e=D();_(0,"spk-toggle",49),E("click",function(){T(e);let i=s().$implicit,a=d(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,a==="true"?"false":"true"))}),_(1,"label",21),p(2),C(3,rn,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(5);oe("active",i==="true"),l(),m("for",a),l(),O(" ",o," "),l(),f(e.formView.longDescription?3:-1)}}function sn(n,t){n&1&&(_(0,"sup",51),p(1,"*"),c())}function _n(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(3).$implicit;m("spkTooltip",e.formView.longDescription)}}function cn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;ae(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function dn(n,t){if(n&1){let e=D();_(0,"spk-select",50)(1,"label",21),C(2,sn,2,0,"sup",51),p(3),C(4,_n,2,1,"spk-icon",23),c(),_(5,"input",52),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),c()(),v(6,cn,1,2,"ng-template",null,4,Q)}if(n&2){let e=G(7);s();let o=d(0),i=s().$implicit,a=d(1),r=d(2),u=d(4),F=d(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",F),l(),f(i.formView.isMandatory&&u?2:-1),l(),O(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function pn(n,t){if(n&1&&($(0),C(1,dn,8,8)),n&2){let e=s().$implicit,o=w(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function mn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),c())}function un(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=D();_(0,"app-timespan",45),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",21),C(2,mn,2,0,"sup",53),p(3),C(4,un,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(1),i=d(2),a=d(4),r=d(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),O(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function fn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),c())}function gn(n,t){if(n&1&&(_(0,"spk-icon",23),p(1,"question"),c()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1){let e=D();_(0,"app-file-drop-textarea",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"),C(2,fn,2,0,"sup",55),p(3),C(4,gn,2,1,"spk-icon",23),c()()}if(n&2){let e=s().$implicit,o=d(2),i=d(4),a=d(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&i?2:-1),l(),O(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function Sn(n,t){if(n&1){let e=D();_(0,"button",56),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"),c()()}}function xn(n,t){if(n&1&&(_(0,"div",14),$(1)(2)(3)(4)(5),C(6,xt,6,12,"app-file-tree",15)(7,Nt,6,8,"app-file-tree",16)(8,vt,16,13,"spk-form-field")(9,Bt,10,9,"spk-form-field")(10,Ht,2,2)(11,Jt,3,2)(12,tn,5,7,"app-size",17)(13,an,8,6,"spk-form-field")(14,ln,4,5,"spk-toggle",18)(15,pn,2,2)(16,Cn,5,7,"app-timespan",17)(17,Tn,5,6,"app-file-drop-textarea",19),C(18,Sn,3,0,"button",20),c()),n&2){let e=t.$implicit;s();let o=d(0),i=s();oe("single-field",e.fieldGroup!=="advanced"),l(),w(e.formView.shortDescription??e.formView.name),l(),w(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=w(i.getFieldValue(e.fieldGroup,e.formView.name));l(),w((a??"").toString().trim()===""),l(),w("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(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),f(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&($(0),X(1,pt,1,9,"ng-container",null,U),X(3,ut,1,9,"ng-container",null,U),_(5,"spk-toggle-card",6),ge(6,7),j(7,5),_(8,"spk-menu",8)(9,"button",9),q(10,"spk-icon"),c(),ge(11,10),X(12,Ct,3,1,"button",11,U),Te(),c(),W(),Te(),X(14,gt,1,9,"ng-container",null,U),c(),v(16,xn,19,9,"ng-template",null,0,Q)),n&2){let e=s(),o=d(1);w(e.destinationForm()),l(),H(o.custom),l(2),H(o.dynamic),l(2),m("disallowToggle",!0);let i=e.nonSelectedAdvancedFormViews();l(3),m("searchable",!0),l(),m("disabled",i.length===0),l(3),H(i),l(2),H(e.advancedFormFieldNames())}}var nt=class n{#t=k(Ze);#e=k(B);#n=k(et);#a=k(ue);injector=k(Fe);targetUrl=ve.required();useBackupState=Z(!1);#i=null;destinationType=L(()=>{let t=this.targetUrl();if(!t)return null;let e=t.split("://")[0];return this.#i=e,e});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=L(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);nonSelectedAdvancedFormViews=L(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=R(()=>{let t=this.destinationType()??"",e=J(t),o=e?.key,i=this.#a.backendModules().find(h=>h.Key===o)??{Key:t,DisplayName:t,Description:J(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:[],F=e&&e.advancedFields?e.advancedFields:[],M=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],I={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([h,g],A)=>{I.custom.push(y({order:900+A},g))});for(let h=0;h<i.Options.length;h++){let g=i.Options[h];if(g.Deprecated)continue;let A=u.find(N=>N===g.Name||g.Aliases?.includes(N.name)||N.name===g.Name);if(A){let N=g.Aliases?.indexOf(A.name)??-1,V=g.Aliases&&N>-1?g.Aliases[N]:g.Name,x=A&&typeof A!="string",K=x?A?.defaultValue??g.DefaultValue:g.DefaultValue,z={name:V,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,order:900+h},fe=x?y(y({},z),A):z;I.dynamic.push(fe)}else{let N=g.Name;if(M.find(Y=>Y===N))continue;let x=F.find(Y=>Y===N||Y.name===N),K=x&&typeof x!="string",z={name:N,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,defaultValue:g.DefaultValue,order:900+h},fe=K?y(y({},z),x):z;I.advanced.push(fe)}}I.custom.sort((h,g)=>h.order-g.order),I.dynamic.sort((h,g)=>h.order-g.order),I.advanced.sort((h,g)=>h.order-g.order),this.destinationFormConfig.set(I)});targetUrlEffect=R(()=>{if(!this.destinationFormConfig())return;let e=this.targetUrl();if(!e)return;let o=We(e);if(!o)return;let i={custom:o.custom,dynamic:o.dynamic,advanced:o.advanced};this.destinationForm.update(a=>(a.custom=y(y({},a.custom),i.custom),a.dynamic=y(y({},a.dynamic),i.dynamic),a.advanced=y(y({},a.advanced),i.advanced),a))});destinationFormEffect=R(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=je({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(y({},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}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(y({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(y({},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}#o=b(!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 N=this.#t.mapFormsToSettings().find(V=>V.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let F=`${a}?type=${t}`,M=450,I=600,h=screen.width/2-M/2,g=screen.height/2-I/2,A=window.open(F,"_blank","height="+I+",width="+M+",menubar=0,status=0,titlebar=0,toolbar=0,left="+h+",top="+g);return window.addEventListener("message",N=>{let V=N.data.startsWith("authid:"),x=V?N.data.replace("authid:",""):null;V&&(this.destinationForm.update(K=>(K[e][o]=x,K)),this.#o.set(!1),A?.close())}),!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({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 ${"\uFFFD#8\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#9\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#11\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*13:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#9\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_MENU:`,t=De(t);let e;e=$localize`This field is mandatory`;let o;o=$localize`This field is mandatory`;let i;i=$localize`This field is mandatory`;let a;a=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let r;r=$localize`Hostname is invalid`;let u;u=$localize`Bucket name is invalid`;let F;F=$localize`This field is mandatory`;let M;M=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let h;h=$localize`This field is mandatory`;let g;g=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let V;return V=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,[1,"advanced-options",3,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"click"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["spk-button","","type","button",1,"outlined"],[3,"for"],["spkTooltip",e],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["spkTooltip",o],["spkTooltip",i],["spkTooltip",a,1,"warn"],["spkTooltip",r,1,"error"],["spkTooltip",u,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["spkTooltip",F],["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",M],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["spkTooltip",I],[3,"ngModelChange","inputType","ngModel","customId"],["spkTooltip",h],["spkTooltip",g],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["spkTooltip",A],["type","text","id","text",3,"ngModelChange","ngModel"],["spkTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["spkTooltip",V],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&($(0)(1),C(2,Fn,18,4)),e&2){let i=w(o.destinationType());l();let a=w(o.destinationFormConfig());l(),f(i&&a?2:-1)}},dependencies:[qe,ce,He,de,me,pe,$e,Qe,Je,Ye,Ce,Pe,_e,se,Be,be,Re,ze,Ke,Ge],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}"],changeDetection:0})};export{tt as a,ue as b,nt as c};
|
package/chunk-FHZLYBIT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./chunk-XLKQSWFD.js";import{h as T}from"./chunk-FUEIZLWH.js";import"./chunk-XIIFTZ5G.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as m}from"./chunk-LDIZ5E5Z.js";import"./chunk-ROOTIQEO.js";import{a as L}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{b as E,c as B,e as b,f as M}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{p as $,q as N,v as I}from"./chunk-Y5IRBMLB.js";import{h as K}from"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{Ab as r,F as C,Ic as O,Kb as d,Lb as c,Qa as n,Rb as R,Z as l,ab as D,ec as A,gc as P,rc as h,sb as k,tb as g,uc as _,xb as u,yb as p,zb as s}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var G=(a,e)=>[a,e,"general"],y=(a,e)=>[a,e,"destination"],U=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],X=(a,e)=>[a,e,"options"];function x(a,e){if(a&1&&(p(0,"p"),A(1),s()),a&2){let t=R();n(),P("Editing: ",t.backupName())}}function z(a,e){a&1&&r(0,"spk-progress-bar",6)}function j(a,e){a&1&&(p(0,"section"),r(1,"router-outlet"),s())}var f=class a{#t=l(E);#e=l(T);#a=l(L);#i=l(K);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=m(this.#t.params);#n=m(this.#t.url);paramsChanged=O(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(C(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[h([T])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,t,i,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),p(1,"header"),k(2,x,2,1,"p"),p(3,"spk-stepper")(4,"div",5),d(5,0),r(6,"spk-radio"),c(),s(),p(7,"div",5),d(8,1),r(9,"spk-radio"),c(),s(),p(10,"div",5),d(11,2),r(12,"spk-radio"),c(),s(),p(13,"div",5),d(14,3),r(15,"spk-radio"),c(),s(),p(16,"div",5),d(17,4),r(18,"spk-radio"),c(),s()()(),k(19,z,1,0,"spk-progress-bar",6)(20,j,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),u("routerLink",_(7,G,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(10,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(13,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),u("routerLink",_(19,X,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[B,b,M,v,N,I,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{f as default};
|
package/chunk-FUEIZLWH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ut}from"./chunk-XIIFTZ5G.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` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Temporary files ${"\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};
|
package/chunk-FUZLIOUQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as B}from"./chunk-JM7VAPIC.js";import{a as b}from"./chunk-RHW5QVAY.js";import{a as h}from"./chunk-6JQM2X3B.js";import{a as d}from"./chunk-FZG6OXT3.js";import{h as k}from"./chunk-DNJOKPEL.js";import{F as s,H as n,Hc as p,Ic as o,R as u,U as c,Z as i,na as a}from"./chunk-BTMXQPBB.js";var m="backupListOrderBy",f="backupListShowActualTimes",S=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],y=class l{#i=i(d);#l=i(k);#o=i(h);#e=i(B);#u=null;#t=a([]);#a=a([]);#r=a(!1);#n=a(null);#d=a(null);#c=a(this.#i.getItemParsed(f,!0)??"relative");#s=a(this.#i.getItemParsed(m,!0)??"id");orderByOptions=a(S);orderBy=this.#s.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#r.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#d.asReadonly();draftBackups=this.#t.asReadonly();#p=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#k=o(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=b();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.setItemParsed(m,e,!0),this.#s.set(e),this.#e.isConnectionMethodSet()&&(this.#p()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#i.setItemParsed(f,e,!0),this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#p()){this.#e.subscribe("backuplist",this.#s());return}let t=this.#u,r=Date.now(),g=t&&r-t<15*60*1e3;t&&r-t<100||!e&&g&&this.#a().length||(this.#u=r,this.#r.set(!0),this.#l.getApiV1Backups({orderBy:this.#s()}).pipe(s(1),u(v=>this.#a.set(v)),n(()=>this.#r.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#l.postApiV1BackupByIdStart({id:e}).pipe(s(1),u(()=>this.getBackups(!0)),n(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#l.deleteApiV1BackupById(e).pipe(s(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=c({token:l,factory:l.\u0275fac,providedIn:"root"})};export{y as a};
|
package/chunk-FZG6OXT3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as O}from"./chunk-2W6BEUGU.js";import{a as R,c as y,h as P}from"./chunk-DNJOKPEL.js";import{d as v,e as i}from"./chunk-WIDMAJIO.js";import{B as A,F as l,H as S,R as p,U as a,Z as s,f as g,k as m,n as d,na as o,r as I,xa as E}from"./chunk-BTMXQPBB.js";var c=class r{platformId=s(E);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return i(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,n=!1){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${n?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return v(this.platformId)?localStorage.length:0}getItem(t){return i(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!i(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){i(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!i(this.platformId))for(var t in localStorage)!t.startsWith(this.STORAGE_VERSION)&&t.includes(this.APP_NAME)&&localStorage.removeItem(t)}clearAll(){i(this.platformId)||localStorage.clear()}clear(){if(!i(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return i(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#n=s(c);#i=o(null);#e=window.self!==window.top;#r=o(this.#e);relayIsEnabled=this.#r.asReadonly();config=this.#i.asReadonly();configLoaded=this.#e?new m:null;isLoading=o(this.#e);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#e&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",t=>{if(t.data.startsWith("access:")){let e=t.data.replace("access:",""),n=JSON.parse(e);if(!n?.accessToken||!n?.clientId){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.clientId!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}if(typeof n.accessToken!="string"){this.#t("error:invalid-config"),this.#r.set(!1);return}let w=this.#n.getItem("locale")??"en-US",h=n.locale??"en-US";w!==h&&(this.#n.setItem("locale",h),window.location.reload()),this.#i.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(t){window.parent.postMessage(t,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(t){this.#i.set(t)}clearConfig(){this.#i.set(null)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var u="PROXY_AUTHED_FAKE_TOKEN",k=class r{#n=s(O);#i=s(y);#e=s(P);#r=s(f);#t=o(null);#s=o(!1);token=this.#t.asReadonly();isLoggingOut=this.#s.asReadonly();login(t){return this.#e.postApiV1AuthLogin({requestBody:{Password:t,RememberMe:!0}}).pipe(l(1),p(e=>e.AccessToken&&this.#t.set(e.AccessToken)))}refreshToken(){return this.#r.relayIsEnabled()?(this.#t.set(u),new g(t=>{t.next({AccessToken:u}),t.complete()})):this.#e.postApiV1AuthRefresh().pipe(l(1),p(t=>t.AccessToken&&this.#t.set(t.AccessToken)))}checkProxyAuthed(){let t=new R({"custom-proxy-check":"true"});return this.#i.get("/api/v1/systeminfo",{headers:t}).pipe(I(()=>(this.#t.set(u),!0)),A(()=>d(!1)))}logout(){this.#s.set(!0),this.#e.postApiV1AuthRefreshLogout().pipe(l(1),S(()=>{this.#s.set(!1),this.#t.set(null),this.#n.navigate(["/login"])})).subscribe()}static \u0275fac=function(e){return new(e||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,u as c,k as d};
|
package/chunk-IQHBPLHL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};
|
package/chunk-J6SAG7QN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-XLKQSWFD.js";import"./chunk-ROOTIQEO.js";import"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{c as O,e as C,f as d}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{y as M}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-UFP4XKZF.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-LKJ2SBQA.js";import{Ab as l,Mb as n,ab as A,yb as e,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=A({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let g;g=$localize`System info`;let u;u=$localize`Server settings`;let T;T=$localize`Logs`;let c;return c=$localize`Crash log`,[_,o,r,g,u,T,c,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[S,M,O,C,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] spk-tabs[_ngcontent-%COMP%]{margin:0 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding-left:2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{s as default};
|
package/chunk-K6ISVHYD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as $}from"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{b as v,c as G,e as L,f as w,j as U,o as x,q as K,r as j,t as X}from"./chunk-NSIELNIY.js";import"./chunk-FZG6OXT3.js";import{d as A,e as O}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{A as B,a as y,c as b,g as h,l as N,m as R}from"./chunk-Y5IRBMLB.js";import{h as E}from"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as l,H as g,Kb as D,Lb as P,Mb as _,Pb as I,Qa as s,Qb as d,Z as F,ab as T,bc as k,na as m,sb as S,sc as M,tb as C,xb as u,yb as a,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var V=()=>["/"];function z(c,o){c&1&&(a(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new j,f=class c{#e=F(b);#o=F(E);#n=F($);#t=F(A);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),import_metadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#i.bind(this),t.readAsArrayBuffer(e)}}#i(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#a(e)})}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#a(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#e.success("Backup imported successfully."),this.#t.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#t.navigate(["/backup-draft",t])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),P(),n()(),a(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),S(10,z,4,0,"spk-form-field"),a(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),a(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",M(7,V)),s(2),k("loader",t.isImporting()),u("disabled",t.isImporting()),s(2),u("formGroup",t.importForm),s(),u("files",t.selectedFile()),s(),C(t.isSecureFile()?10:-1))},dependencies:[X,U,G,v,L,w,x,K,O,N,y,h,B,R],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}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
|
package/chunk-L5Y36SCW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-FZG6OXT3.js";import{Ic as r,U as s,Z as i,na as e}from"./chunk-BTMXQPBB.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
|