@duplicati/ngclient 0.0.41 → 0.0.43
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-27GCJTV5.js +1 -0
- package/{chunk-X53QKTFJ.js → chunk-2HOCLZ5J.js} +1 -1
- package/chunk-45JBSR2F.js +6 -0
- package/{chunk-J32PX2MH.js → chunk-6HO4XDHH.js} +1 -1
- package/{chunk-4EQGEU5E.js → chunk-7CADWXFT.js} +1 -1
- package/{chunk-OJ2CS6D3.js → chunk-CN3765MU.js} +1 -1
- package/{chunk-QLN75PFG.js → chunk-HZVRWBX3.js} +1 -1
- package/{chunk-TCGNOPWE.js → chunk-IH5A7VZA.js} +1 -1
- package/{chunk-UMG632SX.js → chunk-M2HNXB57.js} +1 -1
- package/{chunk-57XJ32TF.js → chunk-N5EDV26Z.js} +1 -1
- package/{chunk-O6D3UT7U.js → chunk-OQEYKIKK.js} +1 -1
- package/{chunk-NWUO2EUU.js → chunk-P7FSPM3M.js} +1 -1
- package/chunk-RIZNMDZX.js +1 -0
- package/{chunk-BOB7BIYQ.js → chunk-SXQDKOHO.js} +1 -1
- package/{chunk-CMOQLINJ.js → chunk-WUBH66KM.js} +1 -1
- package/{chunk-G6GQ2MDC.js → chunk-WWJ757LM.js} +1 -1
- package/{chunk-AYQ7K4DG.js → chunk-XFX4WAZJ.js} +1 -1
- package/{chunk-2AULXET4.js → chunk-YKAKSXUG.js} +1 -1
- package/index.html +1 -1
- package/{main-6DRXXXV2.js → main-VLMX3T2V.js} +1 -1
- package/package.json +1 -1
- package/chunk-5PPKS4ML.js +0 -6
- package/chunk-XVJY4Y25.js +0 -1
- package/chunk-ZF4CSRRV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as xe}from"./chunk-K7H3KYW7.js";import{a as we}from"./chunk-XVJY4Y25.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as ke}from"./chunk-DGBBEZNN.js";import"./chunk-EUZXGGH4.js";import{b as V,d as B,e as Re,g as W,h as Fe,j as he,l as Pe,m as Ie,o as ye,p as $e,q as j,r as Ge}from"./chunk-7TWD5GBS.js";import{a as Oe}from"./chunk-6M3MNJ52.js";import{g as be,k as Ae,o as ve,p as De,q as Le}from"./chunk-ED3PEZLO.js";import{a as U}from"./chunk-AKLJ23OZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as c,K as v,Kb as M,Kc as X,Mc as Me,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as Ee,Wb as p,X as S,Xb as d,Za as E,_b as Ne,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as fe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=Me(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function We(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),p("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function je(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Ne("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Ke(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function qe(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function He(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Je(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),p("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function Qe(l,e){if(l&1&&(i(0,"div",7),H(1,We,4,1)(2,je,5,2,"div",8)(3,Ke,3,0,"div",8)(4,qe,2,0,"button",9)(5,He,2,0,"button",9)(6,Je,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,I,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"]]},template:function(t,n){t&1&&H(0,Qe,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,Ae],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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Ye=()=>({standalone:!0});function Ze(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function et(l,e){if(l&1){let t=M();i(0,"spk-option",51),p("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function tt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function nt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new $e,Ue=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],ze=[{value:"",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],Z=class l{#e=S(ke);#i=S(z);#t=S(U);#n=S(F);#o=S(Oe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(ze);timeTypeOptions=E(Ue);timeOptions=xe([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Ue.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:ze.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:106,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#65\uFFFD\uFFFD/#65\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#71\uFFFD\uFFFD/#71\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#77\uFFFD\uFFFD/#77\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let ue;ue=$localize` Experimental ${"\uFFFD#83\uFFFD\uFFFD/#83\uFFFD"}:TAG_INPUT:`;let pe;pe=$localize`Specific builds for developers only. Not for use with important data.`;let ce;ce=$localize` Canary ${"\uFFFD#89\uFFFD\uFFFD/#89\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#98\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#98\uFFFD"}:CLOSE_LINK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK: 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. `,A=Ee(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,pe,ce,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(c(0,"app-status-bar"),i(1,"form",24),p("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),c(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),c(27,"input",31),$(28,Ze,2,2,"spk-option",32,y),o(),i(30,"spk-select",33),c(31,"input",34),$(32,et,2,2,"spk-option",32,y),o()()()(),i(34,"section")(35,"div",27)(36,"h3"),s(37,6),o(),i(38,"p"),s(39,7),o()(),i(40,"div",28)(41,"div",35)(42,"img",36),p("click",function(){return n.setLightMode()}),o(),i(43,"img",37),p("click",function(){return n.setDarkMode()}),o()()()(),i(44,"section")(45,"div",27)(46,"h3"),s(47,8),o(),i(48,"p"),s(49,9),o()(),i(50,"div",28)(51,"spk-select",38),p("change",function(u){return n.saveLocale(u)}),i(52,"input",39),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(53,tt,2,2,"spk-option",32,y),o()()(),i(55,"section")(56,"div",27)(57,"h3"),s(58,10),o(),i(59,"p"),s(60,11),o()(),i(61,"div",40)(62,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(63,"spk-radio",42),O(64,12),c(65,"input",43),R(),o(),i(66,"p"),s(67,13),o()(),i(68,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(69,"spk-radio",42),O(70,14),c(71,"input",44),R(),o(),i(72,"p"),s(73,15),o()(),i(74,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(75,"spk-radio",42),O(76,16),c(77,"input",45),R(),o(),i(78,"p"),s(79,17),o()(),i(80,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(81,"spk-radio",42),O(82,18),c(83,"input",46),R(),o(),i(84,"p"),s(85,19),o()(),i(86,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(87,"spk-radio",42),O(88,20),c(89,"input",47),R(),o(),i(90,"p"),s(91,21),o()()()(),i(92,"section")(93,"div",27)(94,"h3"),s(95,22),o(),i(96,"p"),O(97,23),c(98,"a",48)(99,"br")(100,"br"),R(),o()(),i(101,"div",28)(102,"spk-select",49),c(103,"input",50),$(104,nt,2,2,"spk-option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(2),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",fe(16,Ye)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(64),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(67),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Fe,V,he,B,Re,W,Ge,Pe,ye,Ie,we,q,De,be,ve,Le],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}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-level-40)}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as xe}from"./chunk-K7H3KYW7.js";import{a as we}from"./chunk-27GCJTV5.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as ke}from"./chunk-DGBBEZNN.js";import"./chunk-EUZXGGH4.js";import{b as V,d as B,e as Re,g as W,h as Fe,j as he,l as Pe,m as Ie,o as ye,p as $e,q as j,r as Ge}from"./chunk-7TWD5GBS.js";import{a as Oe}from"./chunk-6M3MNJ52.js";import{g as be,k as Ae,o as ve,p as De,q as Le}from"./chunk-ED3PEZLO.js";import{a as U}from"./chunk-AKLJ23OZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as c,K as v,Kb as M,Kc as X,Mc as Me,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as Ee,Wb as p,X as S,Xb as d,Za as E,_b as Ne,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as fe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=Me(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function We(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),p("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function je(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Ne("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Ke(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function qe(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function He(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Je(l,e){if(l&1){let t=M();i(0,"button",12),p("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),p("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function Qe(l,e){if(l&1&&(i(0,"div",7),H(1,We,4,1)(2,je,5,2,"div",8)(3,Ke,3,0,"div",8)(4,qe,2,0,"button",9)(5,He,2,0,"button",9)(6,Je,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,I,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"]]},template:function(t,n){t&1&&H(0,Qe,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,Ae],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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Ye=()=>({standalone:!0});function Ze(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function et(l,e){if(l&1){let t=M();i(0,"spk-option",51),p("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function tt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function nt(l,e){if(l&1&&(i(0,"spk-option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new $e,Ue=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],ze=[{value:"",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],Z=class l{#e=S(ke);#i=S(z);#t=S(U);#n=S(F);#o=S(Oe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(ze);timeTypeOptions=E(Ue);timeOptions=xe([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Ue.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:ze.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:106,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#65\uFFFD\uFFFD/#65\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#71\uFFFD\uFFFD/#71\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#77\uFFFD\uFFFD/#77\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let ue;ue=$localize` Experimental ${"\uFFFD#83\uFFFD\uFFFD/#83\uFFFD"}:TAG_INPUT:`;let pe;pe=$localize`Specific builds for developers only. Not for use with important data.`;let ce;ce=$localize` Canary ${"\uFFFD#89\uFFFD\uFFFD/#89\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#98\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#98\uFFFD"}:CLOSE_LINK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK:${"[\uFFFD#99\uFFFD\uFFFD/#99\uFFFD|\uFFFD#100\uFFFD\uFFFD/#100\uFFFD]"}:LINE_BREAK: 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. `,A=Ee(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,pe,ce,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(c(0,"app-status-bar"),i(1,"form",24),p("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),c(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),c(27,"input",31),$(28,Ze,2,2,"spk-option",32,y),o(),i(30,"spk-select",33),c(31,"input",34),$(32,et,2,2,"spk-option",32,y),o()()()(),i(34,"section")(35,"div",27)(36,"h3"),s(37,6),o(),i(38,"p"),s(39,7),o()(),i(40,"div",28)(41,"div",35)(42,"img",36),p("click",function(){return n.setLightMode()}),o(),i(43,"img",37),p("click",function(){return n.setDarkMode()}),o()()()(),i(44,"section")(45,"div",27)(46,"h3"),s(47,8),o(),i(48,"p"),s(49,9),o()(),i(50,"div",28)(51,"spk-select",38),p("change",function(u){return n.saveLocale(u)}),i(52,"input",39),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(53,tt,2,2,"spk-option",32,y),o()()(),i(55,"section")(56,"div",27)(57,"h3"),s(58,10),o(),i(59,"p"),s(60,11),o()(),i(61,"div",40)(62,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(63,"spk-radio",42),O(64,12),c(65,"input",43),R(),o(),i(66,"p"),s(67,13),o()(),i(68,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(69,"spk-radio",42),O(70,14),c(71,"input",44),R(),o(),i(72,"p"),s(73,15),o()(),i(74,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(75,"spk-radio",42),O(76,16),c(77,"input",45),R(),o(),i(78,"p"),s(79,17),o()(),i(80,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(81,"spk-radio",42),O(82,18),c(83,"input",46),R(),o(),i(84,"p"),s(85,19),o()(),i(86,"div",41),p("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(87,"spk-radio",42),O(88,20),c(89,"input",47),R(),o(),i(90,"p"),s(91,21),o()()()(),i(92,"section")(93,"div",27)(94,"h3"),s(95,22),o(),i(96,"p"),O(97,23),c(98,"a",48)(99,"br")(100,"br"),R(),o()(),i(101,"div",28)(102,"spk-select",49),c(103,"input",50),$(104,nt,2,2,"spk-option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(2),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",fe(16,Ye)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(64),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(67),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Fe,V,he,B,Re,W,Ge,Pe,ye,Ie,we,q,De,be,ve,Le],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}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-level-40)}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{Z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-CN3765MU.js")},{path:"destination",loadComponent:()=>import("./chunk-7CADWXFT.js")},{path:"source-data",loadComponent:()=>import("./chunk-WUBH66KM.js")},{path:"schedule",loadComponent:()=>import("./chunk-SXQDKOHO.js")},{path:"options",loadComponent:()=>import("./chunk-YKAKSXUG.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,k as b}from"./chunk-
|
|
1
|
+
import{j as a,k as b}from"./chunk-45JBSR2F.js";import"./chunk-WWJ757LM.js";import"./chunk-DNHLTHLR.js";import"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import"./chunk-ED3PEZLO.js";import"./chunk-AKLJ23OZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as a,m as b}from"./chunk-
|
|
1
|
+
import{l as a,m as b}from"./chunk-45JBSR2F.js";import"./chunk-WWJ757LM.js";import"./chunk-DNHLTHLR.js";import"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import"./chunk-ED3PEZLO.js";import"./chunk-AKLJ23OZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue}from"./chunk-3NZI2UZ4.js";import{q as ge}from"./chunk-7TWD5GBS.js";import{a as D,f as he,k as _e,l as fe,n as me,v as Ce}from"./chunk-ED3PEZLO.js";import{a as pe}from"./chunk-AKLJ23OZ.js";import{ia as de}from"./chunk-5ZK3D2RS.js";import{Ab as P,Cb as te,Db as ne,E as V,Eb as p,Fb as u,Gb as ie,Jb as X,Kb as I,Kc as B,Mc as k,Ra as h,Sb as A,Tb as oe,Ub as re,Wb as O,X as H,Xb as g,Yb as L,Za as y,Zb as x,_a as q,ab as Z,ea as w,fa as N,fb as R,fc as Q,gc as se,hc as z,ic as b,kc as le,lb as v,qa as G,ra as m,sc as W,tc as ae,v as Y,vb as K,wb as ee,xb as E,yc as ce}from"./chunk-MR4RE3IB.js";import{a as $,b as j}from"./chunk-C6Q5SG76.js";var Me=["treeContainer"],ye=["formRef"],Oe=[[["label"]],[["label"]],[["input"]]],Se=["label","label","input"],Fe=(i,t)=>t.id,we=i=>({children:i,level:0}),ve=i=>({$implicit:i}),Ne=(i,t)=>({children:i,level:t});function ke(i,t){if(i&1){let e=I();p(0,"spk-button-group")(1,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("browse"))}),A(2,4),u(),p(3,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("path"))}),A(4,5),u()()}if(i&2){let e=g();h(),E("active",e.pathDiscoveryMethod()==="browse"),h(2),E("active",e.pathDiscoveryMethod()==="path")}}function Re(i,t){i&1&&ie(0,"spk-progress-bar",9)}function Ie(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder-open"),u())}function Ae(i,t){i&1&&(p(0,"spk-icon"),b(1,"file"),u())}function Le(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder"),u())}function We(i,t){if(i&1&&v(0,Ie,2,0,"spk-icon",16)(1,Ae,2,0,"spk-icon")(2,Le,2,0,"spk-icon",16),i&2){let e=g(2).$implicit;P(e.children.length?0:e.cls==="file"?1:2)}}function Be(i,t){i&1&&(p(0,"spk-icon",16),b(1,"desktop-tower"),u())}function De(i,t){i&1&&X(0)}function $e(i,t){if(i&1&&v(0,De,1,0,"ng-container",10),i&2){let e=g(2).$implicit,n=g().$implicit;g();let s=z(7);K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(5,ve,ae(2,Ne,e.children,n.level+1)))}}function je(i,t){if(i&1){let e=I();p(0,"div",14,3),O("click",function(){w(e);let s=g().$implicit,o=g(2);return N(o.toggleNode(s.id,s))}),p(2,"div",15),v(3,We,3,1)(4,Be,2,0,"spk-icon",16),u(),p(5,"div",17),O("click",function(s){w(e);let o=g().$implicit,r=g(2);return N(r.toggleSelectedNode(s,o))}),b(6),u()(),v(7,$e,1,7,"ng-container")}if(i&2){let e=g().$implicit,n=g(2);E("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),h(3),P(e.id!=="/"?3:4),h(3),le(" ",e.text," "),h(),P(e.children.length>0?7:-1)}}function Ve(i,t){if(i&1&&v(0,je,8,13),i&2){let e=t.$implicit,n=g(2);P(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function He(i,t){if(i&1&&(p(0,"spk-list"),te(1,Ve,1,1,null,null,Fe),u()),i&2){let e=t.$implicit;ee("padding-left",e.level*.5,"rem"),h(),ne(e.children)}}function Ge(i,t){i&1&&X(0)}function qe(i,t){if(i&1){let e=I();p(0,"spk-toggle",18),O("click",function(){w(e);let s=g();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),A(1,6),u()}if(i&2){let e=g();E("active",e._showHiddenNodes()),h(),oe(e.showFiles()?"files":"folders"),re(1)}}var Ee=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Ee||{}),U=class i{#t=H(pe);#r=H(ue);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPath=m(void 0);backupSettings=m(null);showHiddenNodes=m(!1);includes=G();excludes=G();_showHiddenNodes=y(!1);treeContainerRef=q("treeContainer");formRef=q("formRef");pathDiscoveryMethod=y("browse");isLoading=y(!1);currentPath=y("/");#e=y(null);treeSearchQuery=y("");treeNodes=y([]);filterGroups=this.#r.filterGroups();isByBackupSettings=B(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=B(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ee;treeStructure=B(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let M=d.map(T=>`-${T}`);n.splice(a,1,...M)}}}let s=this.searchableTreeNodes(),o=new Map,r=this.rootPath(),C=this.accepts(),l=r?{id:r,resolvedpath:r,text:r?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};C&&(l.accepted=!0),o.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let M of _){if(f+="/"+M,!o.has(f)){let T=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:T,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};C&&(S.accepted=this.matchAccepts(C,S)),o.set(f,S),d.children.push(S)}d=o.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let o=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),C=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return o;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){o=1;break}}if(C.length===0)return o;for(let l=0;l<C.length;l++){let a=C[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){o=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){o=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),M=this.translateCSharpRegex(d);if(new RegExp(`${M}`).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,o,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=k(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=k(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(o=>s.endsWith(o)):!1}currentPathEffect=k(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=k(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#l(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#d(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(o))?this.currentPath.set(s.filter(r=>r!==o).join("\0")):this.currentPath.set([...s,o].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#a(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#c(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#c(t):this.#a(t)}#d(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),o=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((C,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;o.includes(c)||o.push(c)})}),this.isLoading.set(!0),Y([...o.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(C=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),T="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(F=>this.multiSelect()?T.startsWith(F):T===F)>-1,Pe=n.findIndex(F=>F===f)>-1,Te=e.findIndex(F=>F===T)>-1;return j($({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Te||Pe})}));return[...new Map([...C,...l].map(c=>[c.resolvedpath??c.id,c])).values()]})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(o=>({text:o.Path.split("/").filter(r=>r!=="").pop(),id:o.Path,cls:o.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1})):n;this.treeNodes.update(o=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return j($({},l),{cls:a,parentPath:e})});return[...new Map([...o,...r].map(l=>[l.resolvedpath??l.id,l])).values()]})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,Me,5),Q(n.formRef,ye,5)),e&2&&se(2)},hostVars:2,hostBindings:function(e,n){e&2&&E("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Se,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(L(Oe),v(0,ke,5,4,"spk-button-group"),p(1,"div",7),x(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Re,1,0,"spk-progress-bar",9)(6,He,3,2,"ng-template",null,1,ce)(8,Ge,1,0,"ng-container",10),u(),v(9,qe,2,3,"spk-toggle",11),u(),p(10,"div",12,2)(12,"spk-form-field"),x(13,1,["ngProjectAs","label",5,["label"]]),x(14,2,["ngProjectAs","input",5,["input"]]),u()()),e&2){let s=z(7);P(n.multiSelect()?-1:0),h(),E("hidden",n.pathDiscoveryMethod()!=="browse"),h(2),E("visualize-accepted",n.accepts()),h(2),P(n.isLoading()?5:-1),h(3),K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(13,ve,W(11,we,n.treeStructure()))),h(),P(n.accepts()?-1:9),h(),E("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[he,Ce,D,_e,fe,me,de,ge],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var Ke=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Xe=["[title]","[description]","[action]","*"];function Qe(i,t){i&1&&b(0,"Title")}function ze(i,t){i&1&&(p(0,"spk-icon"),b(1,"caret-down"),u())}var J=class i{isActive=Z(!1);disallowToggle=m(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&E("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Xe,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(L(Ke),p(0,"header")(1,"div",0)(2,"h3",1),O("click",function(){return n.disallowToggle()||n.toggle()}),x(3,0,null,Qe,1,0),v(5,ze,2,0,"spk-icon"),u(),x(6,1),u(),p(7,"div",2),x(8,2),u()(),p(9,"div",3),x(10,3),u()),e&2&&(h(5),P(n.disallowToggle()?-1:5))},dependencies:[D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{U as a,J as b};
|
|
1
|
+
import{a as ue}from"./chunk-3NZI2UZ4.js";import{q as ge}from"./chunk-7TWD5GBS.js";import{a as D,f as he,k as _e,l as fe,n as me,v as Ce}from"./chunk-ED3PEZLO.js";import{a as pe}from"./chunk-AKLJ23OZ.js";import{ia as de}from"./chunk-5ZK3D2RS.js";import{Ab as E,Cb as te,Db as ne,E as V,Eb as p,Fb as u,Gb as ie,Jb as X,Kb as I,Kc as B,Mc as k,Ra as h,Sb as A,Tb as oe,Ub as re,Wb as O,X as H,Xb as g,Yb as L,Za as y,Zb as x,_a as q,ab as Z,ea as w,fa as N,fb as R,fc as Q,gc as se,hc as z,ic as b,kc as le,lb as v,qa as G,ra as m,sc as W,tc as ae,v as Y,vb as K,wb as ee,xb as P,yc as ce}from"./chunk-MR4RE3IB.js";import{a as $,b as j}from"./chunk-C6Q5SG76.js";var Me=["treeContainer"],ye=["formRef"],Oe=[[["label"]],[["label"]],[["input"]]],Se=["label","label","input"],Fe=(i,t)=>t.id,we=i=>({children:i,level:0}),ve=i=>({$implicit:i}),Ne=(i,t)=>({children:i,level:t});function ke(i,t){if(i&1){let e=I();p(0,"spk-button-group")(1,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("browse"))}),A(2,4),u(),p(3,"button",13),O("click",function(){w(e);let s=g();return N(s.pathDiscoveryMethod.set("path"))}),A(4,5),u()()}if(i&2){let e=g();h(),P("active",e.pathDiscoveryMethod()==="browse"),h(2),P("active",e.pathDiscoveryMethod()==="path")}}function Re(i,t){i&1&&ie(0,"spk-progress-bar",9)}function Ie(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder-open"),u())}function Ae(i,t){i&1&&(p(0,"spk-icon"),b(1,"file"),u())}function Le(i,t){i&1&&(p(0,"spk-icon",16),b(1,"folder"),u())}function We(i,t){if(i&1&&v(0,Ie,2,0,"spk-icon",16)(1,Ae,2,0,"spk-icon")(2,Le,2,0,"spk-icon",16),i&2){let e=g(2).$implicit;E(e.children.length?0:e.cls==="file"?1:2)}}function Be(i,t){i&1&&(p(0,"spk-icon",16),b(1,"desktop-tower"),u())}function De(i,t){i&1&&X(0)}function $e(i,t){if(i&1&&v(0,De,1,0,"ng-container",10),i&2){let e=g(2).$implicit,n=g().$implicit;g();let s=z(7);K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(5,ve,ae(2,Ne,e.children,n.level+1)))}}function je(i,t){if(i&1){let e=I();p(0,"div",14,3),O("click",function(){w(e);let s=g().$implicit,o=g(2);return N(o.toggleNode(s.id,s))}),p(2,"div",15),v(3,We,3,1)(4,Be,2,0,"spk-icon",16),u(),p(5,"div",17),O("click",function(s){w(e);let o=g().$implicit,r=g(2);return N(r.toggleSelectedNode(s,o))}),b(6),u()(),v(7,$e,1,7,"ng-container")}if(i&2){let e=g().$implicit,n=g(2);P("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),h(3),E(e.id!=="/"?3:4),h(3),le(" ",e.text," "),h(),E(e.children.length>0?7:-1)}}function Ve(i,t){if(i&1&&v(0,je,8,13),i&2){let e=t.$implicit,n=g(2);E(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function He(i,t){if(i&1&&(p(0,"spk-list"),te(1,Ve,1,1,null,null,Fe),u()),i&2){let e=t.$implicit;ee("padding-left",e.level*.5,"rem"),h(),ne(e.children)}}function Ge(i,t){i&1&&X(0)}function qe(i,t){if(i&1){let e=I();p(0,"spk-toggle",18),O("click",function(){w(e);let s=g();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),A(1,6),u()}if(i&2){let e=g();P("active",e._showHiddenNodes()),h(),oe(e.showFiles()?"files":"folders"),re(1)}}var Pe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Pe||{}),U=class i{#t=H(pe);#r=H(ue);multiSelect=m(!1);disabled=m(!1);showFiles=m(!1);selectFiles=m(!1);accepts=m(null);startingPath=m(null);rootPath=m(void 0);backupSettings=m(null);showHiddenNodes=m(!1);includes=G();excludes=G();_showHiddenNodes=y(!1);treeContainerRef=q("treeContainer");formRef=q("formRef");pathDiscoveryMethod=y("browse");isLoading=y(!1);currentPath=y("/");#e=y(null);treeSearchQuery=y("");treeNodes=y([]);filterGroups=this.#r.filterGroups();isByBackupSettings=B(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=B(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=B(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let M=d.map(T=>`-${T}`);n.splice(a,1,...M)}}}let s=this.searchableTreeNodes(),o=new Map,r=this.rootPath(),C=this.accepts(),l=r?{id:r,resolvedpath:r,text:r?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};C&&(l.accepted=!0),o.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let M of _){if(f+="/"+M,!o.has(f)){let T=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:T,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};C&&(S.accepted=this.matchAccepts(C,S)),o.set(f,S),d.children.push(S)}d=o.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let o=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),C=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return o;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){o=1;break}}if(C.length===0)return o;for(let l=0;l<C.length;l++){let a=C[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){o=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){o=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),M=this.translateCSharpRegex(d);if(new RegExp(`${M}`).test(e)){o=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){o=_==="include"?1:-1;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,o,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=k(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=k(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(o=>s.endsWith(o)):!1}currentPathEffect=k(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=k(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#l(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#d(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(o))?this.currentPath.set(s.filter(r=>r!==o).join("\0")):this.currentPath.set([...s,o].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#a(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#c(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#c(t):this.#a(t)}#d(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),o=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((C,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;o.includes(c)||o.push(c)})}),this.isLoading.set(!0),Y([...o.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(C=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),T="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(F=>this.multiSelect()?T.startsWith(F):T===F)>-1,Ee=n.findIndex(F=>F===f)>-1,Te=e.findIndex(F=>F===T)>-1;return j($({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Te||Ee})}));return[...new Map([...C,...l].map(c=>[c.resolvedpath??c.id,c])).values()]})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(o=>({text:o.Path.split("/").filter(r=>r!=="").pop(),id:o.Path,cls:o.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1})):n;this.treeNodes.update(o=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return j($({},l),{cls:a,parentPath:e})});return[...new Map([...o,...r].map(l=>[l.resolvedpath??l.id,l])).values()]})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,Me,5),Q(n.formRef,ye,5)),e&2&&se(2)},hostVars:2,hostBindings:function(e,n){e&2&&P("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:Se,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(L(Oe),v(0,ke,5,4,"spk-button-group"),p(1,"div",7),x(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Re,1,0,"spk-progress-bar",9)(6,He,3,2,"ng-template",null,1,ce)(8,Ge,1,0,"ng-container",10),u(),v(9,qe,2,3,"spk-toggle",11),u(),p(10,"div",12,2)(12,"spk-form-field"),x(13,1,["ngProjectAs","label",5,["label"]]),x(14,2,["ngProjectAs","input",5,["input"]]),u()()),e&2){let s=z(7);E(n.multiSelect()?-1:0),h(),P("hidden",n.pathDiscoveryMethod()!=="browse"),h(2),P("visualize-accepted",n.accepts()),h(2),E(n.isLoading()?5:-1),h(3),K("ngTemplateOutlet",s)("ngTemplateOutletContext",W(13,ve,W(11,we,n.treeStructure()))),h(),E(n.accepts()?-1:9),h(),P("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[he,Ce,D,_e,fe,me,de,ge],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var Ke=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Xe=["[title]","[description]","[action]","*"];function Qe(i,t){i&1&&b(0,"Title")}function ze(i,t){i&1&&(p(0,"spk-icon"),b(1,"caret-down"),u())}var J=class i{isActive=Z(!1);disallowToggle=m(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=R({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&P("active",n.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Xe,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(L(Ke),p(0,"header")(1,"div",0)(2,"h3",1),O("click",function(){return n.disallowToggle()||n.toggle()}),x(3,0,null,Qe,1,0),v(5,ze,2,0,"spk-icon"),u(),x(6,1),u(),p(7,"div",2),x(8,2),u()(),p(9,"div",3),x(10,3),u()),e&2&&(h(5),E(n.disallowToggle()?-1:5))},dependencies:[D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-level-20)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{U as a,J as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-27GCJTV5.js";import{n as g}from"./chunk-45JBSR2F.js";import"./chunk-WWJ757LM.js";import"./chunk-DNHLTHLR.js";import"./chunk-3NZI2UZ4.js";import{b as k}from"./chunk-KFGIVU27.js";import{a as N}from"./chunk-EUZXGGH4.js";import"./chunk-7TWD5GBS.js";import{n as $,o as M,s as b}from"./chunk-ED3PEZLO.js";import{a as O}from"./chunk-AKLJ23OZ.js";import{H as P,L as h,Y as E,Z as B}from"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as D,B as m,Eb as s,Fb as p,Gb as n,Mc as A,Qb as d,Ra as r,Rb as c,X as F,fb as f,lb as C,qc as R,tc as _,vb as u}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=F(P);#e=F(g);#a=F(N);#i=F(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(l=>l.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let l;return l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,l,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a,h as b,i as c}from"./chunk-
|
|
1
|
+
import{g as a,h as b,i as c}from"./chunk-45JBSR2F.js";import"./chunk-WWJ757LM.js";import"./chunk-DNHLTHLR.js";import"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import"./chunk-7TWD5GBS.js";import"./chunk-ED3PEZLO.js";import"./chunk-AKLJ23OZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{b as createAdvancedOption,a as createOptionsForm,c as default};
|
package/index.html
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
<style>:root{--font-size:16px;font-size:var(--font-size)}html body{--sparkle-light:initial;--sparkle-dark: ;color-scheme:light dark;--primary-50:#eff6ff;--primary-rgb-50:239,246,255;--primary-contrast-50:var(--dark-primary-text);--primary-100:#dbeafe;--primary-rgb-100:219,234,254;--primary-contrast-100:var(--dark-primary-text);--primary-200:#bfdbfe;--primary-rgb-200:191,219,254;--primary-contrast-200:var(--dark-primary-text);--primary-300:#93c5fd;--primary-rgb-300:147,197,253;--primary-contrast-300:var(--dark-primary-text);--primary-400:#60a5fa;--primary-rgb-400:96,165,250;--primary-contrast-400:var(--dark-primary-text);--primary-500:#3b82f6;--primary-rgb-500:59,130,246;--primary-contrast-500:var(--light-primary-text);--primary-600:#2563eb;--primary-rgb-600:37,99,235;--primary-contrast-600:var(--light-primary-text);--primary-700:#1d4ed8;--primary-rgb-700:29,78,216;--primary-contrast-700:var(--light-primary-text);--primary-800:#1e40af;--primary-rgb-800:30,64,175;--primary-contrast-800:var(--light-primary-text);--primary-900:#1e3a8a;--primary-rgb-900:30,58,138;--primary-contrast-900:var(--light-primary-text);--primary-950:#172554;--primary-rgb-950:23,37,84;--primary-contrast-950:var(--light-primary-text);--accent-50:#f5f3ff;--accent-rgb-50:245,243,255;--accent-contrast-50:var(--dark-primary-text);--accent-100:#ede9fe;--accent-rgb-100:237,233,254;--accent-contrast-100:var(--dark-primary-text);--accent-200:#ddd6fe;--accent-rgb-200:221,214,254;--accent-contrast-200:var(--dark-primary-text);--accent-300:#c4b5fd;--accent-rgb-300:196,181,253;--accent-contrast-300:var(--dark-primary-text);--accent-400:#a78bfa;--accent-rgb-400:167,139,250;--accent-contrast-400:var(--dark-primary-text);--accent-500:#8b5cf6;--accent-rgb-500:139,92,246;--accent-contrast-500:var(--light-primary-text);--accent-600:#7c3aed;--accent-rgb-600:124,58,237;--accent-contrast-600:var(--light-primary-text);--accent-700:#6d28d9;--accent-rgb-700:109,40,217;--accent-contrast-700:var(--light-primary-text);--accent-800:#5b21b6;--accent-rgb-800:91,33,182;--accent-contrast-800:var(--light-primary-text);--accent-900:#4c1d95;--accent-rgb-900:76,29,149;--accent-contrast-900:var(--light-primary-text);--accent-950:#2e1065;--accent-rgb-950:46,16,101;--accent-contrast-950:var(--light-primary-text);--tertiary-50:#fffbeb;--tertiary-rgb-50:255,251,235;--tertiary-contrast-50:var(--dark-primary-text);--tertiary-100:#fef3c7;--tertiary-rgb-100:254,243,199;--tertiary-contrast-100:var(--dark-primary-text);--tertiary-200:#fde68a;--tertiary-rgb-200:253,230,138;--tertiary-contrast-200:var(--dark-primary-text);--tertiary-300:#fcd34d;--tertiary-rgb-300:252,211,77;--tertiary-contrast-300:var(--dark-primary-text);--tertiary-400:#fbbf24;--tertiary-rgb-400:251,191,36;--tertiary-contrast-400:var(--light-primary-text);--tertiary-500:#f59e0b;--tertiary-rgb-500:245,158,11;--tertiary-contrast-500:var(--light-primary-text);--tertiary-600:#d97706;--tertiary-rgb-600:217,119,6;--tertiary-contrast-600:var(--light-primary-text);--tertiary-700:#b45309;--tertiary-rgb-700:180,83,9;--tertiary-contrast-700:var(--light-primary-text);--tertiary-800:#92400e;--tertiary-rgb-800:146,64,14;--tertiary-contrast-800:var(--light-primary-text);--tertiary-900:#78350f;--tertiary-rgb-900:120,53,15;--tertiary-contrast-900:var(--light-primary-text);--tertiary-950:#451a03;--tertiary-rgb-950:69,26,3;--tertiary-contrast-950:var(--light-primary-text);--grey-50:#fafafa;--grey-rgb-50:250,250,250;--grey-contrast-50:var(--dark-primary-text);--grey-100:#f4f4f5;--grey-rgb-100:244,244,245;--grey-contrast-100:var(--dark-primary-text);--grey-200:#e4e4e7;--grey-rgb-200:228,228,231;--grey-contrast-200:var(--dark-primary-text);--grey-300:#d4d4d8;--grey-rgb-300:212,212,216;--grey-contrast-300:var(--dark-primary-text);--grey-400:#a1a1aa;--grey-rgb-400:161,161,170;--grey-contrast-400:var(--dark-primary-text);--grey-500:#71717a;--grey-rgb-500:113,113,122;--grey-contrast-500:var(--light-primary-text);--grey-600:#52525b;--grey-rgb-600:82,82,91;--grey-contrast-600:var(--light-primary-text);--grey-700:#3f3f46;--grey-rgb-700:63,63,70;--grey-contrast-700:var(--light-primary-text);--grey-750:#2f2f31;--grey-rgb-750:47,47,49;--grey-contrast-750:var(--light-primary-text);--grey-800:#27272a;--grey-rgb-800:39,39,42;--grey-contrast-800:var(--light-primary-text);--grey-900:#18181b;--grey-rgb-900:24,24,27;--grey-contrast-900:var(--light-primary-text);--grey-950:#09090b;--grey-rgb-950:9,9,11;--grey-contrast-950:var(--light-primary-text);--warn-50:#fef2f2;--warn-rgb-50:254,242,242;--warn-contrast-50:var(--dark-primary-text);--warn-100:#fee2e2;--warn-rgb-100:254,226,226;--warn-contrast-100:var(--dark-primary-text);--warn-200:#fecaca;--warn-rgb-200:254,202,202;--warn-contrast-200:var(--dark-primary-text);--warn-300:#fca5a5;--warn-rgb-300:252,165,165;--warn-contrast-300:var(--dark-primary-text);--warn-400:#f87171;--warn-rgb-400:248,113,113;--warn-contrast-400:var(--light-primary-text);--warn-500:#ef4444;--warn-rgb-500:239,68,68;--warn-contrast-500:var(--light-primary-text);--warn-600:#dc2626;--warn-rgb-600:220,38,38;--warn-contrast-600:var(--light-primary-text);--warn-700:#b91c1c;--warn-rgb-700:185,28,28;--warn-contrast-700:var(--light-primary-text);--warn-800:#991b1b;--warn-rgb-800:153,27,27;--warn-contrast-800:var(--light-primary-text);--warn-900:#7f1d1d;--warn-rgb-900:127,29,29;--warn-contrast-900:var(--light-primary-text);--warn-950:#450a0a;--warn-rgb-950:69,10,10;--warn-contrast-950:var(--light-primary-text);--success-50:#ecfdf5;--success-rgb-50:236,253,245;--success-contrast-50:var(--dark-primary-text);--success-100:#d1fae5;--success-rgb-100:209,250,229;--success-contrast-100:var(--dark-primary-text);--success-200:#a7f3d0;--success-rgb-200:167,243,208;--success-contrast-200:var(--dark-primary-text);--success-300:#6ee7b7;--success-rgb-300:110,231,183;--success-contrast-300:var(--dark-primary-text);--success-400:#34d399;--success-rgb-400:52,211,153;--success-contrast-400:var(--light-primary-text);--success-500:#10b981;--success-rgb-500:16,185,129;--success-contrast-500:var(--light-primary-text);--success-600:#059669;--success-rgb-600:5,150,105;--success-contrast-600:var(--light-primary-text);--success-700:#047857;--success-rgb-700:4,120,87;--success-contrast-700:var(--light-primary-text);--success-800:#065f46;--success-rgb-800:6,95,70;--success-contrast-800:var(--light-primary-text);--success-900:#064e3b;--success-rgb-900:6,78,59;--success-contrast-900:var(--light-primary-text);--success-950:#022c22;--success-rgb-950:2,44,34;--success-contrast-950:var(--light-primary-text);--display-10:600 5rem / normal Inter Tight, sans-serif;--display-20:600 4.5rem / normal Inter Tight, sans-serif;--display-30:600 4rem / normal Inter Tight, sans-serif;--display-40:600 3.5rem / normal Inter Tight, sans-serif;--display-50:600 3rem / normal Inter Tight, sans-serif;--title-10:500 2.5rem / normal Inter Tight, sans-serif;--title-20:500 2rem / normal Inter Tight, sans-serif;--title-30:500 1.5rem / normal Inter Tight, sans-serif;--title-10B:600 2.5rem / normal Inter Tight, sans-serif;--title-20B:600 2rem / normal Inter Tight, sans-serif;--title-30B:600 1.5rem / normal Inter Tight, sans-serif;--paragraph-10:500 1.125rem / normal Inter Tight, sans-serif;--paragraph-20:500 1rem / normal Inter Tight, sans-serif;--paragraph-30:500 .875rem / normal Inter Tight, sans-serif;--paragraph-40:500 .75rem / normal Inter Tight, sans-serif;--paragraph-10B:600 1.125rem / normal Inter Tight, sans-serif;--paragraph-20B:600 1rem / normal Inter Tight, sans-serif;--paragraph-30B:600 .875rem / normal Inter Tight, sans-serif;--paragraph-40B:600 .75rem / normal Inter Tight, sans-serif;--shape-1:.25rem;--shape-2:.5rem;--shape-3:.75rem;--shape-4:1rem;--shape-5:1.25rem;--box-shadow-10:0 1px 2px 0 rgba(18, 18, 23, .07);--box-shadow-20:0 1px 3px 0 rgba(18, 18, 23, .1);--box-shadow-30:0 1px 4px -1px rgba(18, 18, 23, .08);--box-shadow-35:0 4px 6px -1px rgba(18, 18, 23, .08);--box-shadow-40:0 10px 15px -3px rgba(18, 18, 23, .08);--box-shadow-50:0 20px 25px -5px rgba(18, 18, 23, .1);--box-shadow-60:0 25px 50px -12px rgba(18, 18, 23, .25);--base-level-10:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-950));--base-level-20:var(--sparkle-light, var(--grey-50)) var(--sparkle-dark, var(--grey-900));--base-level-30:var(--sparkle-light, var(--grey-100)) var(--sparkle-dark, var(--grey-900));--base-level-30R:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, var(--grey-100));--base-level-40:var(--sparkle-light, var(--grey-200)) var(--sparkle-dark, var(--grey-700));--base-level-50:var(--sparkle-light, var(--grey-300)) var(--sparkle-dark, var(--grey-800));--base-level-60:var(--sparkle-light, var(--grey-500)) var(--sparkle-dark, var(--grey-400));--base-level-60R:var(--sparkle-light, var(--grey-400)) var(--sparkle-dark, var(--grey-500));--base-level-70:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, #fff);--base-level-70R:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-900));--base-gradient-20:linear-gradient(180deg, var(--grey-400) 0%, var(--grey-500) 50%);--base-gradient-30:linear-gradient(180deg, var(--grey-300) 0%, var(--grey-500) 50%);--base-gradient-60:linear-gradient(180deg, var(--grey-700) 0%, var(--grey-900) 50%);--base-gradient-70:linear-gradient(180deg, var(--grey-600) 0%, var(--grey-900) 50%);--primary-level-20:var(--sparkle-light, var(--primary-50)) var(--sparkle-dark, var(--primary-950));--primary-level-30:var(--sparkle-light, var(--primary-100)) var(--sparkle-dark, var(--primary-900));--primary-level-40:var(--sparkle-light, var(--primary-200)) var(--sparkle-dark, var(--primary-800));--primary-level-50:var(--sparkle-light, var(--primary-300)) var(--sparkle-dark, var(--primary-800));--primary-level-50R:var(--sparkle-light, var(--primary-800)) var(--sparkle-dark, var(--primary-300));--primary-level-80:var(--sparkle-light, var(--primary-900)) var(--sparkle-dark, var(--primary-300));--primary-gradient-20:linear-gradient(180deg, var(--primary-400) 0%, var(--primary-500) 50%);--primary-gradient-30:linear-gradient(180deg, var(--primary-300) 0%, var(--primary-500) 50%);--accent-level-20:var(--sparkle-light, var(--accent-50)) var(--sparkle-dark, var(--accent-950));--accent-level-30:var(--sparkle-light, var(--accent-100)) var(--sparkle-dark, var(--accent-900));--accent-level-40:var(--sparkle-light, var(--accent-200)) var(--sparkle-dark, var(--accent-800));--accent-level-50:var(--sparkle-light, var(--accent-300)) var(--sparkle-dark, var(--accent-800));--accent-level-50R:var(--sparkle-light, var(--accent-800)) var(--sparkle-dark, var(--accent-300));--accent-level-80:var(--sparkle-light, var(--accent-900)) var(--sparkle-dark, var(--accent-300));--accent-gradient-20:linear-gradient(180deg, var(--accent-400) 0%, var(--accent-500) 50%);--accent-gradient-30:linear-gradient(180deg, var(--accent-300) 0%, var(--accent-500) 50%);--tertiary-level-20:var(--sparkle-light, var(--tertiary-50)) var(--sparkle-dark, var(--tertiary-950));--tertiary-level-30:var(--sparkle-light, var(--tertiary-100)) var(--sparkle-dark, var(--tertiary-900));--tertiary-level-40:var(--sparkle-light, var(--tertiary-200)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50:var(--sparkle-light, var(--tertiary-300)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50R:var(--sparkle-light, var(--tertiary-800)) var(--sparkle-dark, var(--tertiary-300));--tertiary-level-80:var(--sparkle-light, var(--tertiary-900)) var(--sparkle-dark, var(--tertiary-300));--tertiary-gradient-20:linear-gradient(180deg, var(--tertiary-400) 0%, var(--tertiary-500) 50%);--tertiary-gradient-30:linear-gradient(180deg, var(--tertiary-300) 0%, var(--tertiary-500) 50%);--warn-level-20:var(--sparkle-light, var(--warn-50)) var(--sparkle-dark, var(--warn-950));--warn-level-30:var(--sparkle-light, var(--warn-100)) var(--sparkle-dark, var(--warn-900));--warn-level-40:var(--sparkle-light, var(--warn-200)) var(--sparkle-dark, var(--warn-800));--warn-level-50:var(--sparkle-light, var(--warn-300)) var(--sparkle-dark, var(--warn-800));--warn-level-50R:var(--sparkle-light, var(--warn-800)) var(--sparkle-dark, var(--warn-300));--warn-level-80:var(--sparkle-light, var(--warn-900)) var(--sparkle-dark, var(--warn-300));--warn-gradient-20:linear-gradient(180deg, var(--warn-400) 0%, var(--warn-500) 50%);--warn-gradient-30:linear-gradient(180deg, var(--warn-300) 0%, var(--warn-500) 50%);--success-level-20:var(--sparkle-light, var(--success-50)) var(--sparkle-dark, var(--success-950));--success-level-30:var(--sparkle-light, var(--success-100)) var(--sparkle-dark, var(--success-900));--success-level-40:var(--sparkle-light, var(--success-200)) var(--sparkle-dark, var(--success-800));--success-level-50:var(--sparkle-light, var(--success-300)) var(--sparkle-dark, var(--success-800));--success-level-50R:var(--sparkle-light, var(--success-800)) var(--sparkle-dark, var(--success-300));--success-level-80:var(--sparkle-light, var(--success-900)) var(--sparkle-dark, var(--success-300));--success-gradient-20:linear-gradient(180deg, var(--success-400) 0%, var(--success-500) 50%);--success-gradient-30:linear-gradient(180deg, var(--success-300) 0%, var(--success-500) 50%);--dark-primary-text:var(--grey-900);--light-primary-text:#fff}*{box-sizing:border-box}html,body,app-root{width:100vw;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--base-level-20)}body{margin:0;font:var(--paragraph-30);color:var(--base-level-70)}</style><link rel="stylesheet" href="styles-DO5TEHSB.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-DO5TEHSB.css"></noscript></head>
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-3NZI2UZ4.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-KL64745B.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-ED3PEZLO.js"><link rel="modulepreload" href="chunk-AKLJ23OZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-
|
|
23
|
+
<link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-3NZI2UZ4.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-KL64745B.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-ED3PEZLO.js"><link rel="modulepreload" href="chunk-AKLJ23OZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-VLMX3T2V.js" type="module"></script></body>
|
|
24
24
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as se,c as ie}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as T}from"./chunk-KL64745B.js";import{a as v}from"./chunk-6M3MNJ52.js";import{c as ne}from"./chunk-ED3PEZLO.js";import{c as oe}from"./chunk-AKLJ23OZ.js";import{L as Y,X as I,ca as ee,ma as te}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as re}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as s,Za as c,d as j,fb as D,g as P,ja as F,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class t{#o=c(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;isLoading=c(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let o=e.data.replace("access:",""),n=JSON.parse(o);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var M=class t{#o=s(v);#n=s(d);ngOnInit(){this.#n.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=D({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&J(0,"router-outlet")},dependencies:[Y],encapsulation:2})};var ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var b=class t{#o=s(oe);isLoaded=c(!1);webmodules=c(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var ue=()=>{let t=s(d),e=s(F);return t.configLoaded===null?O([e.get(L).preload(!0),e.get(b).preload(!0)]):t.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(b).preload(!0)])))},pe=[{path:"",children:[{path:"login",canActivate:[()=>s(T).token()!==null?s(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-FCHQLLN2.js")},{path:"logout",loadComponent:()=>import("./chunk-XGN4FDKH.js")},{path:"",canActivate:[ue],loadComponent:()=>import("./chunk-MXEBWT5C.js"),children:[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{b as se,c as ie}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-3NZI2UZ4.js";import"./chunk-KFGIVU27.js";import{a as T}from"./chunk-KL64745B.js";import{a as v}from"./chunk-6M3MNJ52.js";import{c as ne}from"./chunk-ED3PEZLO.js";import{c as oe}from"./chunk-AKLJ23OZ.js";import{L as Y,X as I,ca as ee,ma as te}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as re}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as s,Za as c,d as j,fb as D,g as P,ja as F,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class t{#o=c(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;isLoading=c(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let o=e.data.replace("access:",""),n=JSON.parse(o);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var M=class t{#o=s(v);#n=s(d);ngOnInit(){this.#n.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=D({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&J(0,"router-outlet")},dependencies:[Y],encapsulation:2})};var ae={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var b=class t{#o=s(oe);isLoaded=c(!1);webmodules=c(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};var ue=()=>{let t=s(d),e=s(F);return t.configLoaded===null?O([e.get(L).preload(!0),e.get(b).preload(!0)]):t.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(b).preload(!0)])))},pe=[{path:"",children:[{path:"login",canActivate:[()=>s(T).token()!==null?s(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-FCHQLLN2.js")},{path:"logout",loadComponent:()=>import("./chunk-XGN4FDKH.js")},{path:"",canActivate:[ue],loadComponent:()=>import("./chunk-MXEBWT5C.js"),children:[{path:"",loadComponent:()=>import("./chunk-6HO4XDHH.js")},{path:"add-backup",loadComponent:()=>import("./chunk-OQEYKIKK.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-4237W7DB.js")},{path:"backup/import",loadComponent:()=>import("./chunk-MTJ4JC4K.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-XFX4WAZJ.js"),loadChildren:()=>import("./chunk-RIZNMDZX.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-XFX4WAZJ.js"),loadChildren:()=>import("./chunk-RIZNMDZX.js")},{path:"restore",loadComponent:()=>import("./chunk-2HOCLZ5J.js")},{path:"restore-flow/:id",loadComponent:()=>import("./chunk-IH5A7VZA.js"),children:[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"select-files",loadComponent:()=>import("./chunk-N5EDV26Z.js")},{path:"options",loadComponent:()=>import("./chunk-HZVRWBX3.js")}]},{path:"settings",loadComponent:()=>import("./chunk-P7FSPM3M.js")},{path:"about",loadComponent:()=>import("./chunk-ZVU4LS6E.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-6CG2PO47.js")},{path:"changelog",loadComponent:()=>import("./chunk-66TOS62R.js")},{path:"libraries",loadComponent:()=>import("./chunk-UYK4G7KS.js")},{path:"system-info",loadComponent:()=>import("./chunk-ARZ3SWC2.js")},{path:"logs",loadComponent:()=>import("./chunk-LTYC3AYW.js")}]}]}]}];var k=null,ce=(t,e)=>{let o=s(T),n=s(I),l=s(v),i=s(u),f=s(ne),r=l.getItem("locale"),p=se(r),h=t;if(o.token()&&t.url.startsWith(i.baseUrl)){let a=t.headers.set("Authorization",`Bearer ${o.token()}`);r&&r!=="en-US"&&(a=a.set("X-Ui-Language",p)),h=t.clone({headers:a})}return e(h).pipe(N(a=>{if(f.error(a.message),a.status===401&&!k&&(k=o.refreshToken().pipe(W())),a.status===401)return k.pipe(S(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),N(g=>(n.navigate(["/logout"]),E(()=>g))),R(()=>k=null));let m=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:m}))}))};var fe="1.0.0",le="portal-proxy-client",he=1,A=class t{#o=1e3;#n=s(u);#e=c("disconnected");#i=c(this.#o);#a=c(!1);#r=c(!1);#p=c(null);isConnectedToMachineServer=this.#r.asReadonly();wsState=this.#e.asReadonly();#c=[];#s={};#t=null;#m=new TextDecoder("utf-8");#l=null;#d=$(()=>{let e=this.#a(),o=this.#i(),n=this.#p();if(!n||!e||!o||o<this.#o){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),l=>l.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,o){let n=o?.reconnect??!1;this.#t&&this.wsState()==="authenticated"&&!n||(this.#t&&this.wsState()!=="authenticated"&&this.#t.close(),this.#t=new WebSocket(this.#n.machineServerUrl),this.#t.onopen=()=>{this.#e.set("connect"),this.#r.set(!0),this.#a.set(!1),this.#p.set(null)},this.#t.onclose=()=>{this.#e.set("disconnected"),this.#r.set(!1),this.#p.set(e),this.#a.set(!0)},this.#t.onerror=()=>{this.#e.set("error")},this.#t.onmessage=l=>{let i=JSON.parse(l.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let r={token:e,publicKey:"",clientVersion:fe,protocolVersion:he},p=this.createResponse(i,"authportal",r);this.#e.set("welcome"),this.#t?.send(p)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var f=JSON.parse(i.payload??"");if(f.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#e.set("authenticated"),this.#r.set(!0);this.#c.length>0;){let r=this.#c.pop();r&&this.#s[r.messageId]&&this.activateCommand(r)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let r=this.#s[i.messageId];if(r){if(i.errorMessage){r.reject(i.errorMessage);return}else{let p=JSON.parse(i.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),r.resolve(p)}delete this.#s[i.messageId],window.clearTimeout(r.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#t?.close(),this.#t=null,this.#e.set("disconnected"),this.#r.set(!1)}createResponse(e,o,n){let l={from:le,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(l)}sendCommand(e,o,n,l,i,f,r=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((p,h)=>{let a=crypto.randomUUID(),g={from:le,to:o,type:"command",messageId:a,payload:JSON.stringify({method:n,path:l,body:i,headers:f})},C={resolve:p,reject:h,timer:window.setTimeout(()=>{let w=this.#s[a];w&&(delete this.#s[a],w.reject("Timeout"))},r)};this.#s[a]=C,this.#r()?this.activateCommand(g):this.#c.push(g)})}activateCommand(e){this.#t?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};function ge(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}var me=(t,e)=>{let n=s(d).config(),l=s(u);if(n===null)return e(t);let i=s(A),f=ge(t.body),r={};t.headers.keys().forEach(m=>{r[m]=t.headers.get(m)??""});let p=t.headers.get("timeout"),h=p!==null?parseInt(p):l.defaultTimeout,a=i.sendCommand(n.accessToken,n.clientId,t.method,t.url,f,r,h);return new j(m=>{a.then(g=>{let C=new B;r!=null&&Object.keys(r).forEach(V=>{C.set(V,r[V])});let w=new q({body:g.body,status:g.code,statusText:"OK",headers:C});m.next(w),m.complete()})})};var de={providers:[G(),ee(pe,te()),_(Z(),X([me,ce])),v,{provide:u,useValue:ae},{provide:K,useValue:ie()},re,z]};Q(M,de);
|
package/package.json
CHANGED