@duplicati/ngclient 0.0.124 → 0.0.130
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-SIHNMW2E.js → chunk-4PFSFVY6.js} +1 -1
- package/{chunk-SPAJFGWZ.js → chunk-5FTLFTEB.js} +1 -1
- package/{chunk-ONV552SH.js → chunk-5LL2GNEZ.js} +1 -1
- package/{chunk-ERHGJIOQ.js → chunk-5S46PDX2.js} +1 -1
- package/chunk-74DADXEI.js +1 -0
- package/chunk-77O3NTSI.js +1 -0
- package/chunk-7XUQAQXF.js +1 -0
- package/chunk-A2ITER5E.js +1 -0
- package/{chunk-M5RL4LRX.js → chunk-A6RETV76.js} +1 -1
- package/chunk-AACOYUOE.js +1 -0
- package/chunk-AIKD43P2.js +1 -0
- package/chunk-AOXPIWSW.js +1 -0
- package/chunk-APVPH7MJ.js +1 -0
- package/chunk-B37C3RGG.js +1 -0
- package/{chunk-URJQR7VG.js → chunk-BI4O7WRG.js} +1 -1
- package/chunk-BMMOMXWX.js +6 -0
- package/chunk-BRR5YAJ3.js +1 -0
- package/chunk-BUZTB5NB.js +1 -0
- package/chunk-BZCM226U.js +1 -0
- package/chunk-C44Q3YIF.js +1 -0
- package/{chunk-PSVKQSIF.js → chunk-CTTB3CC2.js} +1 -1
- package/chunk-CZATLVNN.js +1 -0
- package/chunk-DSS4UZWD.js +1 -0
- package/chunk-DUQHFE6L.js +1 -0
- package/chunk-DWAT342U.js +1 -0
- package/chunk-FEYAUW6J.js +1 -0
- package/{chunk-43BIRTPL.js → chunk-GQCUCL25.js} +1 -1
- package/{chunk-ESAGJOZZ.js → chunk-H5MGVT7B.js} +1 -1
- package/{chunk-VZBWK3XF.js → chunk-HAATVFD4.js} +1 -1
- package/chunk-HBYWSSYK.js +1 -0
- package/{chunk-EPDVUHOD.js → chunk-HTTPTGMU.js} +1 -1
- package/chunk-HZQEM2P7.js +1 -0
- package/chunk-IQTQJ64J.js +2 -0
- package/{chunk-65ZYAFPI.js → chunk-JMQGVDAK.js} +1 -1
- package/chunk-LWIINXS7.js +1 -0
- package/chunk-LZXYGCPQ.js +1 -0
- package/{chunk-6EWRKJSC.js → chunk-M7A6IY7W.js} +1 -1
- package/chunk-MES3HY3J.js +1 -0
- package/{chunk-5C7A7QU6.js → chunk-MNE4XQ7S.js} +1 -1
- package/{chunk-V7XW25LT.js → chunk-MZZJNTYI.js} +1 -1
- package/chunk-NZXQIYE5.js +4 -0
- package/chunk-PFZ7N6QO.js +1 -0
- package/chunk-PG4O7JZ2.js +1 -0
- package/{chunk-S5G6POQS.js → chunk-QLHQ5NDE.js} +1 -1
- package/chunk-QNXSBZTY.js +1 -0
- package/chunk-QQAATZNB.js +1 -0
- package/chunk-SF5ML7OT.js +1 -0
- package/chunk-T3WJQ544.js +1 -0
- package/{chunk-4DR45FFH.js → chunk-VAR5LIG7.js} +1 -1
- package/chunk-VN4TP2ED.js +1 -0
- package/chunk-WBCTOQOO.js +1 -0
- package/chunk-X4XF46C3.js +1 -0
- package/chunk-ZQ4ACNVT.js +3 -0
- package/chunk-ZWC5VRTB.js +1 -0
- package/{chunk-TH7CWIA2.js → chunk-ZY4E4VC3.js} +1 -1
- package/index.html +2 -2
- package/locale/messages.cs.json +4 -2
- package/locale/messages.da.json +5 -2
- package/locale/messages.de.json +48 -8
- package/locale/messages.en_GB.json +4 -2
- package/locale/messages.es.json +4 -2
- package/locale/messages.fi.json +7 -2
- package/locale/messages.fr.json +7 -2
- package/locale/messages.hu.json +6 -2
- package/locale/messages.it.json +32 -21
- package/locale/messages.ja_JP.json +8 -2
- package/locale/messages.nl_NL.json +53 -21
- package/locale/messages.pl.json +9 -2
- package/locale/messages.pt.json +8 -2
- package/locale/messages.pt_BR.json +10 -3
- package/locale/messages.ru.json +8 -2
- package/locale/messages.sr_RS.json +9 -2
- package/locale/messages.sv_SE.json +9 -2
- package/locale/messages.zh_CN.json +376 -48
- package/locale/messages.zh_TW.json +9 -2
- package/main-WENCV2S5.js +1 -0
- package/package.json +1 -1
- package/{styles-P2AEFLUS.css → styles-6RBLRF5E.css} +1 -1
- package/chunk-25II37TZ.js +0 -1
- package/chunk-2CXHZS6X.js +0 -1
- package/chunk-3UPH6V5C.js +0 -1
- package/chunk-65U4B3NQ.js +0 -2
- package/chunk-6DNRCK5D.js +0 -1
- package/chunk-6V7W7EKR.js +0 -1
- package/chunk-7733YRW4.js +0 -1
- package/chunk-7BATQNXR.js +0 -1
- package/chunk-7V4TPS4B.js +0 -1
- package/chunk-BTZEFBCF.js +0 -1
- package/chunk-CZDE5P4F.js +0 -1
- package/chunk-ED7PHXLX.js +0 -1
- package/chunk-FP6LM56A.js +0 -1
- package/chunk-FQ55IACT.js +0 -1
- package/chunk-FSKPPAVO.js +0 -1
- package/chunk-FWQNZX5S.js +0 -1
- package/chunk-J52HAQJB.js +0 -1
- package/chunk-KAFLAM3J.js +0 -1
- package/chunk-O7TLFEOP.js +0 -1
- package/chunk-OAWADV5X.js +0 -1
- package/chunk-PDODLSPH.js +0 -1
- package/chunk-QXUYK52Y.js +0 -1
- package/chunk-RODUXVVT.js +0 -1
- package/chunk-SX2OA5DO.js +0 -1
- package/chunk-T5WAKBP3.js +0 -1
- package/chunk-U4XTHU5I.js +0 -1
- package/chunk-UI4M5G5W.js +0 -1
- package/chunk-VPTXHYYV.js +0 -6
- package/chunk-VTTBYFSH.js +0 -1
- package/chunk-VYAA7G37.js +0 -1
- package/chunk-W66AXGSW.js +0 -1
- package/chunk-WOTGLW6Y.js +0 -4
- package/chunk-XATCN7MB.js +0 -1
- package/chunk-XHPURHO2.js +0 -1
- package/chunk-YUZKJZ22.js +0 -1
- package/chunk-YZDNOP4R.js +0 -1
- package/chunk-Z2TE5POZ.js +0 -1
- package/chunk-ZMLGDPCK.js +0 -3
- package/main-JBXUJPKQ.js +0 -1
package/assets/spk.woff2
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-UEYPJIJG.js";import{a as R}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-UEYPJIJG.js";import{a as R}from"./chunk-HZQEM2P7.js";import"./chunk-LWIINXS7.js";import"./chunk-B37C3RGG.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as F,g as U,p as w}from"./chunk-H5MGVT7B.js";import{h as L}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{Db as a,Eb as o,F as d,Fb as f,Jb as S,Qc as O,Ra as T,Rb as E,Sb as M,Tb as P,Ua as l,Vb as k,Wb as c,Z as m,ea as u,fa as g,gb as G,jc as s,kc as b,lb as _,r as A,ub as N,va as C,wb as x,zb as p}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=c(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),_(2,V,4,1,"a",6)}if(n&2){let e,t=c();x("loader",t.checkingForUpdates()),l(2),p((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=c();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(L);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(_(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),_(7,$,3,3)(8,I,2,0,"button",4)(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;p(t.isLoading()?0:-1),l(5),M(t.duplicatiVersion()),P(5),l(2),p(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),p(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[w,U,F],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-M7A6IY7W.js";import{a as Q}from"./chunk-LUKUBN2Z.js";import{b as U,d as H}from"./chunk-WRKRV6RQ.js";import{b as K,c as j,e as W,g as q,p as Y}from"./chunk-H5MGVT7B.js";import{h as J}from"./chunk-N5FH4YAX.js";import{Bb as v,Cb as y,Db as a,Eb as l,Fb as g,Gb as L,Hb as R,Jb as f,Pb as D,Qb as V,Qc as B,Ra as M,Rb as _,Ua as r,Vb as C,Wb as s,Z as p,ea as T,fa as I,gb as S,jc as F,kc as P,lb as A,lc as z,rc as G,sa as m,sc as X,tc as u,ub as O,yb as b,zb as d}from"./chunk-4KE2I7OA.js";function it(n,e){if(n&1&&F(0),n&2){s();let t=u(0);z(" ",t.Message," ")}}function nt(n,e){if(n&1&&(a(0,"div"),D(1,1),g(2,"a",15),V(),l()),n&2){s();let t=u(0);r(2),O("href",t.DownloadLink,M)}}function ot(n,e){if(n&1){let t=f();a(0,"button",14),C("click",function(){T(t);let i=s(),c=u(0);return I(i.doRepair(c.BackupID))}),_(1,2),l()}}function at(n,e){if(n&1){let t=f();a(0,"button",14),C("click",function(){T(t);let i=s(),c=u(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);O("value",(t=o.serverState())==null?null:t.UpdateDownloadProgress)}}function lt(n,e){if(n&1){let t=f();a(0,"div",13),L(1),_(2,4),R(),a(3,"a",16),F(4),l(),A(5,rt,1,1,"spk-progress-bar",17),a(6,"button",14),C("click",function(){T(t);let i=s();return I(i.doShowUpdate())}),_(7,5),l()()}if(n&2){let t,o,i=s(),c=u(0);r(3),O("href",(t=i.serverState())==null?null:t.UpdateDownloadLink,M),r(),P(c.Message),r(),d(((o=i.serverState())==null?null:o.UpdaterState)==="Downloading"?5:-1)}}function ct(n,e){if(n&1){let t=f();a(0,"button",14),C("click",function(){T(t);let i=s(),c=u(0);return I(i.doShowLog(c.BackupID))}),_(1,6),l()}}function _t(n,e){if(n&1){let t=f();a(0,"button",14),C("click",function(){T(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),C("click",function(){T(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=p(H);#o=p(U);#a=p(W);#e=p(j);#i=p(x);#n=p(J);serverState=this.#i.serverState;index=m.required();notification=m.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=S({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),A(5,it,1,1)(6,nt,3,1,"div"),a(7,"div",11),A(8,ot,2,0,"button",12)(9,at,2,0,"button",12)(10,lt,8,3,"div",13)(11,ct,2,0,"button",12)(12,_t,2,0,"button",12)(13,st,2,0,"button",12),a(14,"button",14),C("click",function(){return T(i),I(o.deleteNotificationByIndex())}),_(15,0),l()()()()}if(t&2){let i=X(o.notification());r(),b(o.getAlertType(i.Type)),r(2),P(i.Title),r(2),d(i.Action!=="update:new"&&i.Action!=="update:manual"?5:-1),r(),d(i!=null&&i.DownloadLink?6:-1),r(2),d(i.Message!=null&&i.Message.includes("please run repair")?8:-1),r(),d(i.Action!=null&&i.Action.startsWith("bug-report:created:")&&!i.DownloadLink?9:-1),r(),d(i.Action==="update:new"?10:-1),r(),d(i.Action==="backup:show-log"?11:-1),r(),d(i.Action==="config:issue:unencrypted-database"?12:-1),r(),d(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;O("index",o)("notification",t)}}function Tt(n,e){n&1&&(a(0,"div",2)(1,"p"),_(2,0),l()())}var Z=class n{#t=p(x);notificationFilterPredicate=m();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=S({type:n,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let e;return e=$localize`No more notifications`,[e,[3,"index","notification"],[1,"notification-list"]]},template:function(t,o){t&1&&v(0,Nt,1,2,"app-notification",1,pt,!1,Tt,3,0,"div",2),t&2&&y(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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-T3WJQ544.js";import"./chunk-WBCTOQOO.js";import{a as X}from"./chunk-SF5ML7OT.js";import"./chunk-HZQEM2P7.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-B37C3RGG.js";import{e as E}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as R,g as f,h as k,k as v,p as G}from"./chunk-H5MGVT7B.js";import{h as w}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Ab as N,Bb as x,Cb as $,Db as e,Eb as i,Fb as s,Gb as D,Hb as b,Pb as h,Qb as y,Rb as c,Sb as A,Tb as I,Ua as p,Wb as S,Z as d,gb as O,jc as l,lb as m,mc as B,rb as M,sb as P,ub as u,vc as g,wc as L,zb as F}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",L(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(X);#t=d(w);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,v,R,G,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-8)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as V}from"./chunk-XUPWJEL7.js";import{a as A,n as R,x as F}from"./chunk-
|
|
1
|
+
import{a as V}from"./chunk-XUPWJEL7.js";import{a as A,n as R,x as F}from"./chunk-H5MGVT7B.js";import{pa as N}from"./chunk-EBXJGPRA.js";import{Ab as S,Bb as f,Bc as $,Cb as v,Db as o,Eb as i,Fb as k,Jb as w,Rb as m,Rc as x,Ua as l,Vb as G,Wb as r,Z as E,ea as O,fa as I,gb as h,jc as s,kc as L,lb as u,lc as d,sa as p,ub as T,va as M,vb as P,wb as C,zb as g,zc as y}from"./chunk-4KE2I7OA.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function D(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),f(2,D,2,1,"li",null,S),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),v(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function z(n,t){if(n&1&&(o(0,"code")(1,"ol",15),f(2,X,2,1,"li",null,S),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),v(a.breakIntoLines(e.Message))}}function W(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"spk-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),u(13,U,4,0,"code")(14,z,4,0,"code"),i()()),n&2){let e=r().$implicit;l(4),d("ID: ",e.ID,""),l(2),d("Type: ",e.Type,""),l(2),d("Tag: ",e.Tag,""),l(2),d("TaskID: ",e.TaskID,""),l(2),d("MessageID: ",e.MessageID,""),l(),g(e.Exception?13:-1),l(),g(e.Message?14:-1)}}function j(n,t){if(n&1){let e=w();o(0,"tr",10),G("click",function(){let _=O(e).$index,c=r(2);return I(c.toggleRow(_))}),o(1,"td"),s(2),y(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"spk-icon"),s(9,"caret-down"),i()()()(),u(10,W,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,_=r(2);l(2),L($(3,5,e.When,"MMM dd. hh:mm")),l(3),L(_.subStringMessage(e.Message)),l(2),C("rotated-icon",a===_.openRowIndex()),l(3),g(a===_.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"spk-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),k(6,"th",8),i(),f(7,j,11,8,null,null,S),o(9,"div",9),m(10,3),i()()),n&2){let e=r();P("grid-template-columns","auto 1fr auto"),C("type-b",e.asSimpleList()),T("data",e.logs())("loading",e.logsLoading()),l(7),v(e.logs())}}var b=class n{#e=E(V);whenFilter=p();backupIdFilter=p();asSimpleList=p();polling=p();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=x(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=M(null);whenEffect=x(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=x(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=h({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&C("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let _;return _=$localize`No data available`,[t,e,a,_,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["table-header",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["spk-button","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&u(0,B,2,0,"div",4)(1,H,11,6,"spk-table",5),e&2&&g(a.logLevel()==="Disabled"?0:1)},dependencies:[F,A,R,N],styles:["[_nghost-%COMP%]{display:block}.simple-list[_nghost-%COMP%] spk-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-2);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{b as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as be}from"./chunk-LWIINXS7.js";import{s as xe}from"./chunk-ABANCAM5.js";import{A as Te,a as ge,f as me,l as Ce,n as Pe,p as Ee}from"./chunk-H5MGVT7B.js";import{h as ve}from"./chunk-N5FH4YAX.js";import{ia as fe}from"./chunk-EBXJGPRA.js";import{$a as K,B as ne,Bb as re,Cb as oe,Db as h,Dc as _e,Eb as f,F as q,Fb as le,Ib as z,Jb as B,Qc as W,Rb as $,Rc as A,Sb as ae,Tb as ce,Ua as m,Vb as R,Wb as u,Xb as de,Yb as D,Z as X,ea as N,fa as k,gb as ie,gc as J,hc as pe,ic as Y,jc as S,lb as M,lc as ue,n as ee,r as L,ra as Q,sa as T,ub as U,va as O,vb as se,wb as v,wc as V,x as te,xc as he,zb as F}from"./chunk-4KE2I7OA.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var ye=["treeContainer"],we=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=r=>({children:r,level:0}),Me=r=>({$implicit:r}),Ie=(r,t)=>({children:r,level:t}),We=(r,t)=>t.id;function Ae(r,t){if(r&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(r&2){let e=u();m(),v("active",e.pathDiscoveryMethod()==="browse"),m(2),v("active",e.pathDiscoveryMethod()==="path")}}function Le(r,t){r&1&&le(0,"spk-progress-bar",9)}function Be(r,t){r&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(r,t){r&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(r,t){r&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(r,t){if(r&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),r&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(r,t){r&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(r,t){r&1&&z(0)}function Ge(r,t){if(r&1&&M(0,je,1,0,"ng-container",10),r&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(r,t){if(r&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(r&2){let e=u().$implicit,n=u().$implicit,i=u();v("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),v("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(r,t){if(r&1&&M(0,qe,8,17),r&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(r,t){if(r&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),r&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(r,t){r&1&&z(0)}function Ue(r,t){if(r&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(r&2){let e=u();v("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class r{#e=X(ve);#t=X(be);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(s=>s!==""&&s!=="/"),n=structuredClone(e);for(let s=0;s<n.length;s++){let c=n[s].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(s,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(s=>({id:s,resolvedpath:s,text:s,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(s=>{let g=new Map,c=s?.id;a&&(s.accepted=!0),g.set(s.id,s);let p=o.length>0?i.filter(d=>d.parentPath===s.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=s;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),y={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(y.accepted=this.matchAccepts(a,y)),g.set(E,y),x.children.push(y)}x=g.get(E)}}return s}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(s=>!s.startsWith("-")&&!s.startsWith("+")),l=t.filter(s=>s.startsWith("-")||s.startsWith("+"));if(C.length===0)return a;for(let s=0;s<C.length;s++){let g=C[s];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let s=0;s<l.length;s++){let g=l[s],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>{let s=l.split(e?"\\":"/");return s.at(-1)!==""&&s.pop(),s}),a=["/"];o.forEach(l=>{l.forEach((s,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(s=>({status:"success",value:s,url:l})),ne(s=>ee({status:"error",value:s,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let s=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=s.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),y=i.findIndex(w=>this.multiSelect()?I.startsWith(w):I===w)>-1,Fe=i.findIndex(w=>w===_)>-1,Se=n.findIndex(w=>w===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:y&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=ie({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,ye,5),J(n.formRef,we,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&v("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),v("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),v("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),v("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[me,Te,ge,Ce,Pe,Ee,fe,xe],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h}from"./chunk-SF5ML7OT.js";import"./chunk-HZQEM2P7.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import{b as v,c as G,e as L,f as w,i as U,n as K,q as X,r as x,t as V}from"./chunk-ABANCAM5.js";import"./chunk-B37C3RGG.js";import{d as O,e as A}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{A as y,a as b,c as R,g as N,l as E,m as $}from"./chunk-H5MGVT7B.js";import{h as B}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{Db as r,Eb as n,F as g,Fb as l,Pb as P,Qb as I,Rb as _,Ua as s,Ub as M,Vb as d,Z as F,gb as T,lb as S,ub as u,va as m,vc as k,wb as C,zb as D}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var z=()=>["/"];function j(c,t){c&1&&(r(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new x,f=class c{#e=F(R);#t=F(B);#o=F(h);#n=F(O);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(t){let e=t[0];if(e){let o=new FileReader;this.isSecureFile.set(e.type!=="application/json"),o.onload=this.#i.bind(this),o.readAsArrayBuffer(e)}}#i(t){let e=t.target?.result;this.importForm.patchValue({config:this.#r(e)})}#r(t){let e=new Uint8Array(t),o=e.byteLength,a="";for(let i=0;i<o;i++)a+=String.fromCharCode(e[i]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:t=>{let e=this.#o.addDraftBackup(t.data);this.#n.navigate(["/backup-draft",e])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let t;t=$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:`,t=M(t);let e;e=$localize`Import Metadata`;let o;o=$localize`Save now`;let a;return a=$localize`Passphrase`,[t,e,o,a,[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","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"header")(1,"h3"),P(2,0),r(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),r(6,"button",6),d("click",function(){return o.submit()}),l(7,"spk-icon"),n()(),I(),n()(),r(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(i){return o.onFileDropped(i)}),n(),S(10,j,4,0,"spk-form-field"),r(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),r(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",k(7,z)),s(2),C("loader",o.isImporting()),u("disabled",o.isImporting()),s(2),u("formGroup",o.importForm),s(),u("files",o.selectedFile()),s(),D(o.isSecureFile()?10:-1))},dependencies:[V,U,G,v,L,w,K,X,A,E,b,N,y,$],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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-NZXQIYE5.js")},{path:"encryption",loadComponent:()=>import("./chunk-DWAT342U.js")},{path:"select-files",loadComponent:()=>import("./chunk-DSS4UZWD.js")},{path:"options",loadComponent:()=>import("./chunk-BZCM226U.js")},{path:"progress",loadComponent:()=>import("./chunk-PG4O7JZ2.js")}],t=o;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as pe,b as se}from"./chunk-GQCUCL25.js";import{a as ae}from"./chunk-74DADXEI.js";import{a as ee}from"./chunk-LWIINXS7.js";import{b as te,c as ne,e as ie,h as oe,j as re,s as le}from"./chunk-ABANCAM5.js";import{A as Y,C as Z,a as j,g as q,l as H,o as J,t as Q,z as W}from"./chunk-H5MGVT7B.js";import{ia as X}from"./chunk-EBXJGPRA.js";import{Ab as V,Bb as I,Cb as L,Db as a,Dc as P,Eb as s,Fb as h,Gb as v,Hb as M,Ib as T,Jb as f,Pb as $,Qb as b,Qc as R,Rb as K,Ua as l,Vb as C,Wb as p,Z as B,bb as G,ea as u,fa as g,gb as z,ic as x,jc as d,kc as A,lb as m,lc as k,rc as U,sa as y,sc as D,tc as S,ub as _,va as N,wb as E,zb as O}from"./chunk-4KE2I7OA.js";import{a as F,b as w}from"./chunk-7CGTOI24.js";function me(t,o){if(t&1){let e=f();a(0,"button",14),C("click",function(){u(e);let n=p();return g(n.addFreeTextSetting())}),$(1,6),h(2,"spk-icon"),b(),s()}}function de(t,o){if(t&1){let e=f();a(0,"button",16,0),C("click",function(){let n=u(e).$implicit,r=p(2);return g(r.addSetting(n))}),d(2),s()}if(t&2){let e=o.$implicit;E("deprecated",e.deprecatedDescription),l(2),k(" ",e.name," ")}}function ue(t,o){if(t&1&&(a(0,"h3",8),d(1),s(),I(2,de,3,3,"button",15,V)),t&2){let e=o.$implicit;l(),A(e.displayName),l(),L(e.options)}}function ge(t,o){t&1&&(a(0,"div",13),d(1,"Add a setting above to get started."),s())}function Ce(t,o){t&1&&(a(0,"spk-icon",24),d(1," warning-octagon "),s())}function fe(t,o){if(t&1&&(a(0,"spk-icon",25),d(1,"archive"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.deprecatedDescription)}}function xe(t,o){if(t&1&&(a(0,"spk-icon",26),d(1,"question"),s()),t&2){let e=p(2).$implicit;_("spkTooltip",e.FormView.longDescription)}}function Se(t,o){if(t&1&&(m(0,Ce,2,0,"spk-icon",24),a(1,"span"),d(2),s(),m(3,fe,2,1,"spk-icon",25)(4,xe,2,1,"spk-icon",26)),t&2){let e=p().$implicit,i=S(1);O(i?0:-1),l(),E("deprecated",e.FormView.deprecatedDescription),l(),A(e.FormView.shortDescription),l(),O(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function Te(t,o){t&1&&T(0)}function Oe(t,o){if(t&1){let e=f();a(0,"div",18)(1,"label"),m(2,Te,1,0,"ng-container",27),s(),a(3,"div",28)(4,"spk-form-field")(5,"input",29),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateFreeTextSettingName(r,n))}),s(),a(6,"spk-icon",30),d(7,"rectangle-dashed"),s()(),a(8,"spk-form-field")(9,"input",29),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s(),a(10,"spk-icon",30),d(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 Fe(t,o){t&1&&T(0)}function we(t,o){if(t&1){let e=f();a(0,"app-file-tree",19)(1,"label",31),m(2,Fe,1,0,"ng-container",27),s(),a(3,"input",32),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(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 ye(t,o){if(t&1){let e=f();a(0,"app-file-tree",20),h(1,"label",31),a(2,"input",32),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(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 Ve(t,o){t&1&&T(0)}function Ie(t,o){t&1&&(a(0,"spk-icon",30),d(1,"link"),s())}function Le(t,o){t&1&&(a(0,"spk-icon",30),d(1,"textbox"),s())}function he(t,o){if(t&1){let e=f();a(0,"spk-form-field")(1,"label",31),m(2,Ve,1,0,"ng-container",27),s(),a(3,"input",32),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s(),m(4,Ie,2,0,"spk-icon",30)(5,Le,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(),O(e.FormView.type==="Path"?4:5)}}function Me(t,o){t&1&&T(0)}function ke(t,o){if(t&1){let e=f();a(0,"spk-icon",35),C("click",function(){u(e);let n=p(2).$implicit;return g(n.showPassword=!n.showPassword)}),d(1," eye "),s()}}function Pe(t,o){if(t&1){let e=f();a(0,"spk-icon",35),C("click",function(){u(e);let n=p(2).$implicit;return g(n.showPassword=!n.showPassword)}),d(1," eye-slash "),s()}}function Ne(t,o){if(t&1){let e=f();a(0,"spk-form-field")(1,"label",31),m(2,Me,1,0,"ng-container",27),s(),a(3,"input",33),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),d(5,"password"),s(),m(6,ke,2,0,"spk-icon",34)(7,Pe,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),O(e.showPassword?6:7)}}function Ee(t,o){t&1&&T(0)}function ve(t,o){if(t&1&&d(0),t&2){let e=o.$implicit;k(" ",e," ")}}function $e(t,o){if(t&1){let e=f();a(0,"spk-select",36)(1,"label",31),m(2,Ee,1,0,"ng-container",27),s(),a(3,"input",32),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s()(),m(4,ve,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 be(t,o){t&1&&T(0)}function Ae(t,o){if(t&1){let e=f();a(0,"app-size",37),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),a(1,"label",31),m(2,be,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 De(t,o){t&1&&T(0)}function Re(t,o){if(t&1){let e=f();a(0,"spk-form-field")(1,"label",31),m(2,De,1,0,"ng-container",27),s(),a(3,"input",38),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s(),a(4,"spk-icon",30),d(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 Be(t,o){t&1&&T(0)}function Ge(t,o){if(t&1){let e=f();a(0,"spk-toggle",22)(1,"label",31),m(2,Be,1,0,"ng-container",27),s(),a(3,"input",39),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(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 ze(t,o){t&1&&T(0)}function Ke(t,o){if(t&1&&d(0),t&2){let e=o.$implicit;k(" ",e," ")}}function Ue(t,o){if(t&1){let e=f();a(0,"spk-select",40)(1,"label",31),m(2,ze,1,0,"ng-container",27),s(),a(3,"input",41),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),s()(),m(4,Ke,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 Xe(t,o){t&1&&T(0)}function je(t,o){if(t&1){let e=f();a(0,"app-timespan",37),C("ngModelChange",function(n){u(e);let r=p().$implicit,c=p();return g(c.updateSettingValue(r,n))}),a(1,"label",31),m(2,Xe,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 qe(t,o){if(t&1){let e=f();U(0)(1),m(2,Se,5,5,"ng-template",null,1,P),a(4,"div",17),m(5,Oe,12,3,"div",18)(6,we,4,9,"app-file-tree",19)(7,ye,3,4,"app-file-tree",20)(8,he,6,5,"spk-form-field")(9,Ne,8,6,"spk-form-field")(10,$e,6,7)(11,Ae,3,5,"app-size",21)(12,Re,6,4,"spk-form-field")(13,Ge,4,4,"spk-toggle",22)(14,Ue,6,6)(15,je,3,5,"app-timespan",21),a(16,"button",23),C("click",function(){let n=u(e).$implicit,r=p();return g(r.removeSetting(n))}),a(17,"spk-icon"),d(18,"x-bold"),s()()()}if(t&2){let e=o.$implicit,i=o.$index,n=p();D("destination-"+e.Name+i),l(),D(n.inAppOptions(e.Name)),l(4),O(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 _e=class t{#e=B(ee);options=G.required();hiddenOptions=y([]);hasFreeTextSettings=y(!1);applicationOptions=y();allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=R(()=>{let o=this.hiddenOptions();return this.options().map(n=>{let r=this.allOptions().find(ce=>ce.name===n.Name?.replace("--","")),c=n.Value??"";return r&&!o.includes(r.name)?(r.type==="Boolean"&&(c=c&&c.toLowerCase()==="true"||!1),r.type==="Integer"&&(c=parseInt(c)||0),w(F({},n),{Value:N(c),FormView:r})):this.hasFreeTextSettings()?w(F({},n),{Value:N(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}}):null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=R(()=>{let o=this.options().map(i=>i.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>w(F({},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,"warning",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),m(5,me,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,ue,4,1,null,null,V),M(),s()(),M(),m(13,ge,2,0,"div",13),I(14,qe,19,3,null,null,V),s()),e&2&&(_("disallowToggle",!0),l(5),O(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),L(i.nonSelectedOptionsGrouped()),l(2),O(i.selectedSettings().length===0?13:-1),l(),L(i.selectedSettings()))},dependencies:[le,ne,re,te,ie,oe,ae,W,H,q,J,Z,j,Q,Y,pe,se,X],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}.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{_e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-H5MGVT7B.js";import{Db as o,Eb as n,Ua as g,Vb as h,Xb as _,Yb as a,bb as d,gb as p,jc as c,lb as m,sa as r,wb as f,zb as C}from"./chunk-4KE2I7OA.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,s){e&1&&c(0,"Title")}function T(e,s){e&1&&(o(0,"spk-icon"),c(1,"caret-down"),n())}var l=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b,g as c}from"./chunk-BMMOMXWX.js";import"./chunk-GQCUCL25.js";import"./chunk-74DADXEI.js";import"./chunk-A6RETV76.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import"./chunk-ABANCAM5.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import"./chunk-H5MGVT7B.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as re}from"./chunk-UEYPJIJG.js";import{a as ne}from"./chunk-SF5ML7OT.js";import"./chunk-HZQEM2P7.js";import{a as ie}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import{a as te}from"./chunk-DLJSVAM2.js";import{b as oe,e as le,h as ae,s as _e}from"./chunk-ABANCAM5.js";import"./chunk-B37C3RGG.js";import{d as j,e as H}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-H5MGVT7B.js";import{h as ee}from"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import{B as O,Cc as q,Db as n,Eb as l,F as $,Jb as g,Qc as b,Rb as c,Sb as D,Tb as S,Ua as r,Ub as w,Vb as G,Wb as p,Z as E,ea as C,fa as m,gb as x,jc as u,lb as f,n as K,oc as h,pc as L,qc as M,r as y,rc as B,sa as F,sc as X,tc as v,ub as T,va as P,vc as z,wb as I,wc as V,zb as A,zc as W}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var ce=a=>["/backup",a,"export"],se=()=>["/"];function ue(a,_){if(a&1){let t=g();n(0,"section")(1,"h4"),c(2,4),l(),n(3,"p"),c(4,5),l(),n(5,"spk-checkbox",11),u(6," Delete local database "),n(7,"input",12),M("ngModelChange",function(e){C(t);let o=p();return L(o.deleteLocalDb,e)||(o.deleteLocalDb=e),m(e)}),l()()()}if(a&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(a,_){if(a&1){let t=g();n(0,"section"),B(1),n(2,"h4"),c(3,6),l(),n(4,"p"),c(5,7),W(6,"bytes"),l(),n(7,"spk-checkbox",11),u(8," Delete remote files "),n(9,"input",12),M("ngModelChange",function(e){C(t);let o=p();return L(o.deleteRemoteFiles,e)||(o.deleteRemoteFiles=e),m(e)}),l()()()}if(a&2){let t,i=p(),e=v(0),o=(t=e==null||e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFileSize)!==null&&t!==void 0?t:0;r(6),D(i.fileCount())(i.fileCount())(q(6,4,o,!0,!0)),S(5),r(3),h("ngModel",i.deleteRemoteFiles)}}var k=class a{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(j);id=F.required();backup=b(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({request:()=>({dbPath:this.backup()?.Backup?.DBPath}),loader:({request:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(y(()=>!0),O(()=>K(!1)))});fileCount=b(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:i}).pipe($(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=x({type:a,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:20,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let o;o=$localize`Delete local database`;let N;N=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=w(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let U;return U=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,i,e,o,N,R,U,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,i){if(t&1){let e=g();B(0)(1),n(2,"h3"),c(3,0),l(),f(4,ue,8,1,"section"),n(5,"section")(6,"h4"),c(7,1),l(),n(8,"p"),c(9,2),l(),n(10,"button",8),u(11," Export configuration "),n(12,"spk-icon"),u(13,"caret-right"),l()()(),f(14,Ee,10,8,"section"),n(15,"div",9)(16,"button",8),c(17,3),l(),n(18,"button",10),G("click",function(){return C(e),m(i.deleteBackup())}),u(19,"Delete backup"),l()()}if(t&2){let e=X(i.backup()),o=i.noLocalDbResource.value();r(3),D(e==null||e.Backup==null?null:e.Backup.Name),S(3),r(),A(o?4:-1),r(6),T("routerLink",V(8,ce,i.id())),r(4),A(o?14:-1),r(2),T("routerLink",z(10,se)),r(2),I("loader",i.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,le,ae,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v}from"./chunk-T3WJQ544.js";import{l as T}from"./chunk-BMMOMXWX.js";import"./chunk-GQCUCL25.js";import"./chunk-74DADXEI.js";import"./chunk-A6RETV76.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import{a as m}from"./chunk-UEYPJIJG.js";import"./chunk-WBCTOQOO.js";import{a as L}from"./chunk-SF5ML7OT.js";import"./chunk-HZQEM2P7.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import"./chunk-DLJSVAM2.js";import"./chunk-ABANCAM5.js";import"./chunk-B37C3RGG.js";import{b as E,c as B,e as b,f as $}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{p as M,q as N,v as I}from"./chunk-H5MGVT7B.js";import{h as K}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as p,E as C,Eb as r,Fb as s,Pb as d,Qb as c,Rc as O,Ua as n,Wb as R,Z as l,gb as D,jc as A,lb as k,lc as P,ub as u,uc as h,xc as _,zb as g}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var G=(i,e)=>[i,e,"general"],y=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],w=(i,e)=>[i,e,"schedule"],X=(i,e)=>[i,e,"options"];function x(i,e){if(i&1&&(p(0,"p"),A(1),r()),i&2){let a=R();n(),P("Editing: ",a.backupName(),"")}}function z(i,e){i&1&&s(0,"spk-progress-bar",6)}function j(i,e){i&1&&(p(0,"section"),s(1,"router-outlet"),r())}var f=class i{#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,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(C(1)).subscribe({next:e=>{let a=e.Backup;a.Settings=[...a.Settings],this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(a),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=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.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=D({type:i,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 a;a=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$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,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(s(0,"app-status-bar"),p(1,"header"),k(2,x,2,1,"p"),p(3,"spk-stepper")(4,"div",5),d(5,0),s(6,"spk-radio"),c(),r(),p(7,"div",5),d(8,1),s(9,"spk-radio"),c(),r(),p(10,"div",5),d(11,2),s(12,"spk-radio"),c(),r(),p(13,"div",5),d(14,3),s(15,"spk-radio"),c(),r(),p(16,"div",5),d(17,4),s(18,"spk-radio"),c(),r()()(),k(19,z,1,0,"spk-progress-bar",6)(20,j,2,0,"section")),a&2&&(n(2),g(t.isNew()?-1:2),n(2),u("routerLink",_(7,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(10,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(13,U,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(16,w,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),u("routerLink",_(19,X,t.isDraft()?"/backup-draft":"/backup",t.backupId())),n(3),g(t.finishedLoading()?20:19))},dependencies:[B,b,$,v,N,I,M],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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ae}from"./chunk-T3WJQ544.js";import{a as te}from"./chunk-UEYPJIJG.js";import"./chunk-WBCTOQOO.js";import{a as Q}from"./chunk-SF5ML7OT.js";import"./chunk-HZQEM2P7.js";import"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-LWIINXS7.js";import"./chunk-DLJSVAM2.js";import{c as Y,e as Z,h as x,s as ee}from"./chunk-ABANCAM5.js";import"./chunk-B37C3RGG.js";import{b as z,e as q}from"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{a as H,g as W,l as j}from"./chunk-H5MGVT7B.js";import{h as J}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{Db as i,E as g,Eb as a,F as d,Fb as l,N as E,Pb as p,Qb as r,Qc as k,Rb as F,Rc as h,Sb as L,Tb as U,Ua as s,Vb as u,Z as D,gb as y,jc as C,lb as v,oc as w,pc as X,qc as V,r as O,ub as A,va as c,wb as P,yb as G,zb as K}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe(()=>this.lastValidatedPath.set(""))}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$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 n;n=$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 b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$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 M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),p(4,0),l(5,"spk-icon"),r(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),p(18,5),l(19,"spk-icon"),r(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),p(21,6),l(22,"spk-icon"),r(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),p(24,7),l(25,"spk-icon"),r(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),p(35,9),l(36,"spk-icon"),r(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),p(38,10),l(39,"spk-icon"),r(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),p(41,11),l(42,"spk-icon"),r(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),p(44,12),l(45,"spk-icon"),r(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),G(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],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{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as O}from"./chunk-WRKRV6RQ.js";import{a as R,c as y,h as P}from"./chunk-N5FH4YAX.js";import{Ba as v,Ca as i}from"./chunk-EBXJGPRA.js";import{B as A,E as l,F as S,P as p,T as a,Z as s,f as g,k as m,n as d,r as I,va as o,za as E}from"./chunk-4KE2I7OA.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-LWIINXS7.js";import{a as b,n as w}from"./chunk-H5MGVT7B.js";import"./chunk-N5FH4YAX.js";import{ia as A}from"./chunk-EBXJGPRA.js";import{Bb as I,Cb as v,Db as c,Dc as F,Eb as r,Ib as u,Jb as M,Qc as $,Rb as P,Ua as l,Vb as k,Wb as s,Z as y,ea as O,fa as x,gb as T,ic as C,jc as p,kc as E,lb as a,ub as d,va as m,vb as h,wb as f,wc as _,xc as N,zb as g}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Ht,b as jt}from"./chunk-GQCUCL25.js";import{a as pt}from"./chunk-74DADXEI.js";import{a as Ke}from"./chunk-A6RETV76.js";import{a as ct,b as Et,c as _t}from"./chunk-HIW2CN45.js";import{a as Xt,b as Dt,c as Wt}from"./chunk-4V45XF67.js";import{a as De}from"./chunk-UEYPJIJG.js";import{a as Q}from"./chunk-LUKUBN2Z.js";import{a as Re}from"./chunk-LWIINXS7.js";import{a as Kt,b as Ie,c as ee,d as ve,e as te,f as Le,g as rt,h as ge,i as be,j as Ge,m as st,n as Ue,o as lt,p as zt,q as Ve,r as Ce,s as fe,t as Be}from"./chunk-ABANCAM5.js";import{b as me,d as re}from"./chunk-WRKRV6RQ.js";import{A as $e,C as ot,a as J,b as nt,d as Vt,e as we,g as Fe,l as se,o as Bt,p as it,t as le}from"./chunk-H5MGVT7B.js";import{h as at}from"./chunk-N5FH4YAX.js";import{ia as Ut}from"./chunk-EBXJGPRA.js";import{$a as ye,$b as It,Ab as ne,Bb as ie,Cb as oe,Db as s,Dc as je,Eb as r,F as Xe,Fb as F,Gb as z,Hb as X,Ib as Je,Jb as $,Pb as E,Qb as D,Qc as w,Rb as N,Rc as xe,Sb as ft,T as Ae,Tb as Tt,Ua as l,Ub as Ne,Vb as T,Wb as _,Xb as $t,Yb as Rt,Z as A,cc as vt,dc as Lt,ea as u,ec as bt,f as Ze,fa as m,gb as Z,gc as Oe,hc as ke,ic as ae,jc as d,ka as xt,kc as Me,lb as C,lc as B,mc as St,oc as L,pc as b,qc as G,ra as Ct,rc as We,sa as Pe,sc as Ee,tb as wt,tc as x,ub as p,uc as Gt,va as S,vc as He,wb as ue,wc as et,yc as tt,zb as f}from"./chunk-4KE2I7OA.js";import{a as K,b as de,c as Mt}from"./chunk-7CGTOI24.js";var tn=["fileInput"],nn=[[["label"]]],on=["label"],dt=class o{customId=Pe();content=S("");readonly=S(!1);placeholder=Pe("Drop a file here or use the browse button");fileInputRef;onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=xe(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){if(e&1&&vt(tn,5),e&2){let i;Lt(i=bt())&&(n.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Gt([{provide:Kt,useExisting:o,multi:!0}])],ngContentSelectors:on,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]]},template:function(e,n){if(e&1){let i=$();$t(nn),Rt(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",2)(2,"button",3),T("click",function(){return u(i),m(n.triggerBrowse())}),E(3,1),F(4,"spk-icon"),D(),r()(),s(5,"div",4),T("drop",function(c){return u(i),m(n.onFileDrop(c))})("dragover",function(c){return u(i),m(n.onDragOver(c))}),s(6,"textarea",5),G("ngModelChange",function(c){return u(i),b(n.content,c)||(n.content=c),m(c)}),r()(),s(7,"input",6,0),T("change",function(c){return u(i),m(n.onFileSelected(c))}),r()}e&2&&(l(6),p("placeholder",n.placeholder()),L("ngModel",n.content),p("disabled",n.readonly()))},dependencies:[fe,ee,te,ge,J,Fe],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var ut=class o{#n=A(at);#t=A(we);#e=A(Re);testDestination(t,e,n){return this.#e.hasV2TestOperations()?this.testDestinationv2(t,e,n):this.testDestinationv1(t,e,n)}testDestinationv2(t,e,n){return new Ze(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(i,t,e,a);return}this.handleGenericError(i,t,e,a.Error??"Unknown error")},error:a=>{let c=a?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){n?this.handleMissingFolder(i,t,e):this.handleGenericError(i,t,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(i,t,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(i,t,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(i,t,e,a?.message??"Unknown error")}})})}testDestinationv1(t,e,n){return new Ze(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:a=>{i.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,t,e,n).subscribe(c=>{i.next(c)})}})})}handleMissingFolder(t,e,n){this.#t.open(Q,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,n,a);return}else this.handleFolderCreateFailure(t,e,n,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,n)},error:a=>{this.handleFolderCreateFailure(t,e,n,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(t,e,n,i){this.#t.open(Q,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}emitSuccessV2(t,e,n,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:n,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,n){this.#t.open(Q,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:n}),t.complete()}})}reportNoAction(t,e,n){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}handleMissingCertificate(t,e,n,i){this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
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,n);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:n}),t.complete()}})}handleIncorrectKey(t,e,n,i,a){a?this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
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:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}}):this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(t,e,n);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:n}),t.complete()}})}handleGenericError(t,e,n,i){this.#t.open(Q,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:n}),t.complete()}})}handleDestinationErrorv1(t,e,n,i){return new Ze(a=>{if(t==="missing-folder"){i?this.handleMissingFolder(a,e,n):this.handleGenericError(a,e,n,$localize`The remote destination folder does not exist.`);return}if(t.startsWith("incorrect-cert:")){let c=t.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,n,c);return}if(t.startsWith("incorrect-host-key:")){let c=t.split('incorrect-host-key:"')[1].split('",')[0],h=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,n,c,h);return}this.handleGenericError(a,e,n,t)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"})};var mt=class o{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"})};var an=["formRef"];function rn(o,t){o&1&&(s(0,"spk-alert",17),E(1,5),F(2,"spk-icon",26),D(),r())}function sn(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;B(" ",e.DisplayName," ")}}function ln(o,t){if(o&1&&F(0,"spk-progress-bar",40),o&2){let e=_(3);ue("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),p("value",e.calculatePasswordStrength()*(100/5))}}function cn(o,t){o&1&&(s(0,"span",35),N(1,10),r())}function _n(o,t){o&1&&(E(0,8,1),F(1,"spk-icon"),D())}function pn(o,t){o&1&&(E(0,8,2),F(1,"spk-icon"),D())}function dn(o,t){o&1&&(E(0,11,1),F(1,"spk-icon",42),D())}function un(o,t){o&1&&(E(0,11,2),F(1,"spk-icon"),D())}function mn(o,t){if(o&1){let e=$();s(0,"button",41),T("click",function(){u(e);let i=_(3);return m(i.copyPassword())}),E(1,11),C(2,dn,2,0)(3,un,2,0),D(),r()}if(o&2){let e=_(3);l(2),f(e.copiedPassword()?2:3)}}function Fn(o,t){o&1&&(s(0,"spk-alert",39),N(1,12),r())}function gn(o,t){if(o&1){let e=$();s(0,"div",30)(1,"spk-form-field")(2,"label",31),E(3,7),F(4,"sup"),D(),r(),F(5,"input",32),r(),C(6,ln,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),F(8,"input",34),C(9,cn,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),T("click",function(){u(e);let i=_(2);return m(i.showPassword.set(!i.showPassword()))}),E(12,8),C(13,_n,2,0)(14,pn,2,0),D(),r(),s(15,"button",37),T("click",function(){u(e);let i=_(2);return m(i.generatePassword())}),E(16,9),F(17,"spk-icon"),D(),r(),C(18,mn,4,1,"button",38),r(),C(19,Fn,2,0,"spk-alert",39),r()}if(o&2){let e=_(2);l(5),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.password?6:-1),l(2),p("type",e.showPassword()?"text":"password"),l(),f(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),f(e.showPassword()?13:14),l(5),f(e.showCopyPassword()?18:-1),l(),f(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Cn(o,t){if(o&1&&(s(0,"spk-select",27)(1,"label",28),N(2,6),r(),F(3,"input",29),C(4,sn,1,1,"ng-template"),r(),C(5,gn,20,7,"div",30)),o&2){let e=_();p("options",e.encryptionOptions())("isClearable",!1),l(5),f(e.encryptionFieldSignal()!==""?5:-1)}}function fn(o,t){if(o&1&&(s(0,"button",24),E(1,13),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.nameAndDescriptionValid()===!1)}}function Tn(o,t){if(o&1&&(s(0,"button",25),E(1,14),F(2,"spk-icon"),D(),r()),o&2){let e=_();p("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ze=new Ce,qt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>ze.group({name:ze.control(o.name,[ve.required]),description:ze.control(o.description),encryption:ze.control(o.encryption,[Wt()]),password:ze.control(o.password,[Dt(t=>t?.value.encryption!=="",[ve.required])]),repeatPassword:ze.control(o.repeatPassword,[Dt(t=>t?.value.encryption!=="",[ve.required])])}),At={Key:"",DisplayName:"None"},ht=class o{#n=A(re);#t=A(me);#e=A(Xt);#i=A(ce);#o=A(Re);formRef=ye.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=xe(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=w(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=w(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#a(t??""),this.copiedPassword.set(!0)}async#a(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[At,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#e.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.isNew()||this.#i.submit(!0),this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,an,5),e&2&&ke()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let h;h=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let y;y=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let I;I=$localize`Encryption`;let R;R=$localize`Encryption`;let V;V=$localize`Password`;let O;O=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let W;W=$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:`,W=Ne(W);let k;k=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let g;g=$localize`Passwords do not match`;let v;v=$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:`,v=Ne(v);let H;H=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let j;j=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let q;return q=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,a,c,h,y,R,U,W,k,g,v,H,j,q,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",V,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",O,"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=$();s(0,"form",15,0),T("submit",function(){return u(i),m(n.next())}),s(2,"h3",16),N(3,1),r(),C(4,rn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),E(7,2),F(8,"sup"),D(),r(),F(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),N(12,3),r(),F(13,"textarea",21),r(),C(14,Cn,6,3),s(15,"div",22)(16,"button",23),T("click",function(){return u(i),m(n.exit())}),E(17,4),F(18,"spk-icon"),D(),r(),C(19,fn,3,1,"button",24)(20,Tn,3,1,"button",25),r()()}if(e&2){let i;p("formGroup",n.generalForm),l(4),f(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),f(n.isNew()?14:-1),l(5),f(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[Be,be,ee,te,Le,Ue,Ve,se,le,Fe,J,it,nt,ot],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function Sn(o,t){if(o&1){let e=$();s(0,"div",24)(1,"spk-form-field")(2,"label",25),N(3,7),r(),s(4,"input",26,0),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),m(i)}),T("focus",function(){u(e);let i=ae(5);return m(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),F(9,"label",28),s(10,"input",29,1),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),m(i)}),T("focus",function(){u(e);let i=ae(11);return m(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),N(17,8),r(),s(18,"input",31),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),m(i)}),r()(),s(19,"spk-select",32)(20,"input",33),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),m(i)}),r()()(),s(21,"app-toggle-card",34),z(22,35),N(23,9),X(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),m(i)}),r(),D(),r(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),m(i)}),r(),D(),r(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),m(i)}),r(),D(),r(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),m(i)}),r(),D(),r(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),m(i)}),r(),D(),r(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),m(i)}),r(),D(),r(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),G("ngModelChange",function(i){u(e);let a=_();return b(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),m(i)}),r(),D(),r()()()}if(o&2){let e=_();l(4),L("ngModel",e.scheduleFields.nextTime().time),l(6),L("ngModel",e.scheduleFields.nextTime().date),l(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),l(),p("options",e.unitOptions)("isClearable",!1),l(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),p("disallowToggle",!0),l(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var En=[{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`}],he={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}}},Pt=class o{#n=A(ce);#t=A(re);#e=A(me);unitOptions=En;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let a;a=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let h;h=$localize`Run again every`;let y;y=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let k;return k=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,a,c,h,y,I,R,V,O,U,W,k,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),N(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),G("ngModelChange",function(a){return b(n.scheduleFields.autoRun,a)||(n.scheduleFields.autoRun=a),a}),r(),D(),r(),s(6,"p"),N(7,4),r()(),C(8,Sn,46,14),s(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),E(11,5),F(12,"spk-icon"),D(),r(),s(13,"button",23),T("click",function(){return n.next()}),E(14,6),F(15,"spk-icon"),D(),r()()),e&2&&(l(5),L("ngModel",n.scheduleFields.autoRun),l(3),f(n.scheduleFields.autoRun()?8:-1))},dependencies:[fe,ee,Ge,Ie,te,ge,se,$e,J,Fe,le,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Dn(o,t){if(o&1&&(z(0,4),d(1),X()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.startsWith)}}function hn(o,t){if(o&1&&(z(0,5),d(1),X()),o&2){let e,n=_();l(),Me((e=n.currentExpressionOption())==null?null:e.endsWith)}}var An=[{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"}],Ft=class o{path=Pe.required();osType=Pe();pathChange=Ct();remove=Ct();internalPath=S("");pathType=S("-Expression");currentExpressionOption=w(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=w(()=>{let e=this.osType()==="Windows"?"\\":"/";return An.map(n=>n.value==="-Folder"||n.value==="+Folder"?de(K({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?de(K({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?de(K({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?de(K({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?de(K({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?de(K({},n),{startsWith:"*.",endsWith:""}):de(K({},n),{startsWith:"",endsWith:""}))});pathEffect=xe(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/";e.startsWith("%")&&e.endsWith(a)||i&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(s(0,"spk-select",0)(1,"input",1),G("ngModelChange",function(a){return b(n.pathType,a)||(n.pathType=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),G("ngModelChange",function(a){return b(n.internalPath,a)||(n.internalPath=a),a}),T("ngModelChange",function(){return n.updateFilter()}),r(),C(4,Dn,2,1,"ng-container",4)(5,hn,2,1,"ng-container",5),r(),s(6,"div",6),T("click",function(){return n.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;p("options",n.expressionOptions())("isClearable",!1),l(),L("ngModel",n.pathType),l(2),L("ngModel",n.internalPath),l(),f(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),f(!((a=n.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[fe,ee,te,ge,le,se,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 Pn=["formRef"],Qt=()=>({standalone:!0});function yn(o,t){if(o&1){let e=$();s(0,"spk-form-field",42)(1,"input",43),G("ngModelChange",function(i){u(e);let a=_(2);return b(a.editingPath,i)||(a.editingPath=i),m(i)}),r()(),s(2,"button",44),T("click",function(){u(e);let i=_(2);return m(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),T("click",function(){u(e);let i=_(2);return m(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=_(2);l(),L("ngModel",e.editingPath),p("ngModelOptions",He(2,Qt))}}function Nn(o,t){if(o&1){let e=$();s(0,"spk-form-field",42),F(1,"input",45),r(),s(2,"button",44),T("click",function(){u(e);let i=_().$implicit,a=_();return m(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),T("click",function(){u(e);let i=_().$implicit,a=_();return m(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=_().$implicit;wt("readonly",!0),l(),p("ngModel",e)("ngModelOptions",He(3,Qt))}}function On(o,t){if(o&1&&(s(0,"div",30),C(1,yn,8,3)(2,Nn,8,4),r()),o&2){let e=t.$implicit,n=_();l(),f(n.oldPath()===e?1:2)}}function kn(o,t){if(o&1){let e=$();s(0,"app-new-filter",47),T("pathChange",function(i){let a=u(e).$index,c=_(2);return m(c.patchPathAt(i,a))})("remove",function(){let i=u(e).$index,a=_(2);return m(a.removePathAt(i))}),r()}if(o&2){let e,n=t.$implicit,i=_(2);p("path",n)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Mn(o,t){if(o&1&&ie(0,kn,1,2,"app-new-filter",46,ne),o&2){let e=_();oe(e.pathArray())}}function xn(o,t){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),F(2,"input",48),r(),s(3,"spk-select",49),F(4,"input",50),r()()),o&2){let e=_();l(3),p("options",e.sizeOptions())("isClearable",!1)}}var _e=new Ce,wn=["Bytes","KB","MB","GB","TB","PB"],Yt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>_e.group({path:_e.control(o.path),excludes:_e.group({hidden:_e.control(o.excludes.hidden),system:_e.control(o.excludes.system),temporary:_e.control(o.excludes.temporary),filesLargerThan:_e.group({size:_e.control(null),unit:_e.control(null)})})}),yt=class o{#n=A(ce);#t=A(re);#e=A(me);formRef=ye.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new rt("");filesLargerThan=w(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(wn);osType=this.#n.osType;pathSignal=De(this.sourceDataForm.controls.path.valueChanges);pathArray=w(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=w(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=S(null);editingPath=S(null);addingNewPath=S(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),a=this.pathArray().map((c,h)=>h===e?`${t}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,c)=>c!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#n.isNew()||this.#n.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,Pn,5),e&2&&ke()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let c;c=$localize`Source Data`;let h;h=$localize`Folder path`;let y;y=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let R;R=$localize`Paths`;let V;V=$localize`Add a path directly from your machine.`;let O;O=$localize`Filters`;let U;U=$localize`Customize your filters.`;let W;W=$localize`Add filter`;let k;k=$localize`Exclude`;let g;g=$localize`Choose if there’s any files you want to exclude.`;let v;v=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let H;H=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Files larger than `;let P;P=$localize`Edit path`;let pe;return pe=$localize`Select an option...`,[["formRef",""],c,h,y,I,R,V,O,U,W,k,g,v,H,j,q,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",a,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",P,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",pe]]},template:function(e,n){if(e&1){let i=$();s(0,"form",16,0),T("submit",function(){return u(i),m(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),r(),F(8,"input",21),r(),s(9,"div",22)(10,"button",23),T("click",function(){return u(i),m(n.goBack())}),E(11,3),F(12,"spk-icon"),D(),r(),s(13,"button",24),E(14,4),F(15,"spk-icon"),D(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),z(18,27),N(19,5),X(),s(20,"p",28),N(21,6),r(),s(22,"div",29),ie(23,On,3,1,"div",30,ne),s(25,"div",31)(26,"spk-form-field"),F(27,"input",32),r(),s(28,"button",33),T("click",function(){return u(i),m(n.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),z(32,27),N(33,7),X(),s(34,"p",28),N(35,8),r(),s(36,"button",34),T("click",function(){return u(i),m(n.addFilter())}),N(37,9),r(),C(38,Mn,2,0),r(),s(39,"app-toggle-card",35),z(40,27),N(41,10),X(),s(42,"p",28),N(43,11),r(),s(44,"spk-toggle",36),E(45,12),F(46,"input",37),D(),r(),s(47,"spk-toggle",36),E(48,13),F(49,"input",38),D(),r(),s(50,"spk-toggle",36),E(51,14),F(52,"input",39),D(),r(),s(53,"spk-toggle",40),T("click",function(){return u(i),m(n.toggleFilesLargerThan())}),N(54,15),r(),C(55,xn,5,2,"div",41),r()()()}if(e&2){let i;p("formGroup",n.sourceDataForm),l(5),p("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),l(12),p("disallowToggle",!0),l(6),oe(n.nonFilterPaths()),l(4),p("formControl",n.newPathCtrl),l(4),p("disallowToggle",!0),l(7),f((i=n.pathSignal())!=null&&i.length?38:-1),l(),p("disallowToggle",!0),l(14),ue("active",n.filesLargerThan()),l(2),f(n.filesLargerThan()?55:-1)}},dependencies:[fe,be,ee,Ge,Ie,te,Le,ge,Be,st,Ue,Ve,lt,se,J,Fe,$e,le,Ft,pt,Ke],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Zt="1W:1D,4W:1W,12M:1M",Se=new Ce,ce=class o{#n=A(re);#t=A(Re);#e=A(we);#i=A(at);#o=A(mt);generalForm=qt();sourceDataForm=Yt();scheduleFields={autoRun:S(he.autoRun),nextTime:S(he.nextTime),runAgain:S(he.runAgain)};destinationForm=Jt();settings=S([]);optionsFields={remoteVolumeSize:S("50MB"),backupRetention:S("all"),backupRetentionTime:S(""),backupRetentionVersions:S(0),backupRetentionCustom:S("")};oauthServiceLink=w(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=w(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=S(!1);backupId=S(null);backupName=w(()=>this.generalFormSignal()?.name??"");isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);applicationOptions=S(null);isNew=w(()=>this.backupId()==="new");osType=w(()=>this.#t.systemInfo()?.OSType);selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=w(()=>{let t=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return t.filter(n=>e.findIndex(i=>i.name===n.name)===-1)});sourceDataFormSignal=De(this.sourceDataForm.valueChanges);destinationFormSignal=De(this.destinationForm.valueChanges);generalFormSignal=De(this.generalForm.valueChanges);encryptionFieldSignal=De(this.generalForm.controls.encryption.valueChanges);destinationOptions=w(()=>this.#t.backendModules()??[]);advancedOptions=w(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=w(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[At,...t]});nonSelectedOptions=w(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));addOrUpdateAdvancedFormPairByName(t,e,n){let i=this.selectedAdvancedFormPair().find(a=>a.name===t);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(n);else{let a=this.notSelectedAdvancedFormPair().find(c=>c.name===t);if(!a)return;this.addAdvancedFormPair(a,e,n)}}addAdvancedFormPairByName(t,e,n){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===t);i&&this.addAdvancedFormPair(i,e,n)}addAdvancedFormPair(t,e,n){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=n??t.defaultValue;this.createFormField(i,t,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),t])}removeAdvancedFormPair(t,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(t.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===t.name)!==-1&&this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==t.name),i))}submit(t=!1){this.isSubmitting.set(!0);let e=this.#_(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#i.postApiV1Backups({requestBody:e}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#i.putApiV1BackupById({id:n,requestBody:e}).pipe(Xe(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#c(),this.#n.navigate(["/"]);return}this.#e.open(Q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(t){this.#r(),setTimeout(()=>{this.#s(t)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],i=t.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",a=t.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,c={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t.TargetURL?Et(t.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#s(t){let e=Et(t);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(t){let e=t.Settings?.find(c=>c.Name==="encryption-module"),n=t.Settings?.find(c=>c.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:t.Name??"",description:t.Description??""};i&&i!==""&&(a.encryption=i),n&&n!==""&&(a.password=n,a.repeatPassword=n),this.generalForm.patchValue(a)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#p(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>K(K({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(c=>!e.includes(c.Name)),i=t.Settings?.filter(c=>e.includes(c.Name));this.settings.set(n??[]),n?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var a="all";i?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===Zt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#l(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#_(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#l(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let h=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([O,U])=>U).map(([O,U])=>O):[],y=n.path?.split("\0")??[],I=this.mapFormsToSettings(),R=Object.entries(n.excludes??{}).filter(([O,U])=>U&&O!=="filesLargerThan").map(([O])=>O),V=n.excludes?.filesLargerThan;return R.length&&I.push({Name:"--exclude-files-attributes",Value:R.join(",")}),V&&V.size!==null&&V.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${V.size}${V.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:a[0]??null,Sources:y.filter(O=>!O.startsWith("-")),Settings:I,Filters:y.filter(O=>O.startsWith("-")).map((O,U)=>({Order:U,Include:!1,Expression:O.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:h}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":a.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":a.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":a.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":a.push({Name:"retention-policy",Value:Zt});break}let c=[...t,...n],h=this.settings().filter(y=>!c.includes(y.Name)).map(y=>{let I=y.Value;return typeof y.Value=="number"&&(I=y.Value.toString()),typeof y.Value=="boolean"&&(I=y.Value?"True":"False"),{Name:`--${y.Name}`,Value:I}});return[...i,...a,...h]}#l(t){return t.controls.map(e=>ct(e.value))}#p(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(t,e,n){if(e.type==="Integer"){t.addControl(e.name,Se.control(n?parseInt(n):0));return}if(e.type==="Boolean"){t.addControl(e.name,Se.control(n==="true"||n==="True"));return}if(e.type==="Flags"){t.addControl(e.name,Se.control(n??""));return}if(e.type==="Timespan"||e.type==="DateTime"){t.addControl(e.name,Se.control(n,[ve.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}t.addControl(e.name,Se.control(n))}addDestinationFormGroup(t,e,n=!1){let i=_t.find(k=>k.customKey===t||k.key===t),a=i?.key,c=this.destinationOptions().find(k=>k.Key===a);if(!c||!c.Options)return;let h=i&&i.oauthField?i.oauthField:null,y=i&&i.customFields?i.customFields:{},I=i&&i.dynamicFields?i.dynamicFields:[],R=i&&i.advancedFields?i.advancedFields:[],V=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:h,custom:[],dynamic:[],advanced:[]});let O=Se.group({}),U=Se.group({}),W=Se.group({});y&&Object.entries(y).forEach(([k,g],v)=>{let q=g,{formElement:H}=q,j=Mt(q,["formElement"]);O.addControl(k,H(e?.custom[k])),this.destinationFormPair.update(P=>(P.custom.push(K({order:900+v},j)),P))});for(let k=0;k<c.Options.length;k++){let g=c.Options[k];if(g.Deprecated)continue;let v=I.find(H=>H===g.Name||g.Aliases?.includes(H.name)||H.name===g.Name);if(v){let H=g.Aliases?.indexOf(v.name)??-1,j=g.Aliases&&H>-1?g.Aliases[H]:g.Name,q=v&&typeof v!="string",P=q?v?.defaultValue??g.DefaultValue:g.DefaultValue,pe={name:j,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,order:900+k},M=q?K(K({},pe),v):pe,Y=e?.dynamic[j]??P??g.DefaultValue;this.createFormField(U,M,Y),this.destinationFormPair.update(kt=>(kt.dynamic.push(M),kt))}else{if(V.find(Y=>Y===g.Name))continue;let j=R.find(Y=>Y===g.Name||Y.name===g.Name),q=j&&typeof j!="string",P=e?.advanced[g.Name],pe=P??g.DefaultValue,M={name:g.Name,type:g.Type,shortDescription:g.ShortDescription??void 0,longDescription:g.LongDescription??void 0,options:g.ValidValues,defaultValue:pe,order:900+k},Ye=q?K(K({},M),j):M;n&&P&&(this.createFormField(W,Ye,pe),this.selectedAdvancedFormPair.update(Y=>(Y.push(Ye),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(Ye),Y))}}this.destinationFormPair.update(k=>({oauthField:k.oauthField,custom:k.custom.sort((g,v)=>g.order-v.order),dynamic:k.dynamic.sort((g,v)=>g.order-v.order),advanced:k.advanced.sort((g,v)=>g.order-v.order)})),this.destinationForm.controls.destinations.push(en({key:i?.customKey??t,customGroup:O,dynamicGroup:U,advancedGroup:W}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(he.autoRun),this.scheduleFields.nextTime.set(he.nextTime),this.scheduleFields.runAgain.set(he.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Ae({token:o,factory:o.\u0275fac,providedIn:"root"})};var $n=["formRef"],Rn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"custom",destinationType:e,oauthField:n}),Ot=o=>({$implicit:o}),In=(o,t,e,n)=>({index:o,formView:t,formGroupName:"dynamic",destinationType:e,oauthField:n}),vn=(o,t,e,n)=>({index:o,formView:t,formGroupName:"advanced",destinationType:e,oauthField:n}),Ln=()=>({maxWidth:"700px",width:"100%"});function bn(o,t){o&1&&(E(0,5,2),F(1,"spk-icon"),D())}function Gn(o,t){o&1&&N(0,5,3)}function Un(o,t){if(o&1){let e=$();E(0,5,1),s(1,"button",20),T("click",function(){u(e);let i=_();return m(i.testDestination())}),C(2,bn,2,0)(3,Gn,1,0),r(),D()}if(o&2){let e=_();l(),ue("loader",e.testLoading())("success",e.successfulTest()),l(),f(e.successfulTest()?2:3)}}function Vn(o,t){if(o&1){let e=$();s(0,"p",26),T("click",function(){u(e);let i=_();return m(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),F(2,"strong")(3,"br")(4,"span",27),D(),r()}if(o&2){let e,n=_();l(4),ft((e=n.selectedDestinationType())==null?null:e.displayName),Tt(1)}}function Bn(o,t){if(o&1){let e=$();s(0,"div",33),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=t.$implicit;l(2),Me(e.displayName),l(2),Me(e.description)}}function Kn(o,t){if(o&1){let e=$();s(0,"button",34,1),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=t.$implicit;l(2),B(" ",e.displayName," ")}}function zn(o,t){if(o&1&&(s(0,"div",28),ie(1,Bn,5,2,"div",29,ne),r(),s(3,"spk-menu",30)(4,"button",31),N(5,9),r(),z(6,19),ie(7,Kn,3,1,"button",32,ne),X(),r()),o&2){let e=_();l(),oe(e.destinationTypeOptionsFocused()),l(2),p("searchable",!0),l(4),oe(e.destinationTypeOptionsNotFocused())}}function Xn(o,t){o&1&&Je(0)}function Wn(o,t){if(o&1&&C(0,Xn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",et(7,Ot,tt(2,Rn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Hn(o,t){o&1&&Je(0)}function jn(o,t){if(o&1&&C(0,Hn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",et(7,Ot,tt(2,In,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(o,t){if(o&1){let e=$();E(0,10,1),s(1,"button",34,1),T("click",function(){let i=u(e).$implicit,a=_(2);return m(a.addAdvancedFormPair(i,0))}),r(),D()}if(o&2){let e=t.$implicit;l(),ft(e.name),Tt(0)}}function Qn(o,t){o&1&&Je(0)}function Yn(o,t){if(o&1&&C(0,Qn,1,0,"ng-container",39),o&2){let e,n=t.$implicit,i=t.$index;_();let a=ae(18),c=_();p("ngTemplateOutlet",a)("ngTemplateOutletContext",et(7,Ot,tt(2,vn,i,n,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Zn(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Jn(o,t){if(o&1&&(s(0,"app-file-tree",42)(1,"label",47),d(2),C(3,Zn,2,1,"spk-icon",48),r(),F(4,"input",49),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ei(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ti(o,t){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),C(3,ei,2,1,"spk-icon",48),r(),F(4,"input",49),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);p("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function ni(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ii(o,t){if(o&1&&(s(0,"spk-icon",53),d(1," link "),r()),o&2){_();let e=x(7),n=x(8);ue("error",e&&n==="error")("warn",e&&n==="warning"),p("spkTooltip",e)}}function oi(o,t){o&1&&(s(0,"spk-icon",52),d(1,"envelope"),r())}function ai(o,t){o&1&&(s(0,"spk-icon",52),d(1,"textbox"),r())}function ri(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),C(3,ni,2,1,"spk-icon",48),r(),F(4,"input",50),We(5)(6)(7)(8),C(9,ii,2,5,"spk-icon",51)(10,oi,2,0,"spk-icon",52)(11,ai,2,0,"spk-icon",52),r()),o&2){let e=_().$implicit,n=x(2),i=x(3),a=_(2);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.type==="Email"?"email":"text")("id",i)("formControlName",e.formView.name);let c=a.getFormFieldValue(0,e.formGroupName,e.formView.name),h=a.hasDoubleLeadingSlashes(c);l(3),Ee(h&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),Ee(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?9:e.formView.type==="Email"?10:11)}}function si(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function li(o,t){if(o&1){let e=$();s(0,"span",57),T("click",function(){u(e);let i=_(2).$implicit,a=_(2);return m(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function ci(o,t){o&1&&(s(0,"spk-icon",52),d(1,"password"),r())}function _i(o,t){if(o&1){let e=$();s(0,"spk-icon",58),T("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function pi(o,t){if(o&1){let e=$();s(0,"spk-icon",58),T("click",function(){u(e);let i=_(2).$implicit;return m(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function di(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),C(3,si,2,1,"spk-icon",48),r(),F(4,"input",54),C(5,li,2,0,"span",55)(6,ci,2,0,"spk-icon",52)(7,_i,2,0,"spk-icon",56)(8,pi,2,0,"spk-icon",56),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("type",e.formView.showPassword?"text":"password")("id",i)("formControlName",e.formView.name),l(),f(e.oauthField===e.formView.name?5:6),l(2),f(e.formView.showPassword?7:8)}}function ui(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function mi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;St(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Fi(o,t){if(o&1&&d(0),o&2){let e=_().$implicit;B(" ",e," ")}}function gi(o,t){if(o&1&&C(0,mi,1,2)(1,Fi,1,1),o&2){let e=_(3).$implicit;f(e.formView.loadOptions?0:1)}}function Ci(o,t){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),C(3,ui,2,1,"spk-icon",48),r(),F(4,"input",49),r(),C(5,gi,2,1,"ng-template",null,3,je)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("isClearable",!1)("optionTemplate",e),l(),p("for",c),l(),B(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function fi(o,t){if(o&1&&(We(0),C(1,Ci,7,8)),o&2){let e=_().$implicit,n=Ee(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:-1)}}function Ti(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(3).$implicit;p("spkTooltip",e.formView.longDescription)}}function Si(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;St(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ei(o,t){if(o&1&&(s(0,"spk-select",61)(1,"label",47),d(2),C(3,Ti,2,1,"spk-icon",48),r(),F(4,"input",49),r(),C(5,Si,1,2,"ng-template",null,4,je)),o&2){let e=ae(6);_();let n=x(0),i=_().$implicit,a=x(2),c=x(3);p("options",n)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),p("for",c),l(),B(" ",a," "),l(),f(i.formView.longDescription?3:-1),l(),p("id",c)("formControlName",i.formView.name)}}function Di(o,t){o&1&&F(0,"spk-progress-bar",60)}function hi(o,t){if(o&1&&(We(0),C(1,Ei,7,9)(2,Di,1,0,"spk-progress-bar",60)),o&2){let e=_().$implicit,n=Ee(e.formView.loadOptions?e.formView.loadOptions(_(2).injector)():e.formView.options);l(),f(n?1:2)}}function Ai(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Pi(o,t){if(o&1&&(s(0,"app-size",44)(1,"label",47),d(2),C(3,Ai,2,1,"spk-icon",48),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.Name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function yi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ni(o,t){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),C(3,yi,2,1,"spk-icon",48),r(),F(4,"input",62),s(5,"spk-icon",52),d(6,"numpad"),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Oi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function ki(o,t){if(o&1&&(s(0,"spk-toggle",45)(1,"label",47),d(2),C(3,Oi,2,1,"spk-icon",48),r(),F(4,"input",63),r()),o&2){let e=_().$implicit,n=x(2),i=x(3);l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1),l(),p("id",i)("formControlName",e.formView.name)}}function Mi(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function xi(o,t){if(o&1&&d(0),o&2){let e=t.$implicit;B(" ",e," ")}}function wi(o,t){if(o&1&&(s(0,"spk-select",64)(1,"label",47),d(2),C(3,Mi,2,1,"spk-icon",48),r(),F(4,"input",65),r(),C(5,xi,1,1,"ng-template",null,4,je)),o&2){let e=ae(6),n=_().$implicit,i=x(2);p("options",n.formView.options)("selectMultiple",!0)("optionTemplate",e),l(),It("for","destination-",n.formGroupName,"-",n.index,""),l(),B(" ",i," "),l(),f(n.formView.longDescription?3:-1),l(),p("formControlName",n.formView.name)}}function $i(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function Ri(o,t){if(o&1&&(s(0,"app-timespan",44)(1,"label",47),d(2),C(3,$i,2,1,"spk-icon",48),r()()),o&2){let e=_().$implicit,n=x(2),i=x(3);p("inputType",e.formView.name)("formControlName",e.formView.name)("customId",i),l(),p("for",i),l(),B(" ",n," "),l(),f(e.formView.longDescription?3:-1)}}function Ii(o,t){if(o&1&&(s(0,"spk-icon",48),d(1,"question"),r()),o&2){let e=_(2).$implicit;p("spkTooltip",e.formView.longDescription)}}function vi(o,t){if(o&1&&(s(0,"app-file-drop-textarea",46)(1,"label"),d(2),C(3,Ii,2,1,"spk-icon",48),r()()),o&2){let e,n=_().$implicit,i=x(3);p("formControlName",n.formView.name)("customId",i)("placeholder",n.formView.longDescription),l(2),B(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),l(),f(n.formView.longDescription?3:-1)}}function Li(o,t){if(o&1){let e=$();s(0,"button",66),T("click",function(){u(e);let i=_().$implicit,a=_(2);return m(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function bi(o,t){if(o&1&&(s(0,"div",40),z(1,41),We(2)(3),C(4,Jn,5,11,"app-file-tree",42)(5,ti,5,7,"app-file-tree",43)(6,ri,12,9,"spk-form-field")(7,di,9,8,"spk-form-field")(8,fi,2,2)(9,hi,3,2)(10,Pi,4,6,"app-size",44)(11,Ni,7,5,"spk-form-field")(12,ki,5,5,"spk-toggle",45)(13,wi,7,9)(14,Ri,4,6,"app-timespan",44)(15,vi,4,5,"app-file-drop-textarea",46),X(),C(16,Li,3,0,"button",31),r()),o&2){let e,n=t.$implicit;ue("single-field",n.formGroupName!=="advanced"),l(),p("formGroupName",n.formGroupName),l(),Ee((e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name),l(),Ee("destination-"+n.formGroupName+"-"+n.index+"-"+(n.asHttpOptions?"http":"other")),l(),f(n.formView.type==="FileTree"?4:n.formView.type==="FolderTree"?5:n.formView.type==="String"||n.formView.type==="Path"||n.formView.type==="Email"?6:n.formView.type==="Password"?7:n.formView.type==="Enumeration"?8:n.formView.type==="NonValidatedSelectableString"?9:n.formView.type==="Size"?10:n.formView.type==="Integer"?11:n.formView.type==="Boolean"?12:n.formView.type==="Flags"?13:n.formView.type==="Timespan"||n.formView.type==="DateTime"?14:n.formView.type==="FreeText"?15:-1),l(12),f(n.formGroupName==="advanced"?16:-1)}}function Gi(o,t){if(o&1&&(z(0,21)(1,35),ie(2,Wn,1,9,"ng-container",null,ne),ie(4,jn,1,9,"ng-container",null,ne),s(6,"app-toggle-card",36),z(7,37),E(8,10),s(9,"spk-menu",30)(10,"button",38),F(11,"spk-icon"),r(),z(12,19),ie(13,qn,3,1,"button",32,ne),X(),r(),D(),X(),ie(15,Yn,1,9,"ng-container",null,ne),r(),C(17,bi,17,7,"ng-template",null,2,je),X()()),o&2){let e=_();l(2),oe(e.destinationFormPair().custom),l(2),oe(e.destinationFormPair().dynamic),l(2),p("disallowToggle",!0),l(3),p("searchable",!0),l(),p("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),oe(e.notSelectedAdvancedFormPair()),l(2),oe(e.selectedAdvancedFormPair())}}function Ui(o,t){if(o&1){let e=$();s(0,"spk-dialog",67),G("isOpenChange",function(i){u(e);let a=_();return b(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),m(i)}),s(1,"header",68)(2,"h2"),N(3,11),r(),s(4,"spk-alert",69),N(5,12),r()(),s(6,"div",70)(7,"spk-form-field"),F(8,"textarea",71),r()(),s(9,"footer",72)(10,"button",23),T("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",73),T("click",function(){u(e);let i=_();return m(i.closeTargetUrlDialog(!0))}),E(13,13),F(14,"spk-icon"),D(),r()()()}if(o&2){let e=_();L("isOpen",e.targetUrlDialogOpen),p("options",He(3,Ln)),l(8),p("formControl",e.targetUrlCtrl)}}var gt=new Ce,Jt=(o={destinations:[]})=>gt.group({destinations:gt.array(o.destinations)}),en=({key:o,customGroup:t,dynamicGroup:e,advancedGroup:n})=>gt.group({destinationType:gt.control(o),custom:t,dynamic:e,advanced:n}),Nt=class o{#n=A(re);#t=A(me);#e=A(ce);#i=A(we);#o=A(ut);injector=A(xt);formRef=ye.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=w(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=S(!1);testLoading=S(!1);destinationTypeOptionsInFocus=S(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=S(_t.map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));destinationTypeOptionsFocused=w(()=>{let t=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return t.map(n=>e.find(i=>i.key===n))});selectedDestinationType=w(()=>{let t=this.destinationFormSignal();return this.destinationTypeOptions().find(n=>t?.destinations?.[0]?.destinationType===n.key)});destinationTypeOptionsNotFocused=w(()=>{let t=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(n=>!t.includes(n.key))});getFormFieldValue(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n].value}hasDoubleLeadingSlashes(t){return t.startsWith("//")}getFormControl(t,e,n){return((this.destinationForm.controls.destinations.controls?.[t]).controls?.[e]).controls[n]}addDestinationFormGroup(t){this.#e.addDestinationFormGroup(t)}addAdvancedFormPair(t,e){this.#e.addAdvancedFormPair(t,e)}removeFormView(t,e){this.#e.removeAdvancedFormPair(t,e)}targetUrl=w(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new rt;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(t=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!t||e===n||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(t=0){let n=this.#e.getCurrentTargetUrl()[t];n&&(this.testLoading.set(!0),this.#o.testDestination(n,t,!0).pipe(Xe(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(Q,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}}):i.anyFilesFound===!0&&this.#i.open(Q,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addOrUpdateAdvancedFormPairByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(t){return ct(t.value)}removeDestinationFormGroup(t){this.destinationForm.controls.destinations.removeAt(t)}displayFn(t){let e=this.destinationOptions().find(n=>n.Key===t);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=S(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=S(!1);#s=S(null);keyCreation(){}oauthStartTokenCreation(t,e){let n=this.getFormControl(e.index,e.formGroupName,e.formView.name),i=t=="pcloud"?this.#e.oauthServiceLinkNew:this.#e.oauthServiceLink;this.#r.set(!0);let a=this.#a(),c=450,h=600,y=i+"?type="+t+"&token="+a,I=screen.width/2-c/2,R=screen.height/2-h/2,V=window.open(y,"_blank","height="+h+",width="+c+",menubar=0,status=0,titlebar=0,toolbar=0,left="+I+",top="+R);return window.addEventListener("message",O=>{let U=O.data.startsWith("authid:"),W=U?O.data.replace("authid:",""):null;U&&(n.setValue(W),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Z({type:o,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Oe(n.formRef,$n,5),e&2&&ke()},decls:24,vars:6,consts:()=>{let t;t=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,t=Ne(t);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let n;n=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let a;a=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Ne(c);let h;h=$localize`Edit target URL`;let y;y=$localize` Be careful, this will overwrite everything you have in your destination. `;let I;return I=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],t,e,n,i,a,c,h,y,I,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"formControlName","customId","placeholder"],[3,"for"],[1,"primary",3,"spkTooltip"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let i=$();s(0,"form",14,0),T("submit",function(){return u(i),m(n.next())}),s(2,"header")(3,"h3",15),E(4,5),s(5,"div",16),C(6,Un,4,5,"button",17),s(7,"spk-menu")(8,"button",18),F(9,"spk-icon"),r(),z(10,19),s(11,"button",20),T("click",function(){return u(i),m(n.openTargetUrlDialog())}),F(12,"spk-icon"),r(),X(),r()(),D(),r(),C(13,Vn,5,1,"p"),r(),C(14,zn,9,1)(15,Gi,19,3,"ng-container",21),s(16,"div",22)(17,"button",23),T("click",function(){return u(i),m(n.goBack())}),E(18,6),F(19,"spk-icon"),D(),r(),s(20,"button",24),E(21,7),F(22,"spk-icon"),D(),r()()(),C(23,Ui,15,4,"spk-dialog",25)}if(e&2){let i;p("formGroup",n.destinationForm),l(6),f(n.destinationCount()>0?6:-1),l(7),f(n.destinationCount()>0?13:-1),l(),f(n.destinationCount()===0?14:-1),l(),f(!((i=n.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),f(n.targetUrlDialogOpen()?23:-1)}},dependencies:[Be,be,ee,Ge,Ie,te,Le,st,Ue,Ve,lt,zt,Ut,se,Bt,J,$e,Vt,nt,le,ot,it,jt,Ke,pt,dt,Ht],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{ut as a,Jt as b,en as c,Nt as d,qt as e,At as f,ht as g,he as h,Pt as i,Yt as j,yt as k,ce as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-A2ITER5E.js";import"./chunk-GQCUCL25.js";import"./chunk-74DADXEI.js";import"./chunk-LWIINXS7.js";import"./chunk-ABANCAM5.js";import"./chunk-H5MGVT7B.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|