@duplicati/ngclient 0.0.207 → 0.0.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunk-2DOT6WAE.js +1 -0
- package/{chunk-JJY6UOEY.js → chunk-2LSZ2I43.js} +1 -1
- package/chunk-2T442RZU.js +1 -0
- package/chunk-2V75WWT2.js +1 -0
- package/chunk-3A4HTZ7B.js +1 -0
- package/{chunk-PGISF7LM.js → chunk-3KMV4PTJ.js} +1 -1
- package/{chunk-3MS6SVET.js → chunk-3SSB4QCJ.js} +1 -1
- package/chunk-3WOW2XM3.js +1 -0
- package/{chunk-WLAJ3YIP.js → chunk-3ZCJK7PY.js} +1 -1
- package/{chunk-VNF7NNO5.js → chunk-47PB4WN3.js} +1 -1
- package/chunk-4FDBDI3J.js +1 -0
- package/chunk-4KNVWFT2.js +1 -0
- package/chunk-4QE3MT56.js +1 -0
- package/chunk-54PAHILA.js +1 -0
- package/{chunk-OVLGKJ3Z.js → chunk-5ECY4LSP.js} +1 -1
- package/chunk-5KQZMHFN.js +1 -0
- package/{chunk-VUKQJ766.js → chunk-5VSRHMHD.js} +1 -1
- package/{chunk-2FPYV4EW.js → chunk-64IX6ISO.js} +1 -1
- package/{chunk-OL5HI5OG.js → chunk-7B4AIHYK.js} +1 -1
- package/{chunk-G3FMV74P.js → chunk-7FYL7MVA.js} +1 -1
- package/{chunk-NJBOYRXU.js → chunk-7YLK4QIL.js} +1 -1
- package/{chunk-XHDAWK7I.js → chunk-7ZA3Q6TS.js} +1 -1
- package/chunk-AYCSIHGS.js +1 -0
- package/chunk-AYOFR344.js +1 -0
- package/chunk-AZFGZQQK.js +1 -0
- package/{chunk-QY5UGQ3R.js → chunk-AZJ2P3YU.js} +1 -1
- package/{chunk-GGW26MAG.js → chunk-B35WNLRM.js} +1 -1
- package/chunk-B6CAREL6.js +1 -0
- package/{chunk-NGKFJLI2.js → chunk-BEXYTIOL.js} +1 -1
- package/{chunk-V63YAEPZ.js → chunk-BKQA64HZ.js} +1 -1
- package/chunk-BMWZYMK6.js +1 -0
- package/chunk-BSYMQ4VF.js +1 -0
- package/chunk-BT44N2RL.js +2 -0
- package/{chunk-R4E5IO3A.js → chunk-C6RVYQ4M.js} +1 -1
- package/chunk-CJ5SZZQC.js +1 -0
- package/chunk-CNUQWXBC.js +1 -0
- package/chunk-COKAO446.js +1 -0
- package/chunk-CPI5ZQUF.js +1 -0
- package/chunk-ERITO7WM.js +4 -0
- package/chunk-FSFXGPH3.js +11 -0
- package/chunk-G6ZV6LAU.js +1 -0
- package/chunk-GG5S6RWM.js +1 -0
- package/{chunk-P7TJCJ64.js → chunk-GLR4FXRG.js} +1 -1
- package/{chunk-3QS6DB3O.js → chunk-GROPRXXJ.js} +1 -1
- package/{chunk-O3GGVB2B.js → chunk-HA7XREWO.js} +1 -1
- package/chunk-I2HYK2BL.js +1 -0
- package/{chunk-EG3PT3XW.js → chunk-I4XRVBRQ.js} +1 -1
- package/{chunk-RWDQ3L3C.js → chunk-ITA7DTN3.js} +1 -1
- package/chunk-IXUAJIIQ.js +1 -0
- package/{chunk-7HFTVA4J.js → chunk-IZCDGVXJ.js} +1 -1
- package/chunk-J33RTTTX.js +1 -0
- package/{chunk-CTQKCCGM.js → chunk-JKIZ6U22.js} +1 -1
- package/chunk-JW6W3ER7.js +1 -0
- package/chunk-K32ZRHDV.js +1 -0
- package/chunk-KQZNQ7RD.js +1 -0
- package/{chunk-VPUFUCR3.js → chunk-LGILJ5LY.js} +1 -1
- package/{chunk-NAMMULH4.js → chunk-LJBFPDG2.js} +1 -1
- package/{chunk-KUX6NGQU.js → chunk-LO5YNFFR.js} +1 -1
- package/chunk-LQKADAHT.js +1 -0
- package/{chunk-ZPIR5QIQ.js → chunk-LSF3JCSI.js} +1 -1
- package/{chunk-6COK7FLL.js → chunk-MAKVVEKB.js} +1 -1
- package/{chunk-LU7RSOI6.js → chunk-NBTTYKXH.js} +2 -2
- package/chunk-NCN2TOJR.js +1 -0
- package/chunk-NDLPNBGE.js +1 -0
- package/chunk-O7MDPYFW.js +1 -0
- package/chunk-ODHFI4PA.js +1 -0
- package/{chunk-XTFBRBQX.js → chunk-OISQ63OG.js} +1 -1
- package/chunk-OQ6BKP5N.js +1 -0
- package/{chunk-OOL5FC7N.js → chunk-P5MXBPC4.js} +1 -1
- package/{chunk-TBQPNXMN.js → chunk-Q5WLMQD4.js} +1 -1
- package/chunk-Q72Y55NB.js +1 -0
- package/chunk-R63C22I3.js +1 -0
- package/{chunk-AI6EYFMY.js → chunk-RC3UQLPB.js} +1 -1
- package/chunk-RCZGOO7K.js +1 -0
- package/{chunk-7E5J43IH.js → chunk-RFB5A3B7.js} +1 -1
- package/{chunk-FJFREVRV.js → chunk-SLS3DCJP.js} +1 -1
- package/{chunk-OWBBT5WF.js → chunk-SUY5AQLW.js} +1 -1
- package/chunk-U3SGWHNI.js +1 -0
- package/chunk-UCR4I5MD.js +1 -0
- package/{chunk-KLAJGS5T.js → chunk-UUQWSINE.js} +1 -1
- package/{chunk-VKNFRCHQ.js → chunk-VAQ435AR.js} +1 -1
- package/{chunk-UOZTEZ7B.js → chunk-VTFVTC7O.js} +1 -1
- package/{chunk-7MPZ3MRD.js → chunk-W4HWOC3K.js} +1 -1
- package/chunk-WOZTK7S5.js +2 -0
- package/{chunk-SIMG6PGZ.js → chunk-WQVQC2MC.js} +1 -1
- package/{chunk-MMF252RQ.js → chunk-WZV32HLQ.js} +1 -1
- package/{chunk-OAAXQ2BE.js → chunk-X64LSE6Y.js} +1 -1
- package/chunk-XQTUBHIK.js +1 -0
- package/chunk-YCLTQEU6.js +1 -0
- package/{chunk-GTZRHPRV.js → chunk-YQD4QIGG.js} +1 -1
- package/index.html +2 -2
- package/{main-DIGDM6JP.js → main-BYMMXHVT.js} +1 -1
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +2404 -2404
- package/{styles-377DNUNK.css → styles-6WG7TD6T.css} +1 -1
- package/chunk-23UYU3M3.js +0 -1
- package/chunk-2K74TI2N.js +0 -1
- package/chunk-2T4BMRWX.js +0 -2
- package/chunk-4HB376H3.js +0 -1
- package/chunk-4VYR5E5I.js +0 -1
- package/chunk-5MKFV3IB.js +0 -1
- package/chunk-5T2JCBPV.js +0 -1
- package/chunk-7JHU54QM.js +0 -1
- package/chunk-7PUXNL75.js +0 -1
- package/chunk-A57TBTOD.js +0 -1
- package/chunk-AG7H2MR5.js +0 -1
- package/chunk-AGMFKAHM.js +0 -1
- package/chunk-AZEV3A4R.js +0 -11
- package/chunk-C5OYK6UC.js +0 -2
- package/chunk-CAJQ2FEU.js +0 -1
- package/chunk-DKPWJYG3.js +0 -1
- package/chunk-DRRYACBV.js +0 -1
- package/chunk-I2T6IA4K.js +0 -1
- package/chunk-I6PR2AV2.js +0 -1
- package/chunk-I7MAEY3S.js +0 -1
- package/chunk-IAZGVY3O.js +0 -1
- package/chunk-IPGH33MU.js +0 -1
- package/chunk-JRXD2X7B.js +0 -1
- package/chunk-JWPG4EWG.js +0 -1
- package/chunk-KUGAORAS.js +0 -1
- package/chunk-KYTPZ3WD.js +0 -1
- package/chunk-L22UB6DH.js +0 -1
- package/chunk-NGPZXZJJ.js +0 -1
- package/chunk-PVWYJV5Y.js +0 -1
- package/chunk-QY4Y5NJB.js +0 -4
- package/chunk-R45TV6JI.js +0 -1
- package/chunk-RFCIV3AX.js +0 -1
- package/chunk-RJM43XMN.js +0 -1
- package/chunk-RNE4Z2E4.js +0 -1
- package/chunk-SFW3N5OL.js +0 -1
- package/chunk-SMUUHPDS.js +0 -1
- package/chunk-STB3WOIA.js +0 -1
- package/chunk-T2KOS3XX.js +0 -1
- package/chunk-VLMNSWR3.js +0 -1
- package/chunk-XZHXN75E.js +0 -1
- package/chunk-Y46QCSB5.js +0 -1
- package/chunk-Z2BNW4KI.js +0 -1
- package/chunk-ZFREX3ZV.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as At}from"./chunk-5MKFV3IB.js";import"./chunk-7MPZ3MRD.js";import{a as $t}from"./chunk-CTQKCCGM.js";import{a as yt}from"./chunk-VPUFUCR3.js";import"./chunk-23UYU3M3.js";import"./chunk-GGW26MAG.js";import"./chunk-FJFREVRV.js";import"./chunk-OWBBT5WF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import{a as ee}from"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import{a as ae}from"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import{a as x}from"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import{a as Ft}from"./chunk-NGKFJLI2.js";import{a as Et,c as ut}from"./chunk-KUX6NGQU.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-Y46QCSB5.js";import{d as Gt}from"./chunk-JJY6UOEY.js";import"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ac as J,Bb as N,Cb as s,Db as o,E as F,Eb as m,Lb as P,Pa as _t,Pc as v,Sa as l,Sb as O,Tb as h,Ub as _,Vb as V,Vc as gt,Wb as U,Xb as B,Yb as d,Z as R,_b as S,a as st,b as at,c as lt,ca as E,da as u,fb as b,fc as ct,gc as dt,jc as I,kb as oe,lb as rt,mc as $,nc as H,oa as c,oc as se,qa as k,rc as A,sb as Tt,sc as y,tb as St,tc as L,vb as C,wb as g,xc as Ct}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-JWPG4EWG.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
1
|
+
import{a as At}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import{a as $t}from"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{a as yt}from"./chunk-LGILJ5LY.js";import"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as ee}from"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as ae}from"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import{a as x}from"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import{a as Ft}from"./chunk-BEXYTIOL.js";import{a as Et,c as ut}from"./chunk-LO5YNFFR.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-YCLTQEU6.js";import{d as Gt}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as N,Bb as s,Cb as o,Db as m,E as F,Kb as P,Oa as _t,Pc as v,Ra as l,Rb as O,Sb as h,Tb as _,Ub as V,Vb as U,Wb as B,Wc as gt,Xb as d,Z as R,Zb as S,a as st,b as at,c as lt,ca as E,da as u,eb as b,ec as ct,fc as dt,ic as I,jb as oe,kb as rt,lc as $,mc as H,nc as se,oa as c,qa as k,qc as A,rb as Tt,rc as y,sb as St,sc as L,ub as C,vb as g,wc as Ct,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-IXUAJIIQ.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
2
2
|
registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=c($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(F(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updatingConsoleControl=c(!1);consoleControlDisabled=c(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;updateRemoteAccess(){let e=!this.allowRemoteAccess();this.allowRemoteAccess.set(e),this.#t.setRemoteAccessInterface(e?"any":"loopback").pipe(F(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(F(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(){let e=!this.consoleControlDisabled();this.updatingConsoleControl.set(!0),this.#t.setDisableConsoleControl(e).pipe(F(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=!this.disableTrayIconLogin();this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(F(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=c(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(e).pipe(F(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(F(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(yt);powerModeOptions=v(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=c(wt);timeTypeOptions=c(On);timeType=c("none");timeValue=Mn(0,300);timeRange=v(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),i=e==="none"||t===0?"":`${t}${e}`;i!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(i).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],i=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(i)?i:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(ae,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(ae,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#S(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let i=t[e].trim();if(i.startsWith("default-client="))return i.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-settings"]],decls:128,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let i;i=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let p;p=$localize`Language`;let M;M=$localize`Select a language for the platform`;let G;G=$localize`Use legacy interface`;let _e;_e=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let re;re=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=B(z);let Te;Te=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ce;ce=$localize`Allow remote access`;let de;de=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ee;Ee=$localize`Update channel`;let ue;ue=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let pe;pe=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Stable`;let me;me=$localize`Official stable release.`;let fe;fe=$localize`Beta`;let Ie;Ie=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Me;Me=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Re;Re=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Fe;Fe=$localize`Advanced options`;let $e;$e=$localize`Connect to console`;let Ae;Ae=$localize`Configure console control`;let ye;ye=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Le;Le=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ve;ve=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize`Toggle console connection status`;let xe;xe=$localize`Toggle the visibility of the console connection status indicator.`;let ke;ke=$localize`Console connection status is hidden`;let Je;Je=$localize`Console connection status is visible`;let Xe;Xe=$localize`Enter new password`;let ze;ze=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let Ve;Ve=$localize`Passphrase`;let Ue;Ue=$localize`Repeat passphrase`;let Be;Be=$localize`Cancel`;let He;He=$localize` Update passphrase `;let We;We=$localize` Update passphrase `;let qe;qe=$localize`Change password`;let je;je=$localize`Allowed hostnames`;let Ke;Ke=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Qe;Qe=$localize` Update allowed hostnames `;let Ye;Ye=$localize`Power mode provider`;let Ze;Ze=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let et;et=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tt;tt=$localize`Usage statistics`;let nt;nt=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let it;it=$localize`public usage statistics.`;let ot;return ot=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,[t,e,i,a,T,f,p,M,G,_e,re,z,Te,Se,ce,de,Ce,ge,Ee,ue,pe,Ne,me,fe,Ie,Pe,Me,Oe,he,Re,Ge,Fe,$e,Ae,ye,Le,ve,be,we,De,xe,ke,Je,Ve,Ue,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,nt,it,ot,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ze,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ie,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,i){if(e&1&&(m(0,"app-status-bar"),s(1,"div",59)(2,"header")(3,"div",60)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,ln,10,2),s(9,"section")(10,"div",61)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",62)(16,"div",63)(17,"img",64),d("click",function(){return i.setLightMode()}),o(),s(18,"img",65),d("click",function(){return i.setDarkMode()}),o()()()(),s(19,"section")(20,"div",61)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",66),C(26,cn,15,7)(27,Cn,4,1,"div",67),o()(),s(28,"section")(29,"div",61)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",62)(35,"sh-select",68)(36,"input",69),d("ngModelChange",function(T){return i.updateLocale(T)}),o()()()(),s(37,"section")(38,"div",61)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",70)(44,"button",71),d("click",function(){return i.openLegacyUI()}),O(45,10),m(46,"sh-icon"),h(),o(),s(47,"button",71),d("click",function(){return i.changeDefaultClientTo(i.defaultClient()==="ngclient"?"ngax":"ngclient")}),O(48,11),m(49,"sh-icon"),C(50,gn,2,0,"span")(51,En,2,0,"span"),h(),o()()(),s(52,"section")(53,"div",61)(54,"h3"),_(55,12),o(),s(56,"p"),_(57,13),o()(),s(58,"div",72)(59,"sh-toggle",73),d("click",function(){return i.updateRemoteAccess()}),s(60,"label"),_(61,14),o()(),C(62,un,8,3),o()(),s(63,"section")(64,"div",61)(65,"h3"),_(66,15),o(),s(67,"p"),_(68,16),o()(),s(69,"div",62)(70,"sh-toggle",73),d("click",function(){return i.saveDisableTrayIconLogin()}),s(71,"label"),_(72,17),o()()()(),C(73,pn,9,5,"section"),s(74,"section")(75,"div",61)(76,"h3"),_(77,18),o(),C(78,Nn,2,1,"p"),C(79,mn,1,0,"sh-progress-bar",74),o(),s(80,"div",75)(81,"div",76),d("click",function(){return i.setNewChannel("")}),s(82,"sh-radio",77),_(83,19),o(),s(84,"p"),_(85,20),o()(),s(86,"div",76),d("click",function(){return i.setNewChannel("stable")}),s(87,"sh-radio",77),_(88,21),o(),s(89,"p"),_(90,22),o()(),s(91,"div",76),d("click",function(){return i.setNewChannel("beta")}),s(92,"sh-radio",77),_(93,23),o(),s(94,"p"),_(95,24),o()(),s(96,"div",76),d("click",function(){return i.setNewChannel("experimental")}),s(97,"sh-radio",77),_(98,25),o(),s(99,"p"),_(100,26),o()(),s(101,"div",76),d("click",function(){return i.setNewChannel("canary")}),s(102,"sh-radio",77),_(103,27),o(),s(104,"p"),_(105,28),o()()()(),s(106,"section")(107,"div",61)(108,"h3"),_(109,29),o(),s(110,"p"),_(111,30),o()(),s(112,"div",62)(113,"div",78)(114,"sh-range-slider",79)(115,"input",80),L("ngModelChange",function(T){return y(i.timeValue,T)||(i.timeValue=T),T}),d("ngModelChange",function(T){return i.updateTimeValue(T)}),o()(),s(116,"sh-select",81)(117,"input",82),d("ngModelChange",function(T){return i.updateTimeType(T)}),o(),oe(118,fn,1,1,"ng-template"),o()()()(),C(119,Pn,17,5,"section"),o(),m(120,"sh-divider"),s(121,"div",59)(122,"section")(123,"div",83)(124,"h3"),_(125,31),o(),m(126,"app-advanced-options-settings"),o()()(),m(127,"sh-divider")),e&2){let a,T,f;l(8),g(i.isUsingRelay()?-1:8),l(9),I("active",!i.isDarkMode()),l(),I("active",i.isDarkMode()),l(8),g(i.showPassphraseForm()?26:27),l(9),N("options",i.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),N("ngModel",i.langCtrl())("ngModelOptions",J(42,ne)),l(14),g(i.defaultClient()==="ngax"?50:51),l(9),I("active",i.allowRemoteAccess()),l(3),g(i.allowRemoteAccess()?62:-1),l(8),I("active",i.disableTrayIconLogin()),l(3),g(i.powerModeOptions().length>0?73:-1),l(5),g((a=i.sysinfo())!=null&&a.ServerVersion?78:-1),l(),g(i.updatingChannel()?79:-1),l(3),I("active",i.updateChannel()===""),l(),V((T=i.sysinfo())==null?null:T.DefaultUpdateChannel),U(83),l(2),V((f=i.sysinfo())==null?null:f.ServerVersionType),U(85),l(2),I("active",i.updateChannel()==="stable"),l(5),I("active",i.updateChannel()==="beta"),l(5),I("active",i.updateChannel()==="experimental"),l(5),I("active",i.updateChannel()==="canary"),l(12),N("unit",i.timeType()==="none"?"s":i.timeType()),l(),N("min",i.timeRange()[0])("max",i.timeRange()[1])("disabled",i.timeType()==="none"),A("ngModel",i.timeValue),N("ngModelOptions",J(43,ne)),l(),N("options",i.timeTypeOptions())("isClearable",!1),l(),N("ngModel",i.timeType()),l(2),g(i.usageStatisticsDisabled()?-1:119)}},dependencies:[K,W,pt,q,j,Q,At,te,X,D,Pt,Mt,It,ht,Rt,Z,w,ft,Y,Ot],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{Mn as debounceSignal,le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ta as de}from"./chunk-VLMNSWR3.js";import{a as M,b as ie,c as ae,g as ce,h as le}from"./chunk-VKNFRCHQ.js";import{$ as Y,Aa as j,Da as A,Ea as y,Fa as E,Ga as K,Ha as X,Ia as W,Ja as q,Ka as Q,La as ee,Ma as te,Na as g,R as m,Ta as w,U as u,Ua as ne,Va as re,X as S,Y as a,Za as oe,ad as se,ha as f,la as P,ma as k,wa as Z,xa as U,ya as J,za as C}from"./chunk-QY4Y5NJB.js";import{a as H}from"./chunk-7CGTOI24.js";var _=class{_doc;constructor(n){this._doc=n}manager},b=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),N=new S(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(i=>{i.manager=this});let o=e.filter(i=>!(i instanceof b));this._plugins=o.slice().reverse();let s=e.find(i=>i instanceof b);s&&this._plugins.push(s)}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new m(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(N),a(P))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),x="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Ee(r,n,e,t){let o=r.head?.querySelectorAll(`style[${x}="${n}"],link[${x}="${n}"]`);if(o)for(let s of o)s.removeAttribute(x),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,Ee(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(f),a(U),a(j,8),a(C))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),B={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},G=/%COMP%/g;var me="%COMP%",Se=`_nghost-${me}`,we=`_ngcontent-${me}`,Me=!0,_e=new S("",{factory:()=>Me});function Te(r){return we.replace(G,r)}function De(r){return Se.replace(G,r)}function ge(r,n){return n.map(e=>e.replace(G,r))}var $=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,o,s,i,c,d=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.ngZone=c,this.nonce=d,this.tracingService=l,this.defaultRenderer=new T(e,i,c,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof D&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.tracingService;switch(t.encapsulation){case A.Emulated:s=new O(d,l,t,this.appId,p,i,c,h);break;case A.ShadowDom:return new I(d,e,t,i,c,this.nonce,h,l);case A.ExperimentalIsolatedShadowDom:return new I(d,e,t,i,c,this.nonce,h);default:s=new D(d,l,t,p,i,c,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(U),a(_e),a(f),a(P),a(j),a(re,8))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),T=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(B[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new m(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=B[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=B[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(w.DashCase|w.Important)?n.style.setProperty(e,t,o&w.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&w.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=M().getGlobalEventTarget(this.doc,n),!n))throw new m(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var I=class extends T{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,t,o,s,i,c,d){super(n,o,s,c),this.hostEl=e,this.sharedStylesHost=d,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=t.styles;l=ge(t.id,l);for(let h of l){let v=document.createElement("style");i&&v.setAttribute("nonce",i),v.textContent=h,this.shadowRoot.appendChild(v)}let p=t.getExternalStyles?.();if(p)for(let h of p){let v=F(h,o);i&&v.setAttribute("nonce",i),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},D=class extends T{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=d?ge(d,l):l,this.styleUrls=t.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ne.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends D{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,l),this.contentAttr=Te(l),this.hostAttr=De(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var L=class r extends ae{supportsDOMEvents=!0;static makeCurrent(){ie(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=be();return e==null?null:Ie(e)}resetBaseElement(){R=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ce(document.cookie,n)}},R=null;function be(){return R=R||document.head.querySelector("base"),R?R.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Oe=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},ye=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>M().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(l=>{let p=t.indexOf(l);p>-1&&(t.splice(p,1),i+=l+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=Le[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})();async function He(r,n,e){let t=H({rootComponent:r},Pe(n,e));return se(t)}function Pe(r,n){return{platformRef:n?.platformRef,appProviders:[...Be,...r?.providers??[]],platformProviders:xe}}function ke(){L.makeCurrent()}function Ue(){return new k}function je(){return Z(document),document}var xe=[{provide:C,useValue:de},{provide:J,useValue:ke,multi:!0},{provide:f,useFactory:je}];var Be=[{provide:Y,useValue:"root"},{provide:k,useFactory:Ue},{provide:N,useClass:b,multi:!0},{provide:N,useClass:ye,multi:!0},$,z,V,{provide:oe,useExisting:$},{provide:le,useClass:Oe},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Ve=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(ze),o},providedIn:"root"})}return r})(),ze=(()=>{class r extends Ve{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return E(t,"HTML")?y(t):te(this._doc,String(t)).toString();case g.STYLE:return E(t,"Style")?y(t):t;case g.SCRIPT:if(E(t,"Script"))return y(t);throw new m(5200,!1);case g.URL:return E(t,"URL")?y(t):ee(String(t));case g.RESOURCE_URL:if(E(t,"ResourceURL"))return y(t);throw new m(5201,!1);default:throw new m(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return X(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{He as a,Ft as b,Ve as c};
|
|
1
|
+
import{va as de}from"./chunk-OQ6BKP5N.js";import{a as M,b as ie,c as ae,g as ce,h as le}from"./chunk-VAQ435AR.js";import{$ as Y,Ca as A,Da as y,Ea as E,Fa as K,Ga as X,Ha as W,Ia as q,Ja as Q,Ka as ee,La as te,Ma as g,R as m,Sa as w,Ta as ne,U as u,Ua as re,X as S,Y as a,Ya as oe,bd as se,ha as f,la as P,ma as k,va as Z,wa as U,xa as J,ya as C,za as j}from"./chunk-ERITO7WM.js";import{a as H}from"./chunk-7CGTOI24.js";var _=class{_doc;constructor(n){this._doc=n}manager},b=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),N=new S(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(i=>{i.manager=this});let o=e.filter(i=>!(i instanceof b));this._plugins=o.slice().reverse();let s=e.find(i=>i instanceof b);s&&this._plugins.push(s)}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new m(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(N),a(P))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),x="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Ee(r,n,e,t){let o=r.head?.querySelectorAll(`style[${x}="${n}"],link[${x}="${n}"]`);if(o)for(let s of o)s.removeAttribute(x),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,Ee(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(f),a(U),a(j,8),a(C))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),B={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},G=/%COMP%/g;var me="%COMP%",Se=`_nghost-${me}`,we=`_ngcontent-${me}`,Me=!0,_e=new S("",{factory:()=>Me});function Te(r){return we.replace(G,r)}function De(r){return Se.replace(G,r)}function ge(r,n){return n.map(e=>e.replace(G,r))}var $=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,o,s,i,c,d=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.ngZone=c,this.nonce=d,this.tracingService=l,this.defaultRenderer=new T(e,i,c,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof D&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.tracingService;switch(t.encapsulation){case A.Emulated:s=new O(d,l,t,this.appId,p,i,c,h);break;case A.ShadowDom:return new I(d,e,t,i,c,this.nonce,h,l);case A.ExperimentalIsolatedShadowDom:return new I(d,e,t,i,c,this.nonce,h);default:s=new D(d,l,t,p,i,c,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(U),a(_e),a(f),a(P),a(j),a(re,8))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),T=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(B[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new m(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=B[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=B[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(w.DashCase|w.Important)?n.style.setProperty(e,t,o&w.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&w.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=M().getGlobalEventTarget(this.doc,n),!n))throw new m(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var I=class extends T{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,t,o,s,i,c,d){super(n,o,s,c),this.hostEl=e,this.sharedStylesHost=d,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=t.styles;l=ge(t.id,l);for(let h of l){let v=document.createElement("style");i&&v.setAttribute("nonce",i),v.textContent=h,this.shadowRoot.appendChild(v)}let p=t.getExternalStyles?.();if(p)for(let h of p){let v=F(h,o);i&&v.setAttribute("nonce",i),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},D=class extends T{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=d?ge(d,l):l,this.styleUrls=t.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ne.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends D{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,l),this.contentAttr=Te(l),this.hostAttr=De(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var L=class r extends ae{supportsDOMEvents=!0;static makeCurrent(){ie(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=be();return e==null?null:Ie(e)}resetBaseElement(){R=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ce(document.cookie,n)}},R=null;function be(){return R=R||document.head.querySelector("base"),R?R.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Oe=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},ye=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>M().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(l=>{let p=t.indexOf(l);p>-1&&(t.splice(p,1),i+=l+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=Le[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})();async function He(r,n,e){let t=H({rootComponent:r},Pe(n,e));return se(t)}function Pe(r,n){return{platformRef:n?.platformRef,appProviders:[...Be,...r?.providers??[]],platformProviders:xe}}function ke(){L.makeCurrent()}function Ue(){return new k}function je(){return Z(document),document}var xe=[{provide:C,useValue:de},{provide:J,useValue:ke,multi:!0},{provide:f,useFactory:je}];var Be=[{provide:Y,useValue:"root"},{provide:k,useFactory:Ue},{provide:N,useClass:b,multi:!0},{provide:N,useClass:ye,multi:!0},$,z,V,{provide:oe,useExisting:$},{provide:le,useClass:Oe},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Ve=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(ze),o},providedIn:"root"})}return r})(),ze=(()=>{class r extends Ve{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return E(t,"HTML")?y(t):te(this._doc,String(t)).toString();case g.STYLE:return E(t,"Style")?y(t):t;case g.SCRIPT:if(E(t,"Script"))return y(t);throw new m(5200,!1);case g.URL:return E(t,"URL")?y(t):ee(String(t));case g.RESOURCE_URL:if(E(t,"ResourceURL"))return y(t);throw new m(5201,!1);default:throw new m(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return X(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{He as a,Ft as b,Ve as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-HA7XREWO.js";import{a as H}from"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import{a as q}from"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,v as V,w as J}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{d as A,e as I}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as y,Bb as r,Cb as l,Db as T,Dc as $,Kb as f,Pc as O,Ra as a,Rb as S,Sb as P,Tb as p,Vc as v,Wb as D,Xb as h,Z as E,Zb as s,ca as m,da as F,eb as b,kc as x,lc as d,oa as N,qa as M,qc as w,rc as L,sc as k,ub as c,vb as _}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(Q);#n=E(q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-B35WNLRM.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,v as k,x as L,z as w}from"./chunk-YCLTQEU6.js";import{d as J}from"./chunk-2LSZ2I43.js";import{d as O,e as M}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as p,Bb as a,Cb as i,Db as u,E as T,Ra as l,Rb as D,Sb as h,Tb as _,Wb as I,Xb as d,Z as s,eb as f,ic as P,oa as c,ub as C,vb as S,zc as N}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,g=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loading",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as St}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{a as Ct,b as pt,c as mt,l as k,q as Tt}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as dt,c as ut,d as gt}from"./chunk-LSF3JCSI.js";import"./chunk-I2HYK2BL.js";import{a as ct}from"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as R}from"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as st,C as at,G as lt,H as rt,L as _t,c as Z,e as tt,i as et,s as nt,v as it,z as ot}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Bb as a,Cb as _,Db as x,Kb as T,Pc as y,Ra as c,Rb as B,Sb as P,Tb as d,Ub as K,Vb as W,Wb as j,Wc as Y,Xb as m,Z as O,Zb as r,ca as u,da as g,eb as V,ec as Q,fc as q,ic as H,lc as D,mc as A,oa as f,qa as G,qc as M,rc as N,sc as $,ub as C,vb as p,wb as z,yb as J,zb as X}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";function Dt(n,e){n&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function ft(n,e){n&1&&(a(0,"sh-divider"),d(1,5),_())}function Et(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit;c(),A(t.Description)}}function Ft(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit,o=r(3);c(),A(o.getSimplePath(t.BaseUrl))}}function It(n,e){if(n&1){let t=T();a(0,"button",25),m("click",function(i){u(t);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,i))}),D(1," Update backups "),_()}if(n&2){let t=r(4);E("disabled",t.isSaving())}}function Nt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",18),m("click",function(){let i=u(t).$implicit,s=r(3);return g(s.selectDestination(i))}),a(1,"h3",19),D(2),_(),C(3,Et,2,1,"p",20)(4,Ft,2,1,"p",20),a(5,"div",21),C(6,It,2,1,"button",22),a(7,"button",23),m("click",function(i){let s=u(t).$implicit,l=r(3);return g(l.deleteDestination(s.ID,i))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),B(11,6),x(12,"sh-icon"),P(),_()()()}if(n&2){let t=e.$implicit,o=r(3);E("targetUrl",t.BaseUrl),c(2),A(t.Name||t.BaseUrl),c(),p(t.Description?3:4),c(3),p(o.isOutOfSync(t)?6:-1)}}function ht(n,e){if(n&1){let t=T();a(0,"sh-card",16),m("click",function(){u(t);let i=r(2);return g(i.selectDestination("new"))}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,ft,2,0,"sh-divider"),J(9,Nt,13,4,"app-destination-list-item",17,z)}if(n&2){let t=r(2);c(8),p(t.destinations().length>0?8:-1),c(),X(t.destinations())}}function Ot(n,e){if(n&1&&(a(0,"h2"),d(1,1),_(),C(2,Dt,5,0,"div",13)(3,ht,11,1)),n&2){let t=r();c(2),p(t.isLoading()?2:3)}}function xt(n,e){n&1&&d(0,10,1)}function Bt(n,e){n&1&&d(0,10,2)}function Pt(n,e){n&1&&d(0,10,3)}function At(n,e){if(n&1){let t=T();a(0,"button",37),m("click",function(){u(t);let i=r(2);return g(i.testDestination())}),B(1,10),C(2,xt,1,0)(3,Bt,1,0)(4,Pt,1,0),P(),_()}if(n&2){let t,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((t=o.testResponse())==null?null:t.action)==="success"?3:4)}}function Mt(n,e){if(n&1){let t=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),$("ngModelChange",function(i){u(t);let s=r(2);return N(s.editName,i)||(s.editName=i),g(i)}),_()()()}if(n&2){let t=r(2);c(4),M("ngModel",t.editName)}}function $t(n,e){if(n&1){let t=T();a(0,"app-test-url",39,0),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)})("testSignalChange",function(i){u(t);let s=r(2);return N(s.testSignal,i)||(s.testSignal=i),g(i)}),_()}if(n&2){let t=r(2);M("targetUrl",t.editBaseUrl)("testSignal",t.testSignal),E("connectionStringId",t.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("moduleType","Backend")}}function yt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(t);let i=r(2);return g(i.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)}),_()}if(n&2){let t=r(2);E("targetUrl",t.editBaseUrl()),c(3),M("targetUrl",t.editBaseUrl)}}function Rt(n,e){if(n&1){let t=T();a(0,"app-destination-list",43),m("setDestination",function(i){u(t);let s=r(2);return g(s.setDestination(i))}),_()}}function kt(n,e){n&1&&d(0,9,1)}function Lt(n,e){n&1&&d(0,9,2)}function bt(n,e){n&1&&d(0,9,3)}function wt(n,e){n&1&&d(0,9,4)}function vt(n,e){if(n&1){let t=T();a(0,"header",26)(1,"button",23),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,At,5,2,"button",31),_()(),C(11,Mt,5,1,"div",32),C(12,$t,2,9,"app-test-url",33),C(13,yt,4,2)(14,Rt,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let i;u(t);let s=r();return g(((i=s.testResponse())==null?null:i.action)==="success"||((i=s.testResponse())==null?null:i.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),B(19,9),C(20,kt,1,0)(21,Lt,1,0)(22,bt,1,0)(23,wt,1,0),P(),_()()()}if(n&2){let t,o,i,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((t=l.testResponse())==null?null:t.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((i=l.testResponse())==null?null:i.action)!=="success"&&((i=l.testResponse())==null?null:i.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var L=class n{#t=O(Ct);#e=O(ct);#n=O(ot);getSimplePath=dt;backups=this.#e.backups;constructor(){this.#e.getBackups()}isSaving=this.#t.isSaving;destinations=this.#t.destinations;isLoading=this.#t.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=y(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=y(()=>{let e=this.editBaseUrl(),t=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:e!==t});testSignal=f(null);testResponse=y(()=>{let e=this.testSignal();return e&&typeof e!="string"?e:null});getOutOfSyncBackupIds(e){if(!e.Backups)return[];let t=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return e.Backups.filter(o=>{let i=t.get(o.ID);return i&&i.TargetURL!==e.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(e){return this.getOutOfSyncBackupIds(e).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(e){this.selectedDestination.set(e),this.testSignal.set(null),e==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(e.Name),this.editDescription.set(e.Description),this.editBaseUrl.set(e.BaseUrl),this.initialBaseUrl.set(e.BaseUrl),this.#t.getById(e.ID).subscribe(t=>{t.Data&&(this.editName.set(t.Data.Name),this.editDescription.set(t.Data.Description),this.editBaseUrl.set(t.Data.BaseUrl??null),this.initialBaseUrl.set(t.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(e){let t=gt(e??"");if(t){if(t.mapper.default){let o=t.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${e}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open(R,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:e=>{e&&this.testUrl()?.createFolder()}})}save(){let e=this.selectedDestination();e&&this.performSave(e)}performSave(e){let t=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(e==="new"){let I=ut(i??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;t=`${I} #${h+1}`,o=null}let s={Name:t,Description:o,BaseUrl:i};this.#t.save(e,s).subscribe(()=>{this.selectedDestination.set(null),this.#t.reload(),this.#e.getBackups(!0)})}updateBackupsSync(e,t){t.stopPropagation();let o=this.getOutOfSyncBackupIds(e);this.#n.open(R,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#t.updateBackups(e.ID,o).subscribe(()=>{this.#t.reload(),this.#e.getBackups(!0)})}})}deleteDestination(e,t){t.stopPropagation(),this.#n.open(R,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#t.delete(e).subscribe(()=>{this.#t.reload()})}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-destinations"]],viewQuery:function(t,o){t&1&&Q(o.testUrl,k,5),t&2&&q()},decls:4,vars:1,consts:()=>{let e;e=$localize`Destinations`;let t;t=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let v;v=$localize`Name`;let U;return U=$localize`Change`,[["testUrl",""],e,t,o,i,s,l,I,h,F,b,v,U,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button","variant","ghost",1,"small",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button","variant","ghost",1,"small",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button","variant","ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(t,o){t&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Ot,4,1)(3,vt,24,13),_()),t&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pt,mt,Tt,St,_t,st,it,at,rt,lt,k,nt,Z,tt,et],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Oc as f,Pc as w,R as d,Rc as x,Sc as h,Z as v,ga as y,i as m,ia as l,oa as b,qa as D}from"./chunk-ERITO7WM.js";import{a as g,b as p}from"./chunk-7CGTOI24.js";function N(s,e){let o=e?.injector??v(y),n=new m(1),i=D(()=>{let t;try{t=s()}catch(u){f(()=>n.error(u));return}f(()=>n.next(t))},{injector:o,manualCleanup:!0});return o.get(l).onDestroy(()=>{i.destroy(),n.complete()}),n.asObservable()}function E(s,e){let n=!e?.manualCleanup?e?.injector?.get(l)??v(l):null,i=j(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u,a=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.()},complete:()=>{u?.()}});if(e?.requireSync&&t().kind===0)throw new d(601,!1);return u=n?.onDestroy(a.unsubscribe.bind(a)),w(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new d(601,!1)}},{equal:e?.equal})}function j(s=Object.is){return(e,o)=>e.kind===1&&o.kind===1&&s(e.value,o.value)}function U(s){return x(p(g({},s),{loader:void 0,stream:e=>{let o,n=()=>o?.unsubscribe();e.abortSignal.addEventListener("abort",n);let i=b({value:void 0}),t,u=new Promise(c=>t=c);function a(c){i.set(c),t?.(i),t=void 0}let r=s.stream;if(r===void 0)throw new d(990,!1);return o=r(e).subscribe({next:c=>a({value:c}),error:c=>{a({error:h(c)}),e.abortSignal.removeEventListener("abort",n)},complete:()=>{t&&a({error:new d(991,!1)}),e.abortSignal.removeEventListener("abort",n)}}),u}}))}export{N as a,E as b,U as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{U as S}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{c as u,e as N,f as c}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Bb as e,Cb as t,Db as T,Tb as n,eb as g}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[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&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-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"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-LO5YNFFR.js";import{Z as m,a as S,b as i,oa as c}from"./chunk-ERITO7WM.js";function u(...a){let e=c(...a);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}function A(a,e,o=!1,s){let l=m(f);e=l.getItemParsed(a,o)??e;let n=u(e),r=n[S];s?.equal&&(r.equal=s.equal);function g(t){t==null?l.removeItem(a):l.setItemParsed(a,t,o)}return n.set=t=>{g(t),i(r,t)},n.update=t=>{let T=t(n());g(T),i(r,T)},n}export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-AZJ2P3YU.js";import{b as B}from"./chunk-UUQWSINE.js";import{a as k}from"./chunk-BEXYTIOL.js";import{d as b}from"./chunk-2LSZ2I43.js";import{C as i,E as u,M as c,Pc as d,U as o,Z as s,oa as a,qa as p}from"./chunk-ERITO7WM.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as tt}from"./chunk-BT44N2RL.js";import{k as Ze,m as et}from"./chunk-FSFXGPH3.js";import{a as re}from"./chunk-Q72Y55NB.js";import{a as Ke}from"./chunk-I4XRVBRQ.js";import{a as M}from"./chunk-RFB5A3B7.js";import{b as _e}from"./chunk-AYOFR344.js";import{b as Qe}from"./chunk-UUQWSINE.js";import{a as K}from"./chunk-BEXYTIOL.js";import{B as j,H as Xe,L as Ue,M as Ye,P as He,V as je,W as qe,b as Be,c as W,e as B,f as V,i as Ve,j as z,l as ze,p as J,q as X,r as U,s as Je,t as Y,v as H,z as se}from"./chunk-YCLTQEU6.js";import{d as q}from"./chunk-2LSZ2I43.js";import{b as P,d as I}from"./chunk-BMWZYMK6.js";import{ha as ne}from"./chunk-OQ6BKP5N.js";import{Ab as S,Bb as r,C as Q,Cb as a,Db as c,E as h,Ec as le,Fc as we,Gc as We,H as Me,Hb as b,Ib as A,K as De,Kb as w,L as ee,Pc as N,Ra as d,Rb as m,Sb as T,Tb as O,U as Le,Ub as $e,Vb as be,Xb as f,Z as p,Zb as C,ca as y,da as $,eb as k,g as Re,ic as Ae,jb as ye,lc as v,m as he,nc as ve,oa as u,oc as Ge,qa as x,qc as te,rc as oe,sc as ie,ub as g,v as ae,vb as E,w as Pe,yc as xe,z as Ie,zc as ke}from"./chunk-ERITO7WM.js";function lt(n,t){n&1&&(r(0,"p"),O(1,3),a())}function _t(n,t){n&1&&(r(0,"sh-form-field")(1,"label",11),O(2,4),a(),c(3,"input",12),a())}var ot=new U,st=()=>ot.group({passphrase:ot.control("")}),ue=class n{#e=p(q);#t=p(D);#n=p(I);#i=p(P);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=u(!1);settings=u([]);hasEncryptedBackup=N(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=u(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(i=>{let s=i.Name?.trim();s&&s!=="--"&&(s.startsWith("--")||(s=`--${s}`),o.push({Name:s,Value:i.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(h(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:i=>{let s=i.ID;this.#n.navigate([`/restore-draft/${s}`])},error:i=>{console.error(i)}})}back(){this.#t.isFileRestore()?this.#n.navigate(["destination"],{relativeTo:this.#i.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`The backup does not contain encrypted files.`;let s;s=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,i,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",s,"formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"form",5),f("submit",function(){return o.next()}),g(1,lt,2,0,"p"),g(2,_t,4,0,"sh-form-field"),r(3,"sh-toggle-card"),b(4,6),O(5,0),A(),r(6,"app-options-list",7),ie("optionsChange",function(s){return oe(o.settings,s)||(o.settings=s),s}),a()(),r(7,"div",8)(8,"button",9),f("click",function(){return o.back()}),m(9,1),c(10,"sh-icon"),T(),a(),r(11,"button",10),m(12,2),c(13,"sh-icon"),T(),a()()()),e&2&&(S("formGroup",o.encryptionForm),d(),E(o.hasEncryptedBackup()?-1:1),d(),E(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),d(4),te("options",o.settings),S("hasFreeTextSettings",!0))},dependencies:[Y,z,W,B,V,X,J,Xe,H,j,je,tt],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ut=()=>({standalone:!0});function ct(n,t){n&1&&c(0,"sh-progress-bar",8)}function pt(n,t){if(n&1&&(v(0),le(1,"bytes")),n&2){let e=C().$implicit;ve(" (",we(1,1,e.FileSizes),") ")}}function dt(n,t){n&1&&(r(0,"span",16),O(1,4),a())}function mt(n,t){if(n&1&&(r(0,"div",15),v(1),le(2,"date"),g(3,pt,2,3),g(4,dt,2,0,"span",16),a()),n&2){let e=t.$implicit;d(),Ge(" ",e.Version,": ",We(2,4,e.Time,"medium")," "),d(2),E(e.FileSizes?3:-1),d(),E(e.IsFullBackup===!1?4:-1)}}function Tt(n,t){n&1&&c(0,"sh-progress-bar",8)}function Ft(n,t){if(n&1){let e=w();r(0,"app-file-tree",17),f("hasExtendedData",function(i){y(e);let s=C(2);return $(s.extendedDataType.set(i))}),r(1,"label",18),O(2,5),a(),c(3,"input",19),a()}if(n&2){let e=C(2);S("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)}}function St(n,t){if(n&1){let e=w();r(0,"sh-select",12),f("cleared",function(){y(e);let i=C();return $(i.abortLoading())}),r(1,"input",13),ie("ngModelChange",function(i){y(e);let s=C();return oe(s.selectOption,i)||(s.selectOption=i),$(i)}),a(),ye(2,mt,5,7,"ng-template"),a(),g(3,Tt,1,0,"sh-progress-bar",8),g(4,Ft,4,6,"app-file-tree",14)}if(n&2){let e=C();S("options",e.versionOptions())("isClearable",!1),d(),te("ngModel",e.selectOption),S("ngModelOptions",ke(6,ut)),d(2),E(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),E(e.showFileTree()?4:-1)}}var pe=new U,rt=()=>pe.group({filesToRestore:pe.control(""),passphrase:pe.control(null)}),de=class n{#e=p(q);#t=p(D);#n=p(Qe);#i=p(K);#o=p(I);#s=p(P);#a=p(ne);#l=null;#_=null;#r=u([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=N(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=u(!1);backupSettings=u(null);rootPaths=u([]);initialNodes=u([]);loadingRootPath=u(!1);isRepairing=N(()=>this.#r().length>0);loadedVersions=u({});loadingEffect=x(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString())}});backupSettingsEffect=x(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),i=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(Z=>Z.Version===parseInt(e))?.Time??null;if(!l)return;let _=`${t}+${l}`,R=i[_];if(this.needsDatabaseRepair()&&(!R||o))return;let L={id:t+"",time:l};this.backupSettings.set(L),this.getRootPath(L)});repairEffect=x(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let i=this.backupId(),s=`${i}+${o.Time}`;if(this.#_===s||(this.#_=s,this.#r().includes(s)))return;this.#r.update(l=>[...l,s]),this.#e.postApiV1BackupByIdRepairupdate({id:i,requestBody:{only_paths:!0,time:o.Time}}).pipe(ee(this.abortLoading$),h(()=>{this.#_=null})).subscribe(l=>{let _=l.ID;this.#n.waitForTaskToComplete(_).pipe(Q(1)).subscribe(()=>{this.#r.update(R=>R.filter(L=>L!==s)),this.loadedVersions.update(R=>(R[s]=!0,R))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#i.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:!0}}).pipe(ee(this.abortLoading$),h(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:i=>{let s=(i.Data??[]).find(_=>_.Metadata&&_.Metadata.ExtType&&_.Metadata.ExtType.length>0);s&&this.extendedDataType.set(s.Metadata.ExtType);let l=(i.Data??[]).map(_=>_.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ee(this.abortLoading$),h(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:i=>{let s=i.Files.map(l=>l.Path??"");s.length>0?(this.initialNodes.set([]),this.rootPaths.set(s)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Re;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(i=>typeof i.Version=="number"&&i.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-select-files"]],features:[xe([ne])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let i;i=$localize`Select an option...`;let s;s=$localize`(partial)`;let l;return l=$localize`Path`,[["formRef",""],t,e,o,s,l,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",i,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,o){e&1&&(r(0,"form",6,0),f("submit",function(){return o.next()}),r(2,"h3",7),O(3,1),a(),g(4,ct,1,0,"sh-progress-bar",8)(5,St,5,7),r(6,"div",9)(7,"button",10),f("click",function(){return o.back()}),m(8,2),c(9,"sh-icon"),T(),a(),r(10,"button",11),m(11,3),c(12,"sh-icon"),T(),a()()()),e&2&&(S("formGroup",o.selectFilesForm),d(4),E(o.versionOptionsLoading()?4:5),d(5),$e(o.isFileRestore()?"Back":"Exit"),be(8))},dependencies:[Je,z,W,B,V,Ve,Y,X,J,re,j,H,He,Ue,ne,Ke],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var D=class n{#e=p(I);#t=p(P);#n=p(K);#i=p(se);#o=p(q);backupId=u(null);backup=u(null);destinationTargetUrl=u(null);destinationTestSignal=u(null);selectFilesForm=rt();optionsForm=at();encryptionForm=st();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=u(null);versionOptionsLoading=u(!1);versionOptions=u([]);isSubmitting=u(!1);isFileRestore=u(!1);isFullWidthPage=u(!1);extendedDataType=u(null);alternateRestorePath=u(null);alternateRestorePathSourcePrefix=u(null);init(t,e=!1){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup()}updateTargetUrl(t){this.destinationTargetUrl.set(t)}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#s(o.ID??"")},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#i.open(M,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,i=this.selectOption(),s=this.versionOptions()?.find(l=>l.Version===(i&&parseInt(i)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(h(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#i.open(M,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Ie(o=>{let i=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return i==="EncryptedStorageNoPassphrase"||i==="FolderMissing"||i==="EmptyRemoteFolder"||e===0?he(()=>o):Pe(1e3).pipe(De(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#n.hasV2ListOperations()?ae([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Q(1),h(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#i.open(M,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,i=o==="EncryptedStorageNoPassphrase",s=o==="FolderMissing",l=o==="EmptyRemoteFolder",_=$localize`An error occurred while loading the backup filesets: ${e.message}`;i&&(_=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),s&&(_=$localize`The backup storage folder was not found.`),l&&(_=$localize`The backup storage folder does not contain any filesets.`),this.#i.open(M,{data:{title:$localize`Failed to load backup filesets`,message:_,confirmText:$localize`OK`,cancelText:void 0},closed:R=>{this.#e.navigate([i?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ae([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Me(3))]).pipe(Q(1),h(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(i=>({Version:i.Version??-1,IsFullBackup:(i.IsFullBackup??1)==1,Time:i.Time??"<missing>",FileCount:i.FileCount??void 0,FileSizes:i.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Le({token:n,factory:n.\u0275fac,providedIn:"root"})};function gt(n,t){if(n&1){let e=w();r(0,"sh-radio",27),m(1,6),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,7),r(5,"input",32),f("click",function(){y(e);let i=C(2);return $(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Et(n,t){if(n&1){let e=w();r(0,"sh-radio",27),m(1,8),c(2,"input",31),T(),a(),r(3,"sh-radio",27),m(4,9),r(5,"input",32),f("click",function(){y(e);let i=C(2);return $(i.chooseCustomRemoteDestination())}),a(),T(),a()}}function Ot(n,t){if(n&1&&(r(0,"app-file-tree",29)(1,"label",33),v(2,"Path"),a(),c(3,"input",34),a()),n&2){let e,o=C(2);S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Ct(n,t){if(n&1&&(r(0,"app-file-tree",30)(1,"label",33),v(2,"Path"),a(),c(3,"input",34),a()),n&2){let e=C(2);S("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl())}}function Nt(n,t){if(n&1&&(g(0,gt,6,0)(1,Et,6,0),r(2,"sh-radio",27),m(3,5),c(4,"input",28),T(),a(),g(5,Ot,4,2,"app-file-tree",29),g(6,Ct,4,4,"app-file-tree",30)),n&2){let e,o=C();E(o.extendedDataType()==="o365"?0:o.extendedDataType()==="gsuite"?1:-1),d(5),E(((e=o.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?5:-1),d(),E(o.showCustomRemoteRestoreTree()?6:-1)}}function ft(n,t){if(n&1&&(r(0,"sh-radio",27),m(1,10),c(2,"input",35),T(),a(),r(3,"sh-radio",27),m(4,11),c(5,"input",28),T(),a(),r(6,"app-file-tree",29)(7,"label",33),v(8,"Path"),a(),c(9,"input",34),a()),n&2){let e,o=C();d(6),S("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)}}function Rt(n,t){n&1&&(r(0,"app-toggle-card",22),b(1,23),O(2,12),A(),r(3,"sh-toggle",27),m(4,13),c(5,"input",36),T(),a()()),n&2&&S("disableToggle",!0)}function ht(n,t){n&1&&(r(0,"app-toggle-card",22),b(1,23),O(2,14),A(),r(3,"sh-radio",27),m(4,15),c(5,"input",37),T(),a(),r(6,"sh-radio",27),m(7,16),c(8,"input",38),T(),a()(),r(9,"app-toggle-card"),b(10,23),O(11,17),A(),r(12,"sh-toggle",39),m(13,18),c(14,"input",40),T(),a(),r(15,"sh-toggle",39),m(16,19),c(17,"input",41),T(),a()()),n&2&&S("disableToggle",!0)}var G=new U,at=()=>G.group({restoreFrom:G.control("original"),restoreFromPath:G.control(""),handleExisting:G.control("saveTimestamp"),permissions:G.control(!1),includeMetadata:G.control(!0),customRemoteIgnoreExisting:G.control(!1)}),me=class n{#e=p(D);#t=p(I);#n=p(P);#i=p(K);#o=p(se);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=u(null);backupId=N(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=N(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=N(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=N(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=N(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=N(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=N(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=N(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(et,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"))}),!1}#s=x(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#n.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#i.systemInfo()?.DirectorySeparator){this.#o.open(M,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(M,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Office 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let i=this.optionsFormSignal()?.customRemoteIgnoreExisting,s=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${s}&google-ignore-existing=${i?"true":"false"}`:`@office365://${encodeURIComponent(o)}${s}&office365-ignore-existing=${i?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null,null);this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=k({type:n,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let s;s=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Office 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Different Office 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize`Restore settings`;let Se;Se=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize`How do you want to handle existing files?`;let Ee;Ee=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Oe;Oe=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Ce;Ce=$localize`Metadata settings`;let Ne;Ne=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let fe;return fe=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,i,s,l,_,R,L,Z,Te,Fe,Se,ge,Ee,Oe,Ce,Ne,fe,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(r(0,"form",20,0),f("submit",function(){return o.submit()}),r(2,"h3",21),O(3,1),a(),r(4,"app-toggle-card",22),b(5,23),O(6,2),A(),g(7,Nt,7,3)(8,ft,10,2),a(),g(9,Rt,6,1,"app-toggle-card",22)(10,ht,18,1),r(11,"div",24)(12,"button",25),f("click",function(){return o.goBack()}),m(13,3),c(14,"sh-icon"),T(),a(),r(15,"button",26),m(16,4),c(17,"sh-icon"),T(),a()()()),e&2&&(S("formGroup",o.optionsForm),d(4),S("disableToggle",!0),d(3),E(o.extendedDataType()!==null?7:8),d(2),E(o.isCustomRemoteRestore()?9:10),d(6),Ae("loading",o.isSubmitting()))},dependencies:[Y,z,W,Be,ze,B,V,X,J,Ze,re,qe,Ye,j,H],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{at as a,me as b,st as c,ue as d,rt as e,de as f,D as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as m}from"./chunk-
|
|
1
|
+
import{d as m}from"./chunk-2LSZ2I43.js";import{E as u,M as d,Pc as s,U as p,Z as l,oa as i}from"./chunk-ERITO7WM.js";var c=class r{#s=l(m);isLoaded=i(!1);systemInfo=i(null);filterGroups=i(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);sourceProviderModules=s(()=>this.systemInfo()?.SourceProviderModules??[]);restoreDestinationProviderModules=s(()=>this.systemInfo()?.RestoreDestinationProviderModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],o=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],a=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...o,...a]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});resolveShorthandPath(e){if(!e.startsWith("%")||!e.endsWith("%"))return e;let t=this.systemInfo()?.SpecialFolders;return t?t.find(a=>a.ID?.startsWith(e))?.Path??e:e}preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(d(o=>{this.systemInfo.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(d(o=>{this.filterGroups.set(o)}),u(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as P}from"./chunk-
|
|
1
|
+
import{d as P}from"./chunk-2LSZ2I43.js";import"./chunk-NBTTYKXH.js";import"./chunk-VAQ435AR.js";import{E as p,Eb as o,Fb as i,Pc as x,Ra as s,U as h,Z as r,Zb as L,eb as u,hc as E,lc as a,mc as M,oa as c,ub as f,vb as C,wb as _,yb as v,zb as b}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),M(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),v(3,w,2,1,"li",null,_),i()()()),e&2){let n=L();E("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var g=class e{#e=r(l);logsLoading=x(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=u({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,D,5,4,"div",1)),n&2){let m;s(2),C(d.logsLoading()?2:d.crashLog()==null||((m=d.crashLog())==null?null:m.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
|