@duplicati/ngclient 0.0.114 → 0.0.116
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-36ZCEF76.js +1 -0
- package/chunk-3KPWJPKG.js +1 -0
- package/{chunk-3W6M5IZL.js → chunk-45NW2WR4.js} +1 -1
- package/chunk-7L2WUS2V.js +1 -0
- package/{chunk-PPP3I2ZR.js → chunk-7LOECBLM.js} +1 -1
- package/chunk-7RELJ5CQ.js +1 -0
- package/{chunk-5G5PH7FG.js → chunk-B26K7HTR.js} +1 -1
- package/{chunk-7L42EO7J.js → chunk-BIZAKOYU.js} +1 -1
- package/{chunk-F4EEOSGJ.js → chunk-BJGA55H2.js} +1 -1
- package/chunk-BYSLHWG6.js +1 -0
- package/chunk-C6XTRC7P.js +1 -0
- package/{chunk-ULHQZGHN.js → chunk-CK7BEV2X.js} +1 -1
- package/{chunk-HXP5ZXIT.js → chunk-CRR7DNOY.js} +1 -1
- package/chunk-CVYWOUO3.js +1 -0
- package/chunk-DJYSOUD7.js +3 -0
- package/chunk-DL56XS75.js +1 -0
- package/chunk-DMI4A75F.js +1 -0
- package/{chunk-EF7JWRDC.js → chunk-DOP6RFEG.js} +1 -1
- package/{chunk-T2OUHRUV.js → chunk-ELMONRIG.js} +1 -1
- package/{chunk-KSP3JQHY.js → chunk-EQWH3TBL.js} +1 -1
- package/chunk-ETELPN3O.js +1 -0
- package/{chunk-GJROCOAD.js → chunk-F2GEUOGZ.js} +1 -1
- package/{chunk-OTLEEXAA.js → chunk-FJVMA6GA.js} +1 -1
- package/{chunk-EKIPEIC4.js → chunk-FPFUN6JC.js} +2 -2
- package/chunk-G3SK7TBB.js +1 -0
- package/chunk-GM4QKN65.js +1 -0
- package/chunk-GVTMU7Q2.js +1 -0
- package/chunk-GWH2WEBY.js +1 -0
- package/chunk-GZDT4MSC.js +1 -0
- package/chunk-HFIC4JNY.js +1 -0
- package/chunk-HTJ5CVNN.js +1 -0
- package/chunk-I7KXABQT.js +1 -0
- package/chunk-IINSQSHJ.js +1 -0
- package/{chunk-NHQOHNI2.js → chunk-IK7CPFZB.js} +1 -1
- package/{chunk-W6OH3HBG.js → chunk-JDSUBKXI.js} +1 -1
- package/chunk-JFNFY6VY.js +1 -0
- package/chunk-JOIFJV7F.js +1 -0
- package/chunk-JSZOZDJQ.js +1 -0
- package/chunk-JUVUG5N3.js +1 -0
- package/chunk-JYXXSXNP.js +8 -0
- package/chunk-L2M4ZKII.js +1 -0
- package/chunk-L72ALLHJ.js +7 -0
- package/chunk-M5CGJUYP.js +1 -0
- package/chunk-MAVZY7BL.js +1 -0
- package/chunk-MQJUTAQD.js +1 -0
- package/chunk-MZ677J6Y.js +1 -0
- package/chunk-NF45E5CN.js +1 -0
- package/chunk-O4S6BJVY.js +1 -0
- package/chunk-P4ZFQZCA.js +1 -0
- package/{chunk-CD3DB23J.js → chunk-P7IBR2UW.js} +1 -1
- package/chunk-PH5P3W5Z.js +1 -0
- package/{chunk-Z2NFEFOH.js → chunk-PUEJXHBQ.js} +1 -1
- package/{chunk-KIGBGT77.js → chunk-Q52UOSQY.js} +1 -1
- package/{chunk-XJXOUOD5.js → chunk-R3PVYKQS.js} +1 -1
- package/{chunk-R6GGQ2GT.js → chunk-RG2UOHQD.js} +1 -1
- package/chunk-RI2SWQGS.js +1 -0
- package/chunk-RNSVPE4U.js +1 -0
- package/chunk-S24RG6QP.js +2 -0
- package/{chunk-JSGFZ2GA.js → chunk-S5EF63OY.js} +1 -1
- package/{chunk-JLDOA36R.js → chunk-S5FFZRTF.js} +1 -1
- package/chunk-SFSNPREM.js +1 -0
- package/chunk-SOXAVKMK.js +1 -0
- package/chunk-T6SML6VO.js +1 -0
- package/{chunk-E2UB3K6K.js → chunk-TCJ2X76T.js} +1 -1
- package/{chunk-HTNYQE2B.js → chunk-TQHNKGRL.js} +1 -1
- package/chunk-TRCPJYNH.js +1 -0
- package/{chunk-SPHWZHBB.js → chunk-U467ZTQ4.js} +1 -1
- package/{chunk-UTVV2FB5.js → chunk-UWRVKCWT.js} +3 -3
- package/chunk-W2YH5ADR.js +1 -0
- package/{chunk-7WFWZORV.js → chunk-WA5HD4WO.js} +1 -1
- package/chunk-XP7PWMT2.js +1 -0
- package/{chunk-Q2HZC6ZI.js → chunk-XVGPU3ZE.js} +1 -1
- package/chunk-XWHL2DXG.js +1 -0
- package/{chunk-6HTVIY6O.js → chunk-XYMSYNUD.js} +1 -1
- package/chunk-Y6ZPPRT6.js +1 -0
- package/chunk-Y7K42OXA.js +1 -0
- package/{chunk-PQVEQNEN.js → chunk-YCAQITZE.js} +1 -1
- package/chunk-Z2ISC3PW.js +1 -0
- package/chunk-ZGKHK6QQ.js +2 -0
- package/chunk-ZIR6PET2.js +1 -0
- package/index.html +2 -2
- package/main-7GKFJWB5.js +1 -0
- package/package.json +1 -1
- package/{styles-UL5PH77J.css → styles-NHBDA2ZX.css} +1 -1
- package/chunk-37GXHTIP.js +0 -1
- package/chunk-3IIFLG6J.js +0 -1
- package/chunk-554T66WI.js +0 -1
- package/chunk-66Q4TXVX.js +0 -1
- package/chunk-6FFPXENZ.js +0 -1
- package/chunk-7LU4D3GR.js +0 -1
- package/chunk-CETM57LL.js +0 -1
- package/chunk-CFVPLY5R.js +0 -1
- package/chunk-CKPICCFH.js +0 -1
- package/chunk-CPPV6EJP.js +0 -1
- package/chunk-CTGMG44P.js +0 -1
- package/chunk-DDMQ6BLY.js +0 -1
- package/chunk-EXJKKQZX.js +0 -1
- package/chunk-F7HHSM2V.js +0 -1
- package/chunk-FKJJQJD5.js +0 -1
- package/chunk-HVT5TILQ.js +0 -1
- package/chunk-I3C2AEHI.js +0 -1
- package/chunk-IEH3LYA4.js +0 -3
- package/chunk-JES5INM4.js +0 -1
- package/chunk-L76NC2T6.js +0 -1
- package/chunk-LVUQRMAC.js +0 -1
- package/chunk-N3L3HC4J.js +0 -1
- package/chunk-NDU4DSOM.js +0 -1
- package/chunk-NE2V7X4C.js +0 -2
- package/chunk-NMXJMVL5.js +0 -1
- package/chunk-O2YN63YI.js +0 -1
- package/chunk-PAS4EMZF.js +0 -1
- package/chunk-PFWSXI4B.js +0 -1
- package/chunk-QBFBFWG2.js +0 -1
- package/chunk-QDH6LNFG.js +0 -1
- package/chunk-QVIZK4WW.js +0 -1
- package/chunk-R7CDA4HX.js +0 -1
- package/chunk-RCU74ULS.js +0 -1
- package/chunk-RGVPD4PJ.js +0 -1
- package/chunk-RJ4U6XAH.js +0 -1
- package/chunk-RN7NMYKV.js +0 -8
- package/chunk-RZN7GZTZ.js +0 -1
- package/chunk-S3S677ZR.js +0 -1
- package/chunk-S47LQILW.js +0 -1
- package/chunk-SEA4YEEO.js +0 -1
- package/chunk-TZUFH3TN.js +0 -1
- package/chunk-V3LXB3BU.js +0 -1
- package/chunk-VSSZRSCG.js +0 -2
- package/chunk-W2F756OF.js +0 -7
- package/chunk-WMTA6PZM.js +0 -1
- package/chunk-ZCC3C2X4.js +0 -1
- package/main-EVBG63XG.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
2
|
-
`),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),R(2,Q,13,5,"div",2,P),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),f("click",function(){return d(o),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),x(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[
|
|
1
|
+
import{a as K}from"./chunk-TQHNKGRL.js";import{a as X,d as z,g as J}from"./chunk-P4ZFQZCA.js";import{h as q}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Ab as P,Bb as R,Cb as x,Db as i,Eb as a,Fb as g,Jb as u,Pb as A,Pc as W,Qb as D,Ra as E,Rb as y,Ua as l,Vb as f,Wb as S,Z as v,Zb as w,ea as d,fa as _,gb as h,ic as c,jc as C,kc as I,lb as k,lc as N,nc as $,oc as B,pc as V,qc as U,r as T,ub as F,uc as G,va as m,zb as M}from"./chunk-L72ALLHJ.js";import{a as b,b as O}from"./chunk-7CGTOI24.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=S().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),f("click",function(){let o=d(e).$implicit,r=S();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),M(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(q);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
|
|
2
|
+
`),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),R(2,Q,13,5,"div",2,P),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),f("click",function(){return d(o),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),x(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[X,J,z],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-UWRVKCWT.js")},{path:"encryption",loadComponent:()=>import("./chunk-DL56XS75.js")},{path:"select-files",loadComponent:()=>import("./chunk-Y7K42OXA.js")},{path:"options",loadComponent:()=>import("./chunk-M5CGJUYP.js")},{path:"progress",loadComponent:()=>import("./chunk-GWH2WEBY.js")}],t=o;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as se}from"./chunk-PH5P3W5Z.js";import{c as re,e as _e,h as pe,j as ce,s as I}from"./chunk-ELMONRIG.js";import{a as J}from"./chunk-BJGA55H2.js";import{a as Q,b as Y,e as ee,g as te,i as R,l as ne,p as ie,q as oe,s as ae,t as le}from"./chunk-P4ZFQZCA.js";import{h}from"./chunk-S5EF63OY.js";import{a as ue}from"./chunk-JFNFY6VY.js";import{pa as Z}from"./chunk-7L2WUS2V.js";import{Ab as z,Ac as j,Bb as X,Cb as H,Db as a,Eb as l,F as N,Fb as E,Jb as K,Oc as q,Pb as O,Qb as f,Rb as c,Ua as r,Ub as W,Vb as _,Wb as C,Z as S,ea as $,fa as x,gb as g,ic as u,kc as k,lb as y,lc as B,nc as A,oc as P,pc as M,ra as F,ub as m,va as p,vb as w,wb as d,yc as U,zb as v,zc as V}from"./chunk-L72ALLHJ.js";function Oe(s,n){if(s&1){let t=K();a(0,"spk-radio",10),_("click",function(){let i=$(t).$implicit,o=C();return x(o.pauseOption.set(i.value))}),u(1),l()}if(s&2){let t=n.$implicit,e=C();d("active",e.pauseOption()===t.value),r(),k(" ",t.label," ")}}var fe=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],b=class s{#e=S(h);pauseOptions=p(fe);closed=F();isSubmitting=p(!1);pauseTransfers=p(!1);pauseOption=p(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,t,e,i,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",5)(1,"h3"),c(2,0),l()(),a(3,"div",6)(4,"div",7),X(5,Oe,2,3,"spk-radio",8,z),l(),a(7,"div",9)(8,"spk-checkbox",10),_("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),c(9,1),l(),a(10,"spk-alert",11),c(11,2),l()()(),a(12,"footer",12)(13,"button",13),_("click",function(){return e.closed.emit()}),c(14,3),l(),a(15,"button",14),_("click",function(){return e.submit()}),c(16,4),l()()),t&2&&(r(5),H(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[I,oe,R,Y],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Ae=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],L={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},me=Object.entries(L).reduce((s,[n,t])=>(s[t]=n,s),{}),D=class s{#e=S(h);closed=F();isSubmitting=p(!1);sizeOptions=p(Ae);maxUploadActive=p(!1);maxDownloadActive=p(!1);maxUpload=p(0);maxDownload=p(0);maxUploadUnit=p("MByte/s");maxDownloadUnit=p("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",o=e[1]??"",T=t[2]??"MB",ge=e[2]??"MB",Ce=i===""?10:parseInt(i),Ee=o===""?10:parseInt(o);this.maxUploadUnit.set(me[T]+"/s"),this.maxDownloadUnit.set(me[ge]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(o!==""),this.maxUpload.set(Ce),this.maxDownload.set(Ee)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${L[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${L[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(N(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:28,vars:16,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let e;e=$localize`Cancel`;let i;return i=$localize` Update settings `,[n,t,e,i,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(a(0,"header",4)(1,"h3"),c(2,0),l()(),a(3,"div",5)(4,"div",6)(5,"div",7)(6,"label"),u(7,"Max upload speed"),l(),a(8,"spk-checkbox",8),_("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),l(),a(9,"spk-form-field")(10,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),a(11,"spk-select",10)(12,"input",11),M("ngModelChange",function(o){return P(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),a(13,"div",7)(14,"label"),u(15,"Max download speed"),l(),a(16,"spk-checkbox",8),_("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),l(),a(17,"spk-form-field")(18,"input",9),_("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),M("ngModelChange",function(o){return P(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),a(19,"spk-select",10)(20,"input",11),M("ngModelChange",function(o){return P(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()(),a(21,"p"),c(22,1),l()()(),a(23,"footer",12)(24,"button",13),_("click",function(){return e.closed.emit(!1)}),c(25,2),l(),a(26,"button",14),_("click",function(){return e.submit()}),c(27,3),l()()),t&2&&(r(8),d("active",e.maxUploadActive()),r(2),A("ngModel",e.maxUpload),m("disabled",!e.maxUploadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxUploadUnit),r(4),d("active",e.maxDownloadActive()),r(2),A("ngModel",e.maxDownload),m("disabled",!e.maxDownloadActive()),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),A("ngModel",e.maxDownloadUnit),r(6),d("loader",e.isSubmitting()))},dependencies:[I,re,ce,_e,pe,ne,R,le],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label label" "checkbox input select";grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Pe(s,n){if(s&1&&(a(0,"div"),u(1),l(),E(2,"spk-progress-bar",9)),s&2){let t=C();r(),B("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),m("value",t.statusData().progress*100)}}function Me(s,n){if(s&1&&(a(0,"div",5),u(1),a(2,"spk-icon"),u(3,"clock"),l(),u(4),U(5,"relativeTime"),U(6,"date"),l()),s&2){let t,e=C();r(),k(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - "),r(3),B(" ",V(5,3,e.nextBackup().time)," at ",j(6,5,e.nextBackup().time,"shortTime")," ")}}function De(s,n){s&1&&(a(0,"div",5),c(1,1),l())}function Ne(s,n){s&1&&(a(0,"div",6),O(1,2),E(2,"spk-spinner"),f(),l()),s&2&&(r(2),w("--spinner-size","12px")("--spinner-thickness","2px"))}function Fe(s,n){s&1&&(O(0,0,1),E(1,"spk-icon"),f())}function ke(s,n){s&1&&(O(0,0,2),E(1,"spk-icon"),f())}var Te=new Date,G=class s{#e=S(se);#t=S(ee);#n=S(J);minsAgo=Te.setMinutes(Te.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;nextBackup=q(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#t.open(D,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#t.open(b,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}ngAfterViewInit(){let n=this.#n.relayIsEnabled()?"longpoll":"websocket";this.#e.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=g({type:s,selectors:[["app-status-bar"]],decls:14,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=W(n);let t;t=$localize`No scheduled tasks`;let e;return e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`,[n,t,e,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(a(0,"div",3)(1,"div",4),y(2,Pe,3,3)(3,Me,7,8,"div",5)(4,De,2,0,"div",5)(5,Ne,3,4,"div",6),l(),a(6,"div",7)(7,"button",8),_("click",function(){return e.pauseResume()}),O(8,0),y(9,Fe,2,0)(10,ke,2,0),f(),l(),a(11,"button",8),_("click",function(){return e.openThrottleSettingsDialog()}),a(12,"spk-icon"),u(13,"speedometer"),l()()()()),t&2){let i;r(2),v((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),d("loader",e.isResuming()),r(2),v(e.clientIsRunning()?9:10)}},dependencies:[ie,ue,Z,Q,te,ae],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{G as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-S5FFZRTF.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-S24RG6QP.js")},{path:"live",loadComponent:()=>import("./chunk-NF45E5CN.js")}]}],t=o;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as K}from"./chunk-Y6ZPPRT6.js";import{a as H}from"./chunk-ZGKHK6QQ.js";import"./chunk-P7IBR2UW.js";import"./chunk-HTJ5CVNN.js";import"./chunk-U467ZTQ4.js";import"./chunk-TQHNKGRL.js";import"./chunk-F2GEUOGZ.js";import{a as j}from"./chunk-JDSUBKXI.js";import"./chunk-CRR7DNOY.js";import{a as B}from"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import{a as z}from"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as b,h as w,p as W,s as X}from"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import{ua as v}from"./chunk-7L2WUS2V.js";import{Db as i,Eb as s,Fb as p,Gb as m,Hb as P,Oc as M,Pb as L,Pc as I,Qb as A,Rb as _,Sb as D,Tb as x,Ua as l,Wb as u,Z as T,ga as $,gb as y,ha as G,ic as C,lb as g,lc as f,ub as O,va as h,yc as R,zb as d,zc as E}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function V(n,e){n&1&&(i(0,"spk-card",8),m(1,14),_(2,2),P(),i(3,"div",15),$(),i(4,"svg",16),p(5,"circle",17),s(),G(),i(6,"spk-icon"),C(7,"check-bold"),s()()())}function Z(n,e){if(n&1&&(C(0),R(1,"number"),R(2,"number")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileCount)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileCount)," ")}}function q(n,e){n&1&&(m(0),_(1,6),P())}function J(n,e){if(n&1&&(C(0),R(1,"bytes"),R(2,"bytes")),n&2){let t,o=u(2);f(" ",E(1,2,(t=o.statusData())==null?null:t.ProcessedFileSize)," of ",E(2,4,(t=o.statusData())==null?null:t.TotalFileSize)," ")}}function Q(n,e){n&1&&(m(0),_(1,7),P())}function U(n,e){if(n&1&&(i(0,"spk-card",8)(1,"h3"),L(2,3),p(3,"spk-spinner",18),A(),s(),i(4,"div",19),p(5,"spk-progress-bar",20),i(6,"p")(7,"span"),_(8,4),s(),g(9,Z,3,6)(10,q,2,0,"ng-container"),s(),i(11,"p")(12,"span"),_(13,5),s(),g(14,J,3,6)(15,Q,2,0,"ng-container"),s()()()),n&2){let t,o,r,a,c=u();l(3),D((t=c.statusData())==null?null:t.statusText),x(2),l(2),O("value",(o=c.statusData())==null?null:o.OverallProgress),l(4),d((r=c.statusData())!=null&&r.ProcessedFileCount?9:10),l(5),d((a=c.statusData())!=null&&a.ProcessedFileSize?14:15)}}var F=class n{#e=T(B);#t=T(K);statusData=this.#e.statusData;backupId=this.#t.backupId;isPolling=h(!0);taskId=M(()=>this.#e.statusData()?.TaskID?.toString()??void 0);lastRestoreStarted=M(()=>{let e=this.#e.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;return e?this.fixDate(e):null});completedEffect=I(()=>{this.statusData()?.task?.Status==="Completed"&&this.isPolling.set(!1)});notificationFilterPredicate=()=>{let e=this.lastRestoreStarted();return{predicate:t=>(t.BackupID===this.#t.backupId()&&e&&e.getTime()<=new Date(t.Timestamp).getTime())??!1}};ngOnInit(){this.#e.fetchProgressState(),this.#e.startPollingProgress()}fixDate(e){return new Date(`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}Z`)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let e;e=$localize`Notifications`;let t;t=$localize`Logs`;let o;o=$localize`Restore completed`;let r;r=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let a;a=$localize`Files processed:`;let c;c=$localize`Size processed:`;let N;N=$localize`N/A`;let k;return k=$localize`N/A`,[e,t,o,r,a,c,N,k,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-check"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(t,o){if(t&1&&(i(0,"section"),g(1,V,8,0,"spk-card",8)(2,U,16,4,"spk-card",8),i(3,"spk-card",9)(4,"h3"),_(5,0),s(),i(6,"div",10),p(7,"app-notifications",11),s()(),i(8,"spk-card",12)(9,"h3"),_(10,1),s(),p(11,"app-logs-live",13),s()()),t&2){let r,a;l(),d(((r=o.statusData())==null||r.task==null?null:r.task.Status)==="Completed"?1:2),l(6),O("notificationFilterPredicate",o.notificationFilterPredicate()),l(4),O("asSimpleList",!0)("polling",o.isPolling())("whenFilter",(a=o.lastRestoreStarted())==null?null:a.getTime())("backupIdFilter",o.backupId())}},dependencies:[H,W,X,b,w,j,z,v],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] spk-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-check[_ngcontent-%COMP%]{position:relative;width:100px;height:100px;display:flex;justify-content:center;align-items:center;color:var(--success-500)}.complete-check[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-500);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}'],changeDetection:0})};export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as M}from"./chunk-GM4QKN65.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{c as O,e as C,f as S}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{y as d}from"./chunk-P4ZFQZCA.js";import"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Db as e,Eb as t,Fb as l,Rb as n,gb as c}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";var s=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=c({type:a,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let u;u=$localize`System info`;let T;T=$localize`Server settings`;let g;g=$localize`Logs`;let A;return A=$localize`Crash log`,[_,o,r,u,T,g,A,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(l(0,"app-status-bar"),e(1,"div",7)(2,"spk-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),l(18,"router-outlet"),t()())},dependencies:[M,d,O,C,S],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 2rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ua as m}from"./chunk-7L2WUS2V.js";import{Z as s,jb as p}from"./chunk-L72ALLHJ.js";var f=class a{decimalPipe=s(m);transform(t,e=!1){if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let r=this.#t(),n=r?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(r?1e3:1024));i=Math.min(i,n.length-1);let l=t/Math.pow(r?1e3:1024,i),o=this.decimalPipe.transform(l,"1.0-2");return o?`${o} ${e?n[i]:n[i].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(r=>e.includes(r)):!1}static \u0275fac=function(e){return new(e||a)};static \u0275pipe=p({name:"bytes",type:a,pure:!0})};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as be}from"./chunk-F2GEUOGZ.js";import{s as xe}from"./chunk-ELMONRIG.js";import{A as ve,a as ge,f as me,l as Ce,n as Pe,p as Ee}from"./chunk-P4ZFQZCA.js";import{h as Te}from"./chunk-S5EF63OY.js";import{ia as fe}from"./chunk-7L2WUS2V.js";import{$a as K,B as ne,Bb as re,Bc as _e,Cb as oe,Db as h,Eb as f,F as q,Fb as le,Ib as z,Jb as B,Oc as W,Pc as A,Rb as $,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,fc as J,gb as ie,gc as pe,hc as Y,ic as S,kc as ue,lb as M,n as ee,r as L,ra as Q,sa as v,ub as U,va as O,vb as se,vc as V,wb as T,wc as he,x as te,zb as F}from"./chunk-L72ALLHJ.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&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(s&2){let e=u();m(),T("active",e.pathDiscoveryMethod()==="browse"),m(2),T("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&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(s,t){if(s&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(s&2){let e=u().$implicit,n=u().$implicit,i=u();T("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),T("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(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&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(s&2){let e=u();T("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 s{#e=X(Te);#t=X(be);multiSelect=v(!1);disabled=v(!1);showFiles=v(!1);selectFiles=v(!1);accepts=v(null);startingPath=v(null);rootPaths=v([]);backupSettings=v(null);pathRefreshTrigger=v(!1);showHiddenNodes=v(!1);hideShortcuts=v(!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(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].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(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.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=r;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),w={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&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],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=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,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(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.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("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!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||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("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` Browser 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,"spk-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(),T("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),T("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(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[me,ve,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-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);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-level-30);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-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.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-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-HFIC4JNY.js";import"./chunk-7L2WUS2V.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as BytesPipe};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,c as A}from"./chunk-BJGA55H2.js";import{e as d}from"./chunk-P4ZFQZCA.js";import{h as k}from"./chunk-S5EF63OY.js";import{ua as M}from"./chunk-7L2WUS2V.js";import{Ac as y,Db as m,Eb as f,Fb as _,O as C,Oc as g,Pb as v,Pc as b,Qb as E,Rb as N,Sb as I,T as c,Tb as F,Ua as T,Z as s,gb as O,i as S,va as n,yc as w}from"./chunk-L72ALLHJ.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xe}from"./chunk-
|
|
1
|
+
import{a as xe}from"./chunk-TQHNKGRL.js";import{c as ke}from"./chunk-MAVZY7BL.js";import{h as be}from"./chunk-S5EF63OY.js";import"./chunk-7L2WUS2V.js";import{Db as pe,Eb as ue,Fb as ge,Qa as oe,Rb as fe,Ua as ae,W as le,Z as q,gb as ce,r as ie,tc as de,ub as he}from"./chunk-L72ALLHJ.js";import{a as m,b as z}from"./chunk-7CGTOI24.js";function F(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=F();function $e(a){R=a}var E={exec:()=>null};function g(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(x.caret,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),U=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ze=/^[^\n]+/,X=/(?!\s*\])(?:\\.|[^\[\]\\])+/,He=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce=g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Qe=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ce).getRegex(),V={blockquote:Qe,code:De,def:He,fences:Oe,heading:Ne,hr:v,html:Fe,lheading:ze,list:je,newline:Me,paragraph:Ce,table:E,text:Ze},me=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ue=z(m({},V),{lheading:Ge,table:me,paragraph:g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()}),Xe=z(m({},V),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(U).replace("hr",v).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),We=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ve=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,Je=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,J=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Ke=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,J).getRegex(),Pe=/(?!~)[\p{P}\p{S}]/u,Ye=/(?!~)[\s\p{P}\p{S}]/u,et=/(?:[^\s\p{P}\p{S}]|~)/u,tt=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Le=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nt=g(Le,"u").replace(/punct/g,N).getRegex(),st=g(Le,"u").replace(/punct/g,Pe).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rt=g(Ie,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),it=g(Ie,"gu").replace(/notPunctSpace/g,et).replace(/punctSpace/g,Ye).replace(/punct/g,Pe).getRegex(),lt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),ot=g(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),at=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=g(W).replace("(?:-->|$)","-->").getRegex(),ht=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pt=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ee=g(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",X).getRegex(),Be=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",X).getRegex(),ut=g("reflink|nolink(?!\\()","g").replace("reflink",Ee).replace("nolink",Be).getRegex(),K={_backpedal:E,anyPunctuation:ot,autolink:at,blockSkip:tt,br:_e,code:Ve,del:E,emStrongLDelim:nt,emStrongRDelimAst:rt,emStrongRDelimUnd:lt,escape:We,link:pt,nolink:Be,punctuation:Ke,reflink:Ee,reflinkSearch:ut,tag:ht,text:Je,url:E},gt=z(m({},K),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()}),H=z(m({},K),{emStrongRDelimAst:it,emStrongLDelim:st,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ft=z(m({},H),{br:g(_e).replace("{2,}","*").getRegex(),text:g(H.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),M={normal:V,gfm:Ue,pedantic:Xe},L={normal:K,gfm:H,breaks:ft,pedantic:gt},dt={"&":"&","<":"<",">":">",'"':""","'":"'"},we=a=>dt[a];function T(a,e){if(e){if(x.escapeTest.test(a))return a.replace(x.escapeReplace,we)}else if(x.escapeTestNoEncode.test(a))return a.replace(x.escapeReplaceNoEncode,we);return a}function ye(a){try{a=encodeURI(a).replace(x.percentDecode,"%")}catch{return null}return a}function Se(a,e){let t=a.replace(x.findPipe,(i,r,l)=>{let o=!1,c=r;for(;--c>=0&&l[c]==="\\";)o=!o;return o?"|":" |"}),n=t.split(x.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(x.slashPipe,"|");return n}function I(a,e,t){let n=a.length;if(n===0)return"";let s=0;for(;s<n&&a.charAt(n-s-1)===e;)s++;return a.slice(0,n-s)}function kt(a,e){if(a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]==="\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return-1}function Te(a,e,t,n,s){let i=e.href,r=e.title||null,l=a[1].replace(s.other.outputLinkReplace,"$1");if(a[0].charAt(0)!=="!"){n.state.inLink=!0;let o={type:"link",raw:t,href:i,title:r,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,o}return{type:"image",raw:t,href:i,title:r,text:l}}function bt(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
|
|
3
3
|
`).map(i=>{let r=i.match(t.other.beginningSpace);if(r===null)return i;let[l]=r;return l.length>=s.length?i.slice(s.length):i}).join(`
|
|
4
4
|
`)}var _=class{options;rules;lexer;constructor(e){this.options=e||R}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:I(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-CRR7DNOY.js";import{a as K}from"./chunk-BIZAKOYU.js";import{b as V,d as z}from"./chunk-C6XTRC7P.js";import{b as G,c as X,e as B,p as U}from"./chunk-P4ZFQZCA.js";import{h as H}from"./chunk-S5EF63OY.js";import{Bb as P,Cb as h,Db as l,Eb as _,Fb as O,Gb as b,Hb as R,Jb as T,Oc as D,Pb as v,Qb as y,Ra as g,Rb as d,Ua as r,Vb as C,Wb as a,Z as f,ea as u,fa as N,gb as k,ic as m,jc as A,kc as L,lb as S,sa as $,ub as I,yb as w,zb as s}from"./chunk-L72ALLHJ.js";var Y=(i,t)=>t.ID;function q(i,t){if(i&1&&m(0),i&2){let e=a().$implicit;L(" ",e.Message," ")}}function J(i,t){if(i&1&&(l(0,"div"),v(1,1),O(2,"a",16),y(),_()),i&2){let e=a().$implicit;r(2),I("href",e.DownloadLink,g)}}function Q(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doRepair(o.BackupID))}),d(1,2),_()}}function Z(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doDownloadBugreport(o))}),d(1,3),_()}}function ee(i,t){if(i&1&&O(0,"spk-progress-bar",18),i&2){let e,n=a(3);I("value",(e=n.serverState())==null?null:e.UpdateDownloadProgress)}}function te(i,t){if(i&1){let e=T();l(0,"div",14),b(1),d(2,4),R(),l(3,"a",17),m(4),_(),S(5,ee,1,1,"spk-progress-bar",18),l(6,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowUpdate())}),d(7,5),_()()}if(i&2){let e,n,o=a().$implicit,c=a();r(3),I("href",(e=c.serverState())==null?null:e.UpdateDownloadLink,g),r(),A(o.Message),r(),s(((n=c.serverState())==null?null:n.UpdaterState)==="Downloading"?5:-1)}}function ie(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a().$implicit,c=a();return N(c.doShowLog(o.BackupID))}),d(1,6),_()}}function ne(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),d(1,7),_()}}function oe(i,t){if(i&1){let e=T();l(0,"button",15),C("click",function(){u(e);let o=a(2);return N(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),d(1,8),_()}}function ae(i,t){if(i&1){let e=T();l(0,"spk-alert")(1,"div",10),m(2),_(),l(3,"div",11),S(4,q,1,1)(5,J,3,1,"div"),l(6,"div",12),S(7,Q,2,0,"button",13)(8,Z,2,0,"button",13)(9,te,8,3,"div",14)(10,ie,2,0,"button",13)(11,ne,2,0,"button",13)(12,oe,2,0,"button",13),l(13,"button",15),C("click",function(){let o=u(e).$index,c=a();return N(c.deleteNotificationByIndex(o))}),d(14,0),_()()()()}if(i&2){let e=t.$implicit,n=a();w(n.getAlertType(e.Type)),r(2),A(e.Title),r(2),s(e.Action!=="update:new"&&e.Action!=="update:manual"?4:-1),r(),s(e!=null&&e.DownloadLink?5:-1),r(2),s(e.Message!=null&&e.Message.includes("please run repair")?7:-1),r(),s(e.Action!=null&&e.Action.startsWith("bug-report:created:")&&!e.DownloadLink?8:-1),r(),s(e.Action==="update:new"?9:-1),r(),s(e.Action==="backup:show-log"?10:-1),r(),s(e.Action==="config:issue:unencrypted-database"?11:-1),r(),s(e.Action==="config:issue:windows-folder-used"?12:-1)}}var re={Error:"error",Warning:"warn",Information:"primary"},j=class i{#i=f(z);#o=f(V);#a=f(B);#e=f(X);#n=f(H);#t=f(W);notificationFilterPredicate=$();serverState=this.#t.serverState;notifications=D(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#t.notifications();return typeof t!="function"?e:e.filter(t)});deleteNotificationByIndex(t){this.#t.deleteNotification(t)}deleteAllNotifications(){this.#t.deleteAllNotifications()}getAlertType(t){return t&&re[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#i.navigate(["/backup/"+t+"/log"])},error:e=>{if(e.status===404){let n={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(n={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(K,{maxWidth:"550px",width:"100%",data:n})}else this.#e.error($localize`Failed to find backup: `+e.message)}})}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#e.success($localize`Backup repaired`),this.#i.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#o})},error:e=>{this.#e.error($localize`Failed to repair backup: `+e.message)}})}doShowUpdate(){this.#i.navigate(["/about/changelog"])}doShowLink(t){window.open(t,"_blank")}doDownloadBugreport(t){let e=t.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:`bugreport/${e}`}).subscribe({next:n=>{if(!n.Token){this.#e.error("Failed to get bug report URL: No token generated");return}t.DownloadLink=n.Token},error:n=>{this.#e.error(`Failed to get bug report URL: ${n.message}`)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:2,vars:0,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$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 n;n=$localize`Repair`;let o;o=$localize`Download`;let c;c=$localize`New update found:`;let F;F=$localize`Show Update`;let x;x=$localize`Show Log`;let E;E=$localize` Show Help `;let M;return M=$localize` Show Help `,[t,e,n,o,c,F,x,E,M,[3,"class"],["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(e,n){e&1&&P(0,ae,15,11,"spk-alert",9,Y),e&2&&h(n.notifications())},dependencies:[G,U],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}"],changeDetection:0})};export{j as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pa as o}from"./chunk-7L2WUS2V.js";import{a as s}from"./chunk-DOP6RFEG.js";import{Z as e,jb as n}from"./chunk-L72ALLHJ.js";var m=class i{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $}from"./chunk-GM4QKN65.js";import{a as R}from"./chunk-TQHNKGRL.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{b as A,e as N}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as k,g as B}from"./chunk-P4ZFQZCA.js";import{h as O}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import{Ab as f,Bb as S,Cb as g,Db as F,Eb as a,Fb as r,Oc as M,Pb as _,Qb as c,Rb as u,Ua as i,Ub as T,Vb as I,Z as m,gb as C,ic as E,kc as L,lb as p,va as l,zb as s}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(O);#e=m(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.js";import"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{a as RelativeTimePipe};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as z}from"./chunk-GM4QKN65.js";import"./chunk-PH5P3W5Z.js";import"./chunk-IINSQSHJ.js";import{a as X}from"./chunk-FJVMA6GA.js";import"./chunk-BIZAKOYU.js";import"./chunk-RHW5QVAY.js";import"./chunk-HFIC4JNY.js";import"./chunk-ELMONRIG.js";import"./chunk-BJGA55H2.js";import"./chunk-XP7PWMT2.js";import{e as E}from"./chunk-C6XTRC7P.js";import"./chunk-MAVZY7BL.js";import{a as R,g as f,h as k,k as L,p as G}from"./chunk-P4ZFQZCA.js";import{h as w}from"./chunk-S5EF63OY.js";import"./chunk-JFNFY6VY.js";import"./chunk-7L2WUS2V.js";import"./chunk-DOP6RFEG.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,ic as l,lb as m,lc as B,rb as M,sb as P,ub as u,uc as g,vc as v,zb as F}from"./chunk-L72ALLHJ.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",v(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,L,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-level-60)}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};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as Bt,b as Kt}from"./chunk-PUEJXHBQ.js";import{a as pt}from"./chunk-HTJ5CVNN.js";import{a as Ve}from"./chunk-U467ZTQ4.js";import{a as lt,b as At,c as ct}from"./chunk-3KPWJPKG.js";import{a as Ut,b as Nt,c as Vt}from"./chunk-EQWH3TBL.js";import{a as fe}from"./chunk-TQHNKGRL.js";import{a as Me}from"./chunk-F2GEUOGZ.js";import{a as W}from"./chunk-BIZAKOYU.js";import{b as $e,c as ce,d as we,e as pe,f as xe,g as at,h as Re,i as Ie,j as ve,m as rt,n as Ge,o as st,p as bt,q as Le,r as ge,s as be,t as Ue}from"./chunk-ELMONRIG.js";import{b as Fe,d as ae}from"./chunk-C6XTRC7P.js";import{A as ke,B as it,a as re,b as tt,d as Gt,e as ye,g as Oe,l as se,o as Lt,p as nt,t as le}from"./chunk-P4ZFQZCA.js";import{h as ot}from"./chunk-S5EF63OY.js";import{ia as vt}from"./chunk-7L2WUS2V.js";import{$a as he,$b as It,Ab as Y,Bb as Q,Bc as qe,Cb as Z,Db as s,Eb as r,F as ze,Fb as u,Gb as B,Hb as K,Ib as He,Jb as R,Oc as $,Pb as S,Pc as et,Qb as E,Rb as O,Sb as Ze,T as De,Tb as Je,Ua as l,Ub as Te,Vb as h,Wb as c,Z as P,Zb as oe,ac as U,ea as F,f as Qe,fa as g,fc as Ae,gb as ie,gc as Ne,hc as ee,ic as d,jc as Pe,ka as xt,kc as H,lb as m,lc as St,nc as G,oc as L,pc as b,qc as Et,ra as Tt,rc as Dt,sa as ft,sc as ht,tb as Rt,ub as _,uc as Xe,va as D,vc as We,wb as Ce,xc as je,zb as T}from"./chunk-L72ALLHJ.js";import{a as X,b as me,c as wt}from"./chunk-7CGTOI24.js";var _t=class o{#n=P(ot);#t=P(ye);#e=P(Me);testDestination(n,e,t){return this.#e.hasV2TestOperations()?this.testDestinationv2(n,e,t):this.testDestinationv1(n,e,t)}testDestinationv2(n,e,t){return new Qe(i=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:n,AutoCreate:!1,Options:null}}).subscribe({next:a=>{if(a.Success){i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e,anyFilesFound:!a.Data?.FolderIsEmpty,containsBackup:a.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:a.Data?.FolderContainsEncryptedBackupFiles??void 0}),i.complete();return}this.handleGenericError(i,n,e,a.Error??"Unknown error")},error:a=>{let p=a?.error?.body;if(p?.Data?.FolderExists===!1||p?.StatusCode==="missing-folder"){t?this.handleMissingFolder(i,n,e):this.handleGenericError(i,n,e,$localize`The remote destination folder does not exist.`);return}if(p?.Data?.HostCertificate){this.handleMissingCertificate(i,n,e,p.Data?.HostCertificate);return}if(p?.Data?.ReportedHostKey){this.handleIncorrectKey(i,n,e,p.Data.ReportedHostKey,p.Data.AcceptedHostKey??null);return}this.handleGenericError(i,n,e,a?.message??"Unknown error")}})})}testDestinationv1(n,e,t){return new Qe(i=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:a=>{i.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e}),i.complete()},error:a=>{this.handleDestinationErrorv1(a.message,n,e,t).subscribe(p=>{i.next(p)})}})})}handleMissingFolder(n,e,t){this.#t.open(W,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{a.Success?this.handleFolderCreated(n,e,t):this.handleFolderCreateFailure(n,e,t,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(n,e,t)},error:a=>{this.handleFolderCreateFailure(n,e,t,a.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(n,e,t,i){this.#t.open(W,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleFolderCreated(n,e,t){this.#t.open(W,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:t}),n.complete()}})}reportNoAction(n,e,t){n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}handleMissingCertificate(n,e,t,i){this.#t.open(W,{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(n,e,t);return}n.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:t}),n.complete()}})}handleIncorrectKey(n,e,t,i,a){a?this.#t.open(W,{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:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}}):this.#t.open(W,{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:p=>{if(!p){this.reportNoAction(n,e,t);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:t}),n.complete()}})}handleGenericError(n,e,t,i){this.#t.open(W,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:a=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:t}),n.complete()}})}handleDestinationErrorv1(n,e,t,i){return new Qe(a=>{if(n==="missing-folder"){i?this.handleMissingFolder(a,e,t):this.handleGenericError(a,e,t,$localize`The remote destination folder does not exist.`);return}if(n.startsWith("incorrect-cert:")){let p=n.split("incorrect-cert:")[1];this.handleMissingCertificate(a,e,t,p);return}if(n.startsWith("incorrect-host-key:")){let p=n.split('incorrect-host-key:"')[1].split('",')[0],A=n.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(a,e,t,p,A);return}this.handleGenericError(a,e,t,n)})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var ut=class o{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Yt=["formRef"];function Qt(o,n){o&1&&(s(0,"spk-alert",17),S(1,5),u(2,"spk-icon",26),E(),r())}function Zt(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e.DisplayName," ")}}function Jt(o,n){if(o&1&&u(0,"spk-progress-bar",40),o&2){let e=c(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function en(o,n){o&1&&(s(0,"span",35),O(1,10),r())}function tn(o,n){o&1&&(S(0,8,1),u(1,"spk-icon"),E())}function nn(o,n){o&1&&(S(0,8,2),u(1,"spk-icon"),E())}function on(o,n){o&1&&(S(0,11,1),u(1,"spk-icon",42),E())}function an(o,n){o&1&&(S(0,11,2),u(1,"spk-icon"),E())}function rn(o,n){if(o&1){let e=R();s(0,"button",41),h("click",function(){F(e);let i=c(3);return g(i.copyPassword())}),S(1,11),m(2,on,2,0)(3,an,2,0),E(),r()}if(o&2){let e=c(3);l(2),T(e.copiedPassword()?2:3)}}function sn(o,n){o&1&&(s(0,"spk-alert",39),O(1,12),r())}function ln(o,n){if(o&1){let e=R();s(0,"div",30)(1,"spk-form-field")(2,"label",31),S(3,7),u(4,"sup"),E(),r(),u(5,"input",32),r(),m(6,Jt,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),u(8,"input",34),m(9,en,2,0,"span",35),r(),s(10,"div",36)(11,"button",37),h("click",function(){F(e);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),S(12,8),m(13,tn,2,0)(14,nn,2,0),E(),r(),s(15,"button",37),h("click",function(){F(e);let i=c(2);return g(i.generatePassword())}),S(16,9),u(17,"spk-icon"),E(),r(),m(18,rn,4,1,"button",38),r(),m(19,sn,2,0,"spk-alert",39),r()}if(o&2){let e=c(2);l(5),_("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),_("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),T(e.showPassword()?13:14),l(5),T(e.showCopyPassword()?18:-1),l(),T(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function cn(o,n){if(o&1&&(s(0,"spk-select",27)(1,"label",28),O(2,6),r(),u(3,"input",29),m(4,Zt,1,1,"ng-template"),r(),m(5,ln,20,7,"div",30)),o&2){let e=c();_("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function pn(o,n){if(o&1&&(s(0,"button",24),S(1,13),u(2,"spk-icon"),E(),r()),o&2){let e=c();_("disabled",e.nameAndDescriptionValid()===!1)}}function _n(o,n){if(o&1&&(s(0,"spk-tooltip",25)(1,"button",24),S(2,14),u(3,"spk-icon"),E(),r()()),o&2){let e=c();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new ge,zt=(o={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(o.name,[we.required]),description:Be.control(o.description),encryption:Be.control(o.encryption,[Vt()]),password:Be.control(o.password,[Nt(n=>n?.value.encryption!=="",[we.required])]),repeatPassword:Be.control(o.repeatPassword,[Nt(n=>n?.value.encryption!=="",[we.required])])}),yt={Key:"",DisplayName:"None"},Pt=class o{#n=P(ae);#t=P(Fe);#e=P(Ut);#i=P(_e);#o=P(Me);formRef=he.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=D(!1);copiedPassword=D(!1);showCopyPassword=D(!1);encryptionEffect=et(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=$(()=>{let n=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=$(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#a(n??""),this.copiedPassword.set(!0)}async#a(n){try{await navigator.clipboard.writeText(n)}catch{try{let t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let n=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...n].find(i=>i.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#e.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Yt,5),e&2&&Ne()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let a;a=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let x;x=$localize`Encryption`;let V;V=$localize`Password`;let y;y=$localize`Repeat password`;let w;w=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$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:`,v=Te(v);let J;J=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let C;C=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,C=Te(C);let f;f=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let I;I=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,i,a,p,A,x,w,v,J,j,C,f,I,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"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"],["message","Remember to copy the password",1,"primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"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",y,"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,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"h3",16),O(3,1),r(),m(4,Qt,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),S(7,2),u(8,"sup"),E(),r(),u(9,"input",19),r(),s(10,"spk-form-field")(11,"label",20),O(12,3),r(),u(13,"textarea",21),r(),m(14,cn,6,3),s(15,"div",22)(16,"button",23),h("click",function(){return F(i),g(t.exit())}),S(17,4),u(18,"spk-icon"),E(),r(),m(19,pn,3,1,"button",24)(20,_n,4,2,"spk-tooltip",25),r()()}if(e&2){let i;_("formGroup",t.generalForm),l(4),T(!t.isNew()&&((i=t.generalFormSignal())==null?null:i.encryption)!==""?4:-1),l(10),T(t.isNew()?14:-1),l(5),T(t.encryptionFieldSignal()===""||!t.isNew()?19:20)}},dependencies:[Ue,Ie,ce,pe,xe,Ge,Le,se,le,Oe,re,nt,tt,it],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 un(o,n){if(o&1){let e=R();s(0,"div",24)(1,"spk-form-field")(2,"label",25),O(3,7),r(),s(4,"input",26,0),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().time,i)||(a.scheduleFields.nextTime().time=i),g(i)}),h("focus",function(){F(e);let i=ee(5);return g(i.showPicker())}),r(),s(6,"spk-icon",27),d(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",28),s(10,"input",29,1),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.nextTime().date,i)||(a.scheduleFields.nextTime().date=i),g(i)}),h("focus",function(){F(e);let i=ee(11);return g(i.showPicker())}),r(),s(12,"spk-icon",27),d(13,"calendar"),r()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),O(17,8),r(),s(18,"input",31),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatValue,i)||(a.scheduleFields.runAgain().repeatValue=i),g(i)}),r()(),s(19,"spk-select",32)(20,"input",33),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().repeatUnit,i)||(a.scheduleFields.runAgain().repeatUnit=i),g(i)}),r()()(),s(21,"app-toggle-card",34),B(22,35),O(23,9),K(),s(24,"div",36)(25,"spk-toggle",19),S(26,10),s(27,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.mon,i)||(a.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),r(),E(),r(),s(28,"spk-toggle",19),S(29,11),s(30,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.tue,i)||(a.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),r(),E(),r(),s(31,"spk-toggle",19),S(32,12),s(33,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.wed,i)||(a.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),r(),E(),r(),s(34,"spk-toggle",19),S(35,13),s(36,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.thu,i)||(a.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),r(),E(),r(),s(37,"spk-toggle",19),S(38,14),s(39,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.fri,i)||(a.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),r(),E(),r(),s(40,"spk-toggle",19),S(41,15),s(42,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sat,i)||(a.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),r(),E(),r(),s(43,"spk-toggle",19),S(44,16),s(45,"input",20),b("ngModelChange",function(i){F(e);let a=c();return L(a.scheduleFields.runAgain().allowedDays.sun,i)||(a.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),r(),E(),r()()()}if(o&2){let e=c();l(4),G("ngModel",e.scheduleFields.nextTime().time),l(6),G("ngModel",e.scheduleFields.nextTime().date),l(8),G("ngModel",e.scheduleFields.runAgain().repeatValue),l(),_("options",e.unitOptions)("isClearable",!1),l(),G("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),_("disallowToggle",!0),l(6),G("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),G("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var dn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Ee={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}}},Ot=class o{#n=P(_e);#t=P(ae);#e=P(Fe);unitOptions=dn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let t;t=$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 p;p=$localize`Next time`;let A;A=$localize`Run again every`;let k;k=$localize`Allowed days`;let x;x=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let j;return j=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,e,t,i,a,p,A,k,x,V,y,w,v,J,j,[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,t){e&1&&(s(0,"h3",17),O(1,2),r(),s(2,"div",18)(3,"spk-toggle",19),S(4,3),s(5,"input",20),b("ngModelChange",function(a){return L(t.scheduleFields.autoRun,a)||(t.scheduleFields.autoRun=a),a}),r(),E(),r(),s(6,"p"),O(7,4),r()(),m(8,un,46,14),s(9,"div",21)(10,"button",22),h("click",function(){return t.goBack()}),S(11,5),u(12,"spk-icon"),E(),r(),s(13,"button",23),h("click",function(){return t.next()}),S(14,6),u(15,"spk-icon"),E(),r()()),e&2&&(l(5),G("ngModel",t.scheduleFields.autoRun),l(3),T(t.scheduleFields.autoRun()?8:-1))},dependencies:[be,ce,ve,$e,pe,Re,se,ke,re,Oe,le,Ve],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 mn(o,n){if(o&1&&(B(0,4),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.startsWith)}}function Fn(o,n){if(o&1&&(B(0,5),d(1),K()),o&2){let e,t=c();l(),Pe((e=t.currentExpressionOption())==null?null:e.endsWith)}}var gn=[{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=ft.required();osType=ft();pathChange=Tt();remove=Tt();internalPath=D("");pathType=D("-Expression");currentExpressionOption=$(()=>{let n=this.pathType();return this.expressionOptions().find(e=>e.value===n)});expressionOptions=$(()=>{let e=this.osType()==="Windows"?"\\":"/";return gn.map(t=>t.value==="-Folder"||t.value==="+Folder"?me(X({},t),{startsWith:"",endsWith:""}):t.value==="-FolderName"||t.value==="+FolderName"?me(X({},t),{startsWith:"*",endsWith:`*${e}`}):t.value==="-FileName"||t.value==="+FileName"?me(X({},t),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):t.value==="-FileGroup"||t.value==="+FileGroup"?me(X({},t),{startsWith:"{",endsWith:"}"}):t.value==="-Regex"||t.value==="+Regex"?me(X({},t),{startsWith:"[",endsWith:"]"}):t.value==="-Extension"||t.value==="+Extension"?me(X({},t),{startsWith:"*.",endsWith:""}):me(X({},t),{startsWith:"",endsWith:""}))});pathEffect=et(()=>{let n=this.path(),e=n.slice(1),t=n.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(`${t}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${t}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${t}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${t}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${t}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${t}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${t}Expression`),this.internalPath.set(e))});updateFilter(){let n=this.internalPath(),e=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${n}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,t){if(e&1&&(s(0,"spk-select",0)(1,"input",1),b("ngModelChange",function(a){return L(t.pathType,a)||(t.pathType=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r()(),s(2,"spk-form-field",2)(3,"input",3),b("ngModelChange",function(a){return L(t.internalPath,a)||(t.internalPath=a),a}),h("ngModelChange",function(){return t.updateFilter()}),r(),m(4,mn,2,1,"ng-container",4)(5,Fn,2,1,"ng-container",5),r(),s(6,"div",6),h("click",function(){return t.removeFilter()}),s(7,"spk-icon",7),d(8,"x-circle"),r()()),e&2){let i,a;_("options",t.expressionOptions())("isClearable",!1),l(),G("ngModel",t.pathType),l(2),G("ngModel",t.internalPath),l(),T(!((i=t.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),T(!((a=t.currentExpressionOption())==null||a.endsWith==null)&&a.endsWith.length?5:-1)}},dependencies:[be,ce,pe,Re,le,se,re],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-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Cn=["formRef"],Ht=()=>({standalone:!0});function Tn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42)(1,"input",43),b("ngModelChange",function(i){F(e);let a=c(2);return L(a.editingPath,i)||(a.editingPath=i),g(i)}),r()(),s(2,"button",44),h("click",function(){F(e);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),d(4,"floppy-disk"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),d(7,"x-bold"),r()()}if(o&2){let e=c(2);l(),G("ngModel",e.editingPath),_("ngModelOptions",Xe(2,Ht))}}function fn(o,n){if(o&1){let e=R();s(0,"spk-form-field",42),u(1,"input",45),r(),s(2,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.editPath(i))}),s(3,"spk-icon"),d(4,"pen"),r()(),s(5,"button",44),h("click",function(){F(e);let i=c().$implicit,a=c();return g(a.removePath(i))}),s(6,"spk-icon"),d(7,"trash-simple"),r()()}if(o&2){let e=c().$implicit;Rt("readonly",!0),l(),_("ngModel",e)("ngModelOptions",Xe(3,Ht))}}function Sn(o,n){if(o&1&&(s(0,"div",30),m(1,Tn,8,3)(2,fn,8,4),r()),o&2){let e=n.$implicit,t=c();l(),T(t.oldPath()===e?1:2)}}function En(o,n){if(o&1){let e=R();s(0,"app-new-filter",47),h("pathChange",function(i){let a=F(e).$index,p=c(2);return g(p.patchPathAt(i,a))})("remove",function(){let i=F(e).$index,a=c(2);return g(a.removePathAt(i))}),r()}if(o&2){let e,t=n.$implicit,i=c(2);_("path",t)("osType",(e=i.osType())!==null&&e!==void 0?e:"")}}function Dn(o,n){if(o&1&&Q(0,En,1,2,"app-new-filter",46,Y),o&2){let e=c();Z(e.pathArray())}}function hn(o,n){if(o&1&&(s(0,"div",41)(1,"spk-form-field"),u(2,"input",48),r(),s(3,"spk-select",49),u(4,"input",50),r()()),o&2){let e=c();l(3),_("options",e.sizeOptions())("isClearable",!1)}}var ue=new ge,An=["Bytes","KB","MB","GB","TB","PB"],Xt=(o={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ue.group({path:ue.control(o.path),excludes:ue.group({hidden:ue.control(o.excludes.hidden),system:ue.control(o.excludes.system),temporary:ue.control(o.excludes.temporary),filesLargerThan:ue.group({size:ue.control(null),unit:ue.control(null)})})}),kt=class o{#n=P(_e);#t=P(ae);#e=P(Fe);formRef=he.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new at("");filesLargerThan=$(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=D(An);osType=this.#n.osType;pathSignal=fe(this.sourceDataForm.controls.path.valueChanges);pathArray=$(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=$(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=D(null);editingPath=D(null);addingNewPath=D(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),e=this.editingPath();if(!n||!e||e===n){this.oldPath.set(null),this.editingPath.set(null);return}let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(t?.replace(n,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let e=this.sourceDataForm.controls.path.value??"",t=e.indexOf(n);if(t===-1)return;let i=t===0?n:"\0"+n,a=e.replace(i,"");this.sourceDataForm.controls.path.setValue(a)}addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),a=this.pathArray().map((p,A)=>A===e?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(n){let t=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\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 n=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Cn,5),e&2&&Ne()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let i;i=$localize`System files`;let a;a=$localize`Temporary files`;let p;p=$localize`Source Data`;let A;A=$localize`Folder path`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let x;x=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let V;V=$localize`Paths`;let y;y=$localize`Add a path directly from your machine.`;let w;w=$localize`Filters`;let v;v=$localize`Customize your filters.`;let J;J=$localize`Add filter`;let j;j=$localize`Exclude`;let C;C=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let I;I=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Files larger than `;let te;te=$localize`Edit path`;let ne;return ne=$localize`Select an option...`,[["formRef",""],p,A,k,x,V,y,w,v,J,j,C,f,I,z,N,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"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",t,"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",te,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",ne]]},template:function(e,t){if(e&1){let i=R();s(0,"form",16,0),h("submit",function(){return F(i),g(t.next())}),s(2,"div",17)(3,"h3",18),O(4,1),r(),s(5,"app-file-tree",19)(6,"label",20),O(7,2),r(),u(8,"input",21),r(),s(9,"div",22)(10,"button",23),h("click",function(){return F(i),g(t.goBack())}),S(11,3),u(12,"spk-icon"),E(),r(),s(13,"button",24),S(14,4),u(15,"spk-icon"),E(),r()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),O(19,5),K(),s(20,"p",28),O(21,6),r(),s(22,"div",29),Q(23,Sn,3,1,"div",30,Y),s(25,"div",31)(26,"spk-form-field"),u(27,"input",32),r(),s(28,"button",33),h("click",function(){return F(i),g(t.addNewPath())}),s(29,"spk-icon"),d(30,"plus"),r()()()()(),s(31,"app-toggle-card",26),B(32,27),O(33,7),K(),s(34,"p",28),O(35,8),r(),s(36,"button",34),h("click",function(){return F(i),g(t.addFilter())}),O(37,9),r(),m(38,Dn,2,0),r(),s(39,"app-toggle-card",35),B(40,27),O(41,10),K(),s(42,"p",28),O(43,11),r(),s(44,"spk-toggle",36),S(45,12),u(46,"input",37),E(),r(),s(47,"spk-toggle",36),S(48,13),u(49,"input",38),E(),r(),s(50,"spk-toggle",36),S(51,14),u(52,"input",39),E(),r(),s(53,"spk-toggle",40),h("click",function(){return F(i),g(t.toggleFilesLargerThan())}),O(54,15),r(),m(55,hn,5,2,"div",41),r()()()}if(e&2){let i;_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(12),_("disallowToggle",!0),l(6),Z(t.nonFilterPaths()),l(4),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),T((i=t.pathSignal())!=null&&i.length?38:-1),l(),_("disallowToggle",!0),l(14),Ce("active",t.filesLargerThan()),l(2),T(t.filesLargerThan()?55:-1)}},dependencies:[be,Ie,ce,ve,$e,pe,xe,Re,Ue,rt,Ge,Le,st,se,re,Oe,ke,le,Ft,pt,Ve],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-level-40)}.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 Wt="1W:1D,4W:1W,12M:1M",de=new ge,_e=class o{#n=P(ae);#t=P(Me);#e=P(ye);#i=P(ot);#o=P(ut);generalForm=zt();sourceDataForm=Xt();scheduleFields={autoRun:D(Ee.autoRun),nextTime:D(Ee.nextTime),runAgain:D(Ee.runAgain)};destinationForm=jt();settings=D([]);optionsFields={remoteVolumeSize:D("50MB"),backupRetention:D("all"),backupRetentionTime:D(""),backupRetentionVersions:D(0),backupRetentionCustom:D("")};isDraft=D(!1);backupId=D(null);backupName=$(()=>this.generalFormSignal()?.name??"");isSubmitting=D(!1);finishedLoading=D(!1);backupDefaults=D(null);isNew=$(()=>this.backupId()==="new");osType=$(()=>this.#t.systemInfo()?.OSType);selectedOptions=D([]);selectedAdvancedFormPair=D([]);destinationFormPair=D({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=$(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});selectedHttpOptions=D([]);notSelectedHttpOptions=$(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(t=>e.findIndex(i=>i.name===t.name)===-1)});sourceDataFormSignal=fe(this.sourceDataForm.valueChanges);destinationFormSignal=fe(this.destinationForm.valueChanges);generalFormSignal=fe(this.generalForm.valueChanges);encryptionFieldSignal=fe(this.generalForm.controls.encryption.valueChanges);destinationOptions=$(()=>this.#t.backendModules()??[]);httpOptions=$(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#a)??[]);advancedOptions=$(()=>this.#t.systemInfo()?.Options?.map(this.#a)??[]);#a(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=$(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[yt,...n]});nonSelectedOptions=$(()=>this.advancedOptions().sort((n,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addOrUpdateAdvancedFormPairByName(n,e,t){let i=this.selectedAdvancedFormPair().find(a=>a.name===n);if(i)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[i.name].setValue(t);else{let a=this.notSelectedAdvancedFormPair().find(p=>p.name===n);if(!a)return;this.addAdvancedFormPair(a,e,t)}}addAdvancedFormPairByName(n,e,t){let i=this.notSelectedAdvancedFormPair().find(a=>a.name===n);i&&this.addAdvancedFormPair(i,e,t)}addHttpOptionByName(n,e,t){let i=this.notSelectedHttpOptions().find(a=>a.name===n);i&&this.addHttpOption(i,e,t)}addAdvancedFormPair(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,t){let i=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,a=t??n.defaultValue;this.createFormField(i,n,a),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(a=>a.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.name!==n.name),i))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(t=>(t=t.filter(i=>i.name!==n.name),t))}submit(){this.isSubmitting.set(!0);let n=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{this.exit(!1)},error:t=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:n}).pipe(ze(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{this.exit(!1)},error:t=>{}})}exit(n){if(!n){this.#p(),this.#n.navigate(["/"]);return}this.#e.open(W,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#p(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(n){this.#s(),setTimeout(()=>{this.#r(n)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let e=n.Sources??"",t=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",a=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,p={path:[...e,...t].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:a?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let e=n.TargetURL?At(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#r(n){let e=At(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(p=>p.Name==="encryption-module"),t=n.Settings?.find(p=>p.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",a={name:n.Name??"",description:n.Description??""};i&&i!==""&&(a.encryption=i),t&&t!==""&&(a.password=t,a.repeatPassword=t),this.generalForm.patchValue(a)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(n.Repeat)??null,t=this.#_(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>X(X({},i),t)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],t=n.Settings?.filter(p=>!e.includes(p.Name)),i=n.Settings?.filter(p=>e.includes(p.Name));this.settings.set(t??[]),t?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var a="all";i?.forEach(p=>{if(p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return a="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return a="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Wt)a="smart";else return a="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(a)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,e=this.getScheduleFormValue(),t=this.sourceDataForm.value,a=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],p=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(p=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let A=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([w,v])=>v).map(([w,v])=>w):[],k=t.path?.split("\0")??[],x=this.mapFormsToSettings(),V=Object.entries(t.excludes??{}).filter(([w,v])=>v&&w!=="filesLargerThan").map(([w])=>w),y=t.excludes?.filesLargerThan;return V.length&&x.push({Name:"--exclude-files-attributes",Value:V.join(",")}),y&&y.size!==null&&y.unit!==null&&x.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:a[0]??null,Sources:k.filter(w=>!w.startsWith("-")),Settings:x,Filters:k.filter(w=>w.startsWith("-")).map((w,v)=>({Order:v,Include:!1,Expression:w.slice(1)}))},Schedule:e.autoRun?{Repeat:p,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:A}:null}}mapFormsToSettings(n=[]){let e=this.generalForm.value,t=["--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:Wt});break}let p=[...n,...t],A=this.settings().filter(k=>!p.includes(k.Name)).map(k=>{let x=k.Value;return typeof k.Value=="number"&&(x=k.Value.toString()),typeof k.Value=="boolean"&&(x=k.Value?"True":"False"),{Name:k.Name,Value:x}});return[...i,...a,...A]}#c(n){return n.controls.map(e=>lt(e.value))}#_(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(n,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,de.control(t));return}if(e.type==="Size"){n.addControl(e.name,de.control(t));return}if(e.type==="Integer"){n.addControl(e.name,de.control(t?parseInt(t):0));return}if(e.type==="Boolean"){n.addControl(e.name,de.control(t==="true"||t==="True"));return}if(e.type==="Flags"){n.addControl(e.name,de.control(t??""));return}if(e.type==="Timespan"||e.type==="DateTime"){n.addControl(e.name,de.control(t,[we.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,t=!1){let i=ct.find(C=>C.customKey===n||C.key===n),a=i?.key,p=this.destinationOptions().find(C=>C.Key===a),A=this.httpOptions();if(!p||!p.Options)return;let k=i&&i.oauthField?i.oauthField:null,x=i&&i.customFields?i.customFields:{},V=i&&i.dynamicFields?i.dynamicFields:[],y=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let v=de.group({}),J=de.group({}),j=de.group({});x&&Object.entries(x).forEach(([C,f],I)=>{let te=f,{formElement:z}=te,N=wt(te,["formElement"]);v.addControl(C,z(e?.custom[C])),this.destinationFormPair.update(ne=>(ne.custom.push(X({order:900+I},N)),ne))});for(let C=0;C<p.Options.length;C++){let f=p.Options[C];if(f.Deprecated)continue;let I=V.find(z=>z===f.Name||f.Aliases?.includes(z.name)||z.name===f.Name);if(I){let z=f.Aliases?.indexOf(I.name)??-1,N=f.Aliases&&z>-1?f.Aliases[z]:f.Name,te=I&&typeof I!="string",ne=te?I?.defaultValue??f.DefaultValue:f.DefaultValue,M={name:N,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,order:900+C},Ke=te?X(X({},M),I):M,q=e?.dynamic[N]??ne??f.DefaultValue;this.createFormField(J,Ke,q),this.destinationFormPair.update($t=>($t.dynamic.push(Ke),$t))}else{if(w.find(q=>q===f.Name))continue;let N=y.find(q=>q===f.Name||q.name===f.Name),te=N&&typeof N!="string",ne=e?.advanced[f.Name],M=ne??f.DefaultValue,Ke={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,defaultValue:M,order:900+C},Ye=te?X(X({},Ke),N):Ke;t&&ne&&(this.createFormField(j,Ye,M),this.selectedAdvancedFormPair.update(q=>(q.push(Ye),q))),this.destinationFormPair.update(q=>(q.advanced.push(Ye),q))}}for(let C=0;C<A.length;C++){let f=A[C],I=e?.advanced[f.name],z=I??f.defaultValue;t&&I&&(this.createFormField(j,f,z),this.selectedHttpOptions.update(N=>(N.push(f),N)))}this.destinationFormPair.update(C=>({oauthField:C.oauthField,custom:C.custom.sort((f,I)=>f.order-I.order),dynamic:C.dynamic.sort((f,I)=>f.order-I.order),advanced:C.advanced.sort((f,I)=>f.order-I.order)})),this.destinationForm.controls.destinations.push(qt({key:i?.customKey??n,customGroup:v,dynamicGroup:J,advancedGroup:j}))}#p(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Ee.autoRun),this.scheduleFields.nextTime.set(Ee.nextTime),this.scheduleFields.runAgain.set(Ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||o)};static \u0275prov=De({token:o,factory:o.\u0275fac,providedIn:"root"})};var Nn=["formRef"],Pn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"custom",destinationType:e,oauthField:t}),Ct=o=>({$implicit:o}),yn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:t}),On=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",destinationType:e,oauthField:t}),kn=(o,n,e,t)=>({index:o,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),Mn=()=>({maxWidth:"700px",width:"100%"});function $n(o,n){o&1&&(S(0,5,2),u(1,"spk-icon"),E())}function wn(o,n){o&1&&O(0,5,3)}function xn(o,n){if(o&1){let e=R();S(0,5,1),s(1,"button",21),h("click",function(){F(e);let i=c();return g(i.testDestination())}),m(2,$n,2,0)(3,wn,1,0),r(),E()}if(o&2){let e=c();l(),Ce("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function Rn(o,n){if(o&1){let e=R();s(0,"p",27),h("click",function(){F(e);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),S(1,8),u(2,"strong")(3,"br")(4,"span",28),E(),r()}if(o&2){let e,t=c();l(4),Ze((e=t.selectedDestinationType())==null?null:e.displayName),Je(1)}}function In(o,n){if(o&1){let e=R();s(0,"div",34),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),s(1,"h3"),d(2),r(),s(3,"p"),d(4),r()()}if(o&2){let e=n.$implicit;l(2),Pe(e.displayName),l(2),Pe(e.description)}}function vn(o,n){if(o&1){let e=R();s(0,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addDestinationFormGroup(i.key))}),d(2),r()}if(o&2){let e=n.$implicit;l(2),H(" ",e.displayName," ")}}function Gn(o,n){if(o&1&&(s(0,"div",29),Q(1,In,5,2,"div",30,Y),r(),s(3,"spk-menu",31)(4,"button",32),O(5,9),r(),B(6,20),Q(7,vn,3,1,"button",33,Y),K(),r()),o&2){let e=c();l(),Z(e.destinationTypeOptionsFocused()),l(2),_("searchable",!0),l(4),Z(e.destinationTypeOptionsNotFocused())}}function Ln(o,n){o&1&&He(0)}function bn(o,n){if(o&1&&m(0,Ln,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,Pn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Un(o,n){o&1&&He(0)}function Vn(o,n){if(o&1&&m(0,Un,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,yn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Bn(o,n){if(o&1){let e=R();S(0,10,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addAdvancedFormPair(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Kn(o,n){o&1&&He(0)}function zn(o,n){if(o&1&&m(0,Kn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,On,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Hn(o,n){if(o&1){let e=R();S(0,11,1),s(1,"button",35,1),h("click",function(){let i=F(e).$implicit,a=c(2);return g(a.addHttpOption(i,0))}),r(),E()}if(o&2){let e=n.$implicit;l(),Ze(e.name),Je(0)}}function Xn(o,n){o&1&&He(0)}function Wn(o,n){if(o&1&&m(0,Xn,1,0,"ng-container",40),o&2){let e,t=n.$implicit,i=n.$index;c();let a=ee(29),p=c();_("ngTemplateOutlet",a)("ngTemplateOutletContext",We(7,Ct,je(2,kn,i,t,(e=p.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function jn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function qn(o,n){if(o&1&&(s(0,"app-file-tree",43)(1,"label",47),d(2),m(3,jn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Yn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Qn(o,n){if(o&1&&(s(0,"app-file-tree",44)(1,"label",47),d(2),m(3,Yn,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),o&2){let e,t=c().$implicit,i=c(2);_("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Zn(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Jn(o,n){o&1&&(s(0,"spk-icon",51),d(1,"link"),r())}function ei(o,n){o&1&&(s(0,"spk-icon",51),d(1,"envelope"),r())}function ti(o,n){o&1&&(s(0,"spk-icon",51),d(1,"textbox"),r())}function ni(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Zn,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Jn,2,0,"spk-icon",51)(6,ei,2,0,"spk-icon",51)(7,ti,2,0,"spk-icon",51),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.type==="Email"?"email":"text"),l(),T(t.formView.type==="Path"?5:t.formView.type==="Email"?6:7)}}function ii(o,n){if(o&1){let e=R();s(0,"span",55),h("click",function(){F(e);let i=c(2).$implicit,a=c(2);return g(a.oauthStartTokenCreation(i.destinationType,i))}),d(1," AuthID "),r()}}function oi(o,n){o&1&&(s(0,"spk-icon",51),d(1,"password"),r())}function ai(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye "),r()}}function ri(o,n){if(o&1){let e=R();s(0,"spk-icon",56),h("click",function(){F(e);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),d(1," eye-slash "),r()}}function si(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),r(),u(3,"input",52),m(4,ii,2,0,"span",53)(5,oi,2,0,"spk-icon",51)(6,ai,2,0,"spk-icon",54)(7,ri,2,0,"spk-icon",54),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),T(t.oauthField===t.formView.name?4:5),l(2),T(t.formView.showPassword?6:7)}}function li(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function ci(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;St(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function pi(o,n){if(o&1&&d(0),o&2){let e=c().$implicit;H(" ",e," ")}}function _i(o,n){if(o&1&&m(0,ci,1,2)(1,pi,1,1),o&2){let e=c(3).$implicit;T(e.formView.loadOptions?0:1)}}function ui(o,n){if(o&1&&(s(0,"spk-select",57)(1,"label",47),d(2),m(3,li,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,_i,2,1,"ng-template",null,3,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("isClearable",!1)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function di(o,n){if(o&1&&(Et(0),m(1,ui,7,14)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:-1)}}function mi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(3).$implicit;_("message",e.formView.longDescription)}}function Fi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;St(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function gi(o,n){if(o&1&&(s(0,"spk-select",59)(1,"label",47),d(2),m(3,mi,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Fi,1,2,"ng-template",null,4,qe)),o&2){let e,t=ee(6);c();let i=ht(0),a=c().$implicit;_("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",t),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),H(" ",(e=a.formView.shortDescription)!==null&&e!==void 0?e:a.formView.name," "),l(),T(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),oe("formControlName",a.formView.name)}}function Ci(o,n){o&1&&u(0,"spk-progress-bar",58)}function Ti(o,n){if(o&1&&(Et(0),m(1,gi,7,15)(2,Ci,1,0,"spk-progress-bar",58)),o&2){let e=c().$implicit,t=Dt(e.formView.loadOptions?e.formView.loadOptions(c(2).injector)():e.formView.options);l(),T(t?1:2)}}function fi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Si(o,n){if(o&1&&(s(0,"app-size",45)(1,"label",47),d(2),m(3,fi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.Name)("formControlName",t.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
7
|
+
item.asHttpOptions ? 'http' : 'other'
|
|
8
|
+
}}`),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Ei(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Di(o,n){if(o&1&&(s(0,"spk-form-field")(1,"label",47),d(2),m(3,Ei,3,1,"spk-tooltip",48),r(),u(4,"input",60),s(5,"spk-icon",51),d(6,"numpad"),r()()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function hi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Ai(o,n){if(o&1&&(s(0,"spk-toggle",46)(1,"label",47),d(2),m(3,hi,3,1,"spk-tooltip",48),r(),u(4,"input",61),r()),o&2){let e,t=c().$implicit;l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1),l(),U("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),oe("formControlName",t.formView.name)}}function Ni(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function Pi(o,n){if(o&1&&d(0),o&2){let e=n.$implicit;H(" ",e," ")}}function yi(o,n){if(o&1&&(s(0,"spk-select",62)(1,"label",47),d(2),m(3,Ni,3,1,"spk-tooltip",48),r(),u(4,"input",63),r(),m(5,Pi,1,1,"ng-template",null,4,qe)),o&2){let e,t=ee(6),i=c().$implicit;_("options",i.formView.options)("selectMultiple",!0)("optionTemplate",t),l(),It("for","destination-",i.formGroupName,"-",i.index,""),l(),H(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),oe("formControlName",i.formView.name)}}function Oi(o,n){if(o&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),d(2,"question"),r()()),o&2){let e=c(2).$implicit;_("message",e.formView.longDescription)}}function ki(o,n){if(o&1&&(s(0,"app-timespan",45)(1,"label",47),d(2),m(3,Oi,3,1,"spk-tooltip",48),r()()),o&2){let e,t=c().$implicit;_("inputType",t.formView.name)("formControlName",t.formView.name)("customId","destination-"+t.formGroupName+"-"+t.index+"-"+(t.asHttpOptions?"http":"other")),l(),U("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),H(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),T(t.formView.longDescription?3:-1)}}function Mi(o,n){if(o&1){let e=R();s(0,"button",64),h("click",function(){F(e);let i=c().$implicit,a=c(2);return g(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),d(2,"x-circle"),r()()}}function $i(o,n){if(o&1&&(s(0,"div",41),B(1,42),m(2,qn,5,17,"app-file-tree",43)(3,Qn,5,13,"app-file-tree",44)(4,ni,8,13,"spk-form-field")(5,si,8,13,"spk-form-field")(6,di,2,2)(7,Ti,3,2)(8,Si,4,9,"app-size",45)(9,Di,7,11,"spk-form-field")(10,Ai,5,11,"spk-toggle",46)(11,yi,7,9)(12,ki,4,9,"app-timespan",45),K(),m(13,Mi,3,0,"button",32),r()),o&2){let e=n.$implicit;Ce("single-field",e.formGroupName!=="advanced"),l(),_("formGroupName",e.formGroupName),l(),T(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"||e.formView.type==="DateTime"?12:-1),l(11),T(e.formGroupName==="advanced"?13:-1)}}function wi(o,n){if(o&1&&(B(0,22)(1,36),Q(2,bn,1,9,"ng-container",null,Y),Q(4,Vn,1,9,"ng-container",null,Y),s(6,"app-toggle-card",37),B(7,38),S(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),B(12,20),Q(13,Bn,3,1,"button",33,Y),K(),r(),E(),K(),Q(15,zn,1,9,"ng-container",null,Y),r(),s(17,"app-toggle-card",37),B(18,38),S(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),B(23,20),Q(24,Hn,3,1,"button",33,Y),K(),r(),E(),K(),Q(26,Wn,1,9,"ng-container",null,Y),r(),m(28,$i,14,5,"ng-template",null,2,qe),K()()),o&2){let e=c();l(2),Z(e.destinationFormPair().custom),l(2),Z(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),Z(e.notSelectedAdvancedFormPair()),l(2),Z(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(3),_("searchable",!0),l(),_("disabled",e.notSelectedHttpOptions().length===0),l(3),Z(e.notSelectedHttpOptions()),l(2),Z(e.selectedHttpOptions())}}function xi(o,n){if(o&1){let e=R();s(0,"spk-dialog",65),b("isOpenChange",function(i){F(e);let a=c();return L(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),O(3,12),r(),s(4,"spk-alert",67),O(5,13),r()(),s(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),s(9,"footer",70)(10,"button",24),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!1))}),d(11,"Cancel"),r(),s(12,"button",71),h("click",function(){F(e);let i=c();return g(i.closeTargetUrlDialog(!0))}),S(13,14),u(14,"spk-icon"),E(),r()()()}if(o&2){let e=c();G("isOpen",e.targetUrlDialogOpen),_("options",Xe(3,Mn)),l(8),_("formControl",e.targetUrlCtrl)}}var gt=new ge,jt=(o={destinations:[]})=>gt.group({destinations:gt.array(o.destinations)}),qt=({key:o,customGroup:n,dynamicGroup:e,advancedGroup:t})=>gt.group({destinationType:gt.control(o),custom:n,dynamic:e,advanced:t}),Mt=class o{#n=P(ae);#t=P(Fe);#e=P(_e);#i=P(ye);#o=P(_t);injector=P(xt);formRef=he.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=$(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=D(!1);testLoading=D(!1);destinationTypeOptionsInFocus=D(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=D(ct.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=$(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(t=>e.find(i=>i.key===t))});selectedDestinationType=$(()=>{let n=this.destinationFormSignal();return this.destinationTypeOptions().find(t=>n?.destinations?.[0]?.destinationType===t.key)});destinationTypeOptionsNotFocused=$(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(t=>!n.includes(t.key))});getFormFieldValue(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t].value}getFormControl(n,e,t){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[t]}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#e.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#e.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#e.addHttpOption(n,e)}targetUrl=$(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new at;targetUrlInitial=D(null);targetUrlDialogOpen=D(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!n||e===t||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let t=this.#e.getCurrentTargetUrl()[n];t&&(this.testLoading.set(!0),this.#o.testDestination(t,n,!0).pipe(ze(()=>this.testLoading.set(!1))).subscribe({next:i=>{if(i.action==="success"){this.#e.isNew()&&(i.containsBackup===!0?this.#i.open(W,{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(W,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(i.action==="generic-error"){this.successfulTest.set(!1);return}i.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",i.destinationIndex,i.certData),i.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",i.destinationIndex,i.reportedHostKey),i.testAgain&&this.testDestination(i.destinationIndex)}}))}mapToTargetUrl(n){return lt(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(t=>t.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#a=D("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=D(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=D(!1);#l=D(null);keyCreation(){}oauthStartTokenCreation(n,e){let t=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#r.set(!0);let i=this.#s(),a=450,p=600,A=this.#a()+"?type="+n+"&token="+i,k=screen.width/2-a/2,x=screen.height/2-p/2,V=window.open(A,"_blank","height="+p+",width="+a+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+x);return window.addEventListener("message",y=>{let w=y.data.startsWith("authid:"),v=w?y.data.replace("authid:",""):null;console.log("event",y),w&&(t.setValue(v),this.#r.set(!1),V?.close())}),!1}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ie({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&Ae(t.formRef,Nn,5),e&2&&Ne()},decls:24,vars:6,consts:()=>{let n;n=$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:`,n=Te(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let t;t=$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 p;p=$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:`,p=Te(p);let A;A=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,A=Te(A);let k;k=$localize`Edit target URL`;let x;x=$localize` Be careful, this will overwrite everything you have in your destination. `;let V;return V=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,t,i,a,p,A,k,x,V,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["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,t){if(e&1){let i=R();s(0,"form",15,0),h("submit",function(){return F(i),g(t.next())}),s(2,"header")(3,"h3",16),S(4,5),s(5,"div",17),m(6,xn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),B(10,20),s(11,"button",21),h("click",function(){return F(i),g(t.openTargetUrlDialog())}),u(12,"spk-icon"),r(),K(),r()(),E(),r(),m(13,Rn,5,1,"p"),r(),m(14,Gn,9,1)(15,wi,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),h("click",function(){return F(i),g(t.goBack())}),S(18,6),u(19,"spk-icon"),E(),r(),s(20,"button",25),S(21,7),u(22,"spk-icon"),E(),r()()(),m(23,xi,15,4,"spk-dialog",26)}if(e&2){let i;_("formGroup",t.destinationForm),l(6),T(t.destinationCount()>0?6:-1),l(7),T(t.destinationCount()>0?13:-1),l(),T(t.destinationCount()===0?14:-1),l(),T(!((i=t.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),T(t.targetUrlDialogOpen()?23:-1)}},dependencies:[Ue,Ie,ce,ve,$e,pe,xe,rt,Ge,Le,st,bt,vt,se,Lt,re,ke,it,Gt,tt,le,nt,Kt,Ve,pt,Bt],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}.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-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);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{_t as a,jt as b,qt as c,Mt as d,zt as e,yt as f,Pt as g,Ee as h,Ot as i,Xt as j,kt as k,_e as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as aa,A as B,Aa as Ba,B as C,Ba as Ca,C as D,Ca as Da,D as E,Da as Ea,E as F,Ea as Fa,F as G,Fa as Ga,G as H,Ga as Ha,H as I,Ha as Ia,I as J,Ia as Ja,J as K,Ja as Ka,K as L,Ka as La,L as M,La as Ma,M as N,Ma as Na,N as O,Na as Oa,O as P,Oa as Pa,P as Q,Q as R,R as S,S as T,T as U,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as b,aa as ba,b as c,ba as ca,c as d,ca as da,d as e,da as ea,e as f,ea as fa,f as g,fa as ga,g as h,ga as ha,h as i,ha as ia,i as j,ia as ja,j as k,ja as ka,k as l,ka as la,l as m,la as ma,m as n,ma as na,n as o,na as oa,o as p,oa as pa,p as q,pa as qa,q as r,qa as ra,r as s,ra as sa,s as t,sa as ta,t as u,ta as ua,u as v,ua as va,v as w,va as wa,w as x,wa as xa,x as y,xa as ya,y as z,ya as za,z as A,za as Aa}from"./chunk-7L2WUS2V.js";import{Ca as a}from"./chunk-L72ALLHJ.js";import"./chunk-7CGTOI24.js";export{l as APP_BASE_HREF,ka as AsyncPipe,i as BrowserPlatformLocation,za as CommonModule,xa as CurrencyPipe,pa as DATE_PIPE_DEFAULT_OPTIONS,oa as DATE_PIPE_DEFAULT_TIMEZONE,f as DOCUMENT,qa as DatePipe,va as DecimalPipe,r as FormStyle,t as FormatWidth,n as HashLocationStrategy,ra as I18nPluralPipe,sa as I18nSelectPipe,a as IMAGE_CONFIG,Ia as IMAGE_LOADER,ta as JsonPipe,ua as KeyValuePipe,h as LOCATION_INITIALIZED,o as Location,k as LocationStrategy,la as LowerCasePipe,Z as NgClass,_ as NgComponentOutlet,aa as NgFor,aa as NgForOf,$ as NgForOfContext,ba as NgIf,ca as NgIfContext,W as NgLocaleLocalization,V as NgLocalization,Pa as NgOptimizedImage,ga as NgPlural,ha as NgPluralCase,ia as NgStyle,da as NgSwitch,ea as NgSwitchCase,fa as NgSwitchDefault,ja as NgTemplateOutlet,p as NumberFormatStyle,u as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,m as PathLocationStrategy,wa as PercentPipe,g as PlatformLocation,q as Plural,ya as SlicePipe,ma as TitleCasePipe,s as TranslationWidth,na as UpperCasePipe,Ea as VERSION,Fa as ViewportScroller,v as WeekDay,Ha as XhrFactory,S as formatCurrency,R as formatDate,U as formatNumber,T as formatPercent,P as getCurrencySymbol,K as getLocaleCurrencyCode,J as getLocaleCurrencyName,I as getLocaleCurrencySymbol,D as getLocaleDateFormat,F as getLocaleDateTimeFormat,y as getLocaleDayNames,x as getLocaleDayPeriods,O as getLocaleDirection,A as getLocaleEraNames,M as getLocaleExtraDayPeriodRules,N as getLocaleExtraDayPeriods,B as getLocaleFirstDayOfWeek,w as getLocaleId,z as getLocaleMonthNames,H as getLocaleNumberFormat,G as getLocaleNumberSymbol,L as getLocalePluralCase,E as getLocaleTimeFormat,C as getLocaleWeekEndRange,Q as getNumberOfCurrencyDigits,Ca as isPlatformBrowser,Da as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,X as registerLocaleData,d as \u0275DomAdapter,Ga as \u0275NullViewportScroller,Aa as \u0275PLATFORM_BROWSER_ID,Ba as \u0275PLATFORM_SERVER_ID,e as \u0275PlatformNavigation,b as \u0275getDOM,j as \u0275normalizeQueryParams,Y as \u0275parseCookieValue,c as \u0275setRootDomAdapter};
|