@duplicati/ngclient 0.0.141 → 0.0.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/backgrounds/base-bg.svg +1 -1
- package/assets/duplicati-logo.svg +1 -1
- package/assets/sh-bold.woff2 +0 -0
- package/assets/sh.woff2 +0 -0
- package/assets/ship.css +81 -0
- package/assets/spk.woff2 +0 -0
- package/chunk-2G6UXMJB.js +1 -0
- package/chunk-2RB5RKNM.js +1 -0
- package/chunk-3BODZQHK.js +1 -0
- package/chunk-3L3SGYRX.js +1 -0
- package/{chunk-7QJG4IIT.js → chunk-47WDRGVN.js} +1 -1
- package/chunk-4URGDROZ.js +1 -0
- package/chunk-4YL5DZVH.js +1 -0
- package/chunk-5DO6JZVF.js +1 -0
- package/chunk-5OIM6PRU.js +1 -0
- package/chunk-5SH42EY6.js +1 -0
- package/chunk-5SPGCYAQ.js +1 -0
- package/chunk-65QCOV7I.js +2 -0
- package/{chunk-B6OIHB5W.js → chunk-73RDJP55.js} +1 -1
- package/chunk-7765XHNC.js +8 -0
- package/{chunk-ELFZD53L.js → chunk-7AMBMWZP.js} +1 -1
- package/chunk-7WD3AN66.js +1 -0
- package/chunk-ACH476VA.js +1 -0
- package/chunk-ATYS35R4.js +1 -0
- package/{chunk-UZK7ABRM.js → chunk-B5FUQFEQ.js} +1 -1
- package/chunk-BMYQZKPC.js +2 -0
- package/chunk-BVEALUGN.js +1 -0
- package/chunk-C32RWSXV.js +1 -0
- package/chunk-CNUHBPET.js +2 -0
- package/{chunk-WXARH2SG.js → chunk-CWBEE627.js} +1 -1
- package/chunk-CZLLEVMJ.js +1 -0
- package/chunk-DUKSWBLV.js +1 -0
- package/chunk-E6UP7FUD.js +1 -0
- package/chunk-EDW3WHAP.js +1 -0
- package/chunk-ERIXY2FW.js +3 -0
- package/chunk-FPPZ4BUR.js +1 -0
- package/chunk-GFSWKDRL.js +1 -0
- package/chunk-GUH5TMOS.js +1 -0
- package/chunk-GXARFIQG.js +1 -0
- package/chunk-HBKQWKW7.js +1 -0
- package/{chunk-AM7RYTIO.js → chunk-IHNX6WZQ.js} +1 -1
- package/chunk-JA5QSJM3.js +1 -0
- package/{chunk-ULLALJQ2.js → chunk-JB75BUPF.js} +1 -1
- package/chunk-JF4IGUR6.js +1 -0
- package/{chunk-2W6BEUGU.js → chunk-L2EO4M4B.js} +1 -1
- package/chunk-LAUG2PZW.js +1 -0
- package/chunk-LIJJPCCP.js +1 -0
- package/{chunk-AH5TLYN4.js → chunk-LT2T7TXS.js} +1 -1
- package/{chunk-V5YSQG4X.js → chunk-LZUM5XKC.js} +1 -1
- package/chunk-O2RJYKE4.js +1 -0
- package/chunk-OAW2NFZX.js +1 -0
- package/chunk-OBJPWKDY.js +1 -0
- package/chunk-OICFVPYU.js +1 -0
- package/chunk-OWAZS6AA.js +1 -0
- package/chunk-P2DII6CV.js +1 -0
- package/{chunk-DBD6FOQL.js → chunk-PEWNHZLZ.js} +2 -2
- package/chunk-PHIECUWX.js +1 -0
- package/chunk-PJBVFTZK.js +1 -0
- package/chunk-PMZGBC4U.js +1 -0
- package/chunk-PWV3UKIW.js +1 -0
- package/{chunk-DG7SFNGT.js → chunk-QC2NBFUR.js} +1 -1
- package/chunk-QD2VHHZY.js +1 -0
- package/chunk-QDFCX6XE.js +4 -0
- package/chunk-QFU6VJXV.js +1 -0
- package/chunk-QGFC5ZUR.js +1 -0
- package/chunk-QIQH4ASK.js +2 -0
- package/chunk-QM6X5ZEC.js +2 -0
- package/chunk-R3OYJX7V.js +1 -0
- package/chunk-SWLG7DS7.js +1 -0
- package/chunk-TAPLSJ2K.js +1 -0
- package/chunk-UACX27D3.js +1 -0
- package/chunk-UBFQDZB5.js +1 -0
- package/chunk-UCZV35IF.js +1 -0
- package/{chunk-NSIELNIY.js → chunk-USU2EHJV.js} +1 -1
- package/chunk-UV3WAAEX.js +3 -0
- package/chunk-V7UTQSCX.js +1 -0
- package/chunk-VC6TE2B6.js +1 -0
- package/{chunk-B26UYXA3.js → chunk-VC72SWC4.js} +1 -1
- package/chunk-VMNRHHVY.js +1 -0
- package/chunk-WEAHBXR2.js +1 -0
- package/chunk-WJPLJKPQ.js +1 -0
- package/chunk-WRNQOX5R.js +1 -0
- package/{chunk-32366MQR.js → chunk-X5ISYEI2.js} +1 -1
- package/chunk-X6QMUQPK.js +1 -0
- package/chunk-YCTTQQ6B.js +1 -0
- package/chunk-YIV6PKM7.js +1 -0
- package/chunk-Z2U5JI53.js +1 -0
- package/chunk-ZGU7OKMF.js +1 -0
- package/chunk-ZTHT3VVI.js +1 -0
- package/index.html +4 -4
- package/main-TVE62AWE.js +1 -0
- package/package.json +1 -1
- package/styles-EZGVWHZF.css +1 -0
- package/chunk-23ODVSFI.js +0 -1
- package/chunk-2BX65XJQ.js +0 -1
- package/chunk-2D26BDYB.js +0 -1
- package/chunk-2G6TVFPZ.js +0 -1
- package/chunk-2ULYPLGO.js +0 -1
- package/chunk-3JKXOOME.js +0 -1
- package/chunk-3WCZIRMO.js +0 -1
- package/chunk-3ZVSHKLD.js +0 -1
- package/chunk-52KRFMSD.js +0 -1
- package/chunk-64ZU74CD.js +0 -1
- package/chunk-6DSLFJ4T.js +0 -1
- package/chunk-6JQM2X3B.js +0 -1
- package/chunk-AC7QC7PU.js +0 -1
- package/chunk-AFLQOHXV.js +0 -1
- package/chunk-BCHZRC5K.js +0 -1
- package/chunk-BTMXQPBB.js +0 -7
- package/chunk-C26ZMSTR.js +0 -1
- package/chunk-CCA5ZCEA.js +0 -1
- package/chunk-CDXBWYCI.js +0 -8
- package/chunk-CWLTHXVS.js +0 -1
- package/chunk-DNJOKPEL.js +0 -2
- package/chunk-E4GCCYDQ.js +0 -1
- package/chunk-EBXKOOS2.js +0 -1
- package/chunk-EJZXEK6Z.js +0 -1
- package/chunk-EKP3ML6M.js +0 -1
- package/chunk-EQAVG2TR.js +0 -1
- package/chunk-F3LCHCDX.js +0 -1
- package/chunk-FJ62TYXT.js +0 -1
- package/chunk-FTFVEVRT.js +0 -1
- package/chunk-H2PTENA3.js +0 -1
- package/chunk-HLYFP2CB.js +0 -1
- package/chunk-IBG5YOFG.js +0 -1
- package/chunk-IVBTBJGC.js +0 -1
- package/chunk-IZXB2EWT.js +0 -1
- package/chunk-J6BHRR34.js +0 -1
- package/chunk-JA3Y722G.js +0 -1
- package/chunk-JFOXV66M.js +0 -1
- package/chunk-JOUBVX7V.js +0 -1
- package/chunk-JPMOGXHN.js +0 -1
- package/chunk-KSQIUDEA.js +0 -1
- package/chunk-LDIZ5E5Z.js +0 -1
- package/chunk-MMPTX6PS.js +0 -1
- package/chunk-MQI6JU7H.js +0 -1
- package/chunk-N57J64DN.js +0 -3
- package/chunk-N7RSCHJF.js +0 -3
- package/chunk-NHAGSIVX.js +0 -1
- package/chunk-NS4PAVKI.js +0 -1
- package/chunk-NZ2KKCDC.js +0 -1
- package/chunk-Q6W2U6VI.js +0 -2
- package/chunk-QBJGIKPM.js +0 -1
- package/chunk-QRRKPBY6.js +0 -1
- package/chunk-QU24HTBS.js +0 -2
- package/chunk-QVEGV6V6.js +0 -1
- package/chunk-RCKA5DTC.js +0 -1
- package/chunk-UKPX2XRO.js +0 -1
- package/chunk-V77N2OUE.js +0 -1
- package/chunk-VLBSM6YW.js +0 -1
- package/chunk-WIDMAJIO.js +0 -1
- package/chunk-WPGKMLVU.js +0 -1
- package/chunk-WRWIBPXL.js +0 -2
- package/chunk-WZNH4JPF.js +0 -1
- package/chunk-WZRDKVOR.js +0 -1
- package/chunk-X7SFNRJF.js +0 -1
- package/chunk-XBJRRUMO.js +0 -2
- package/chunk-XIOHRQ3X.js +0 -1
- package/chunk-Y5IRBMLB.js +0 -1
- package/chunk-ZAFFTZSE.js +0 -1
- package/chunk-ZI2XNFAW.js +0 -1
- package/main-A5QFJ7CT.js +0 -1
- package/styles-IH5IS4WG.css +0 -1
- /package/{polyfills-COBLRUJG.js → polyfills-DNO7R5SL.js} +0 -0
- /package/{sparkle-ui-assets → ship-ui-assets}/fonts/InterTight-VariableFont_wght.woff2 +0 -0
package/chunk-RCKA5DTC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ne}from"./chunk-X7SFNRJF.js";import{a as pt}from"./chunk-XIOHRQ3X.js";import"./chunk-LDIZ5E5Z.js";import{a as Tt}from"./chunk-V5YSQG4X.js";import{a as St}from"./chunk-DG7SFNGT.js";import"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import{a as dt}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import{a as Q}from"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as Z,e as J,i as Y,m as ct,s as ee,t as te}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import{a as tt}from"./chunk-3ZVSHKLD.js";import"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{A as rt,C as _t,a as H,b as q,e as nt,g as j,k as it,l as K,p as ot,q as st,r as at,t as lt}from"./chunk-Y5IRBMLB.js";import{h as k}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as I,B as b,Eb as P,H as R,Hc as x,Ic as $,Kb as V,Lb as z,Mb as l,Na as qe,Nb as se,Ob as ae,Oc as et,Pb as Qe,Qa as r,Qb as p,Rb as S,U as He,Z as f,Zb as Ze,_b as Je,a as Ue,ab as w,b as Be,bc as M,c as We,da as u,ea as m,ec as O,fb as F,fc as U,gc as B,jc as y,kc as G,lc as A,n as v,na as c,pb as je,pc as Ye,qb as Ke,sb as C,sc as W,tb as E,xb as N,yb as i,zb as o}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var mt=["formRef"],Ct=()=>[import("./chunk-23ODVSFI.js").then(s=>s.OptionsListComponent)];function Et(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function ft(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=S();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=S();y("options",t.settings),N("hasFreeTextSettings",!0)}}var Nt=["Bytes","KB","MB","GB","TB","PB"],D=class s{#e=f(ne);#t=f(k);formRef=et.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Nt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#e.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let g=n.substring(2);this.settings.update(T=>(T.some(h=>h.Name===g)||T.push({Name:g,Value:a}),T))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(T=>T.Name),_=Object.keys(t).filter(T=>T.startsWith("--")).filter(T=>!n.includes(T.replace("--",""))),g=e.reduce((T,h)=>(T[`--${h.Name}`]=h.Value,T),{});_.forEach(T=>{g[T]=null}),this.#t.patchApiV1Serversettings({requestBody:g}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ze(n.formRef,mt,5),t&2&&Je()},decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),C(1,Et,2,0,"spk-alert",3),i(2,"button",4),p("click",function(){return n.submit()}),V(3,0),I(4,"spk-icon"),z(),o()(),F(5,ft,1,2),je(6,5,Ct)),t&2&&(r(),E(n.saved()?1:-1),r(),M("loader",n.isSubmitting()),r(4),Ke(!n.isLoadingOptions()))},dependencies:[te,j,H,q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};var L=class s{#e=f(nt);#t=f(k);#o=f(Q);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");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=$(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(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();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#i(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#e.open(dt,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#i(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function ht(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=S(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),p("click",function(){u(t);let a=S(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=S(2);r(),y("ngModel",t.registerUrl)}}function Pt(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=S(2);r(3),N("href",Ye(t.claimUrl()),qe),r(),U(t.claimUrl())}}function Ot(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function Rt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.cancel())}),l(1,3),o()}}function It(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.disable())}),l(1,4),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),p("click",function(){u(t);let a=S(2);return m(a.delete())}),l(3,6),o()}}function Gt(s,e){if(s&1&&(i(0,"div",7),C(1,ht,4,1),C(2,Pt,5,3,"div",8),C(3,Ot,3,0,"div",8),C(4,Rt,2,0,"button",9),C(5,It,2,0,"button",9),C(6,yt,4,0),o()),s&2){let t=S();r(),E(t.state()==="inactive"?1:-1),r(),E(t.state()==="registered"?2:-1),r(),E(t.state()==="registering"?3:-1),r(),E(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),E(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),E(t.state()==="disabled"?6:-1)}}var ie=class s{#e=f(L);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||s)};static \u0275cmp=w({type:s,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 a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let g;g=$localize`Enable remote control`;let T;return T=$localize`Delete remote control setup`,[e,t,n,a,_,g,T,[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","error",3,"click"]]},template:function(t,n){t&1&&C(0,Gt,7,6,"div",7),t&2&&E(n.state()!=="unknown"?0:-1)},dependencies:[ee,Z,J,Y,K],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})};function ut(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function At(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function $t(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function vt(s,e){if(s&1){let t=P();i(0,"button",74),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=S(2);M("loader",t.isUpdating())}}function bt(s,e){if(s&1){let t=P();i(0,"button",75),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=S(2);M("loader",t.isUpdating()),N("disabled",!0)}}function wt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=S();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=S();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),C(8,At,2,0,"spk-icon",69)(9,$t,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),p("click",function(){u(t);let a=S();return m(a.cancelPasswordChange())}),l(12,33),o(),C(13,vt,2,2,"button",72)(14,bt,2,3,"button",73),o()}if(s&2){let t=S();r(3),y("ngModel",t.passphrase),r(4),N("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),M("loader",t.isUpdating()),r(2),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function kt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Lt(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),p("click",function(){u(t);let a=S();return m(a.openPassphraseForm())}),l(2,36),o(),C(3,kt,2,0,"spk-icon",76),o()}if(s&2){let t=S();r(3),E(t.passwordUpdated()?3:-1)}}function Ft(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=S();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),p("click",function(){u(t);let a=S();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=S();r(3),y("ngModel",t.allowedHostnames),r(3),M("loader",t.updatingAllowedHosts())}}function xt(s,e){if(s&1&&O(0),s&2){let t,n=S();B(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Dt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Xt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function zt(s,e,t){let n=ut(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=g=>{clearTimeout(_),_=setTimeout(()=>Be(a,g),e)},n.update=g=>{clearTimeout(_),_=setTimeout(()=>We(a,g),e)},n}var Ut=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Bt=[{value:"none",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`}],_e=class s{#e=f(St);#t=f(Q);#o=f(k);#n=f(ne);#i=f(L);#s=f(tt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#i.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#o.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#o.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Bt);timeTypeOptions=c(Ut);timeType=c("none");timeValue=zt(0,300);timeRange=x(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue(),t=this.#n.serverSettings();!t||t["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#o.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let g;g=$localize`Passwords`;let T;T=$localize`Change server passphrase`;let h;h=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let pe;pe=$localize`Allow remote access`;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ge;ge=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$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 Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Usage statistics`;let X;X=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\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. `,X=Qe(X);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let oe;oe=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,g,T,h,de,ce,Se,pe,Te,ge,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,X,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),p("click",function(){return n.setLightMode()}),o(),i(25,"img",46),p("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),C(33,wt,15,7)(34,Lt,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),p("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),p("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),C(54,Ft,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),p("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),C(70,xt,1,1),o(),C(71,Dt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),p("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),p("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),p("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),p("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),p("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),p("ngModelChange",function(_){return n.updateTimeType(_)}),o(),F(112,Xt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),V(118,29),I(119,"a",62)(120,"br")(121,"br"),z(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),p("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),F(125,Vt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,g;r(13),U(n.remoteControlStatus()),r(11),M("active",!n.isDarkMode()),r(),M("active",n.isDarkMode()),r(8),E(n.showPassphraseForm()?33:34),r(9),N("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),N("ngModel",n.langCtrl())("ngModelOptions",W(43,re)),r(8),M("active",n.allowRemoteAccess()),r(3),E(n.allowRemoteAccess()?54:-1),r(8),M("active",n.disableTrayIconLogin()),r(8),E(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),E(n.updatingChannel()?71:-1),r(3),M("active",n.updateChannel()===""),r(),se((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),ae(75),r(2),se((g=n.sysinfo())==null?null:g.ServerVersionType),ae(77),r(2),M("active",n.updateChannel()==="stable"),r(5),M("active",n.updateChannel()==="beta"),r(5),M("active",n.updateChannel()==="experimental"),r(5),M("active",n.updateChannel()==="canary"),r(14),N("unit",n.timeType()==="none"?"s":n.timeType()),r(),N("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),N("ngModelOptions",W(44,re)),r(),N("options",n.timeTypeOptions())("isClearable",!1),r(),N("ngModel",n.timeType()),r(12),N("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),N("ngModel",n.usageStatistics())("ngModelOptions",W(45,re))}},dependencies:[ee,Z,ct,J,Y,te,pt,ie,D,j,st,at,ot,rt,_t,K,H,it,q,lt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-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-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{zt as debounceSignal,_e as default};
|
package/chunk-UKPX2XRO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-JA3Y722G.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreOptionsForm,b as default};
|
package/chunk-V77N2OUE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as z}from"./chunk-ELFZD53L.js";import{b as A,c as G,d as T,e as R,f as D,j as V,o as q,q as $,r as Q,t as j}from"./chunk-NSIELNIY.js";import{a as F}from"./chunk-7QJG4IIT.js";import{d as I}from"./chunk-3ZVSHKLD.js";import{d as k}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as E,b as N,g as O,l as P}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as s,Eb as w,H as d,Ic as v,Oc as x,Qa as c,Qb as M,Z as p,Zb as y,_b as L,ab as h,bc as S,da as g,ea as f,ec as r,na as l,sb as C,tb as b,xb as _,yb as n,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var X=["passwordInput"];function H(a,e){a&1&&(n(0,"spk-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var m=new Q,u=class a{#e=p(k);#t=p(I);rememberMe=F("rememberMe",!1,!0);failedLogin=l(!1);successLogin=l(!1);isLoading=l(!1);loginForm=m.group({user:m.control(""),pass:m.control("",T.required),rememberMe:m.control(this.rememberMe())});passwordInput=x("passwordInput");passwordEffect=v(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(e=>this.rememberMe.set(e??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass,t=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!t&&e&&(this.isLoading.set(!0),this.#t.login(e,this.rememberMe()).pipe(d(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=h({type:a,selectors:[["app-login"]],viewQuery:function(t,o){t&1&&y(o.passwordInput,X,5),t&2&&L()},decls:23,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"]]},template:function(t,o){if(t&1){let B=w();n(0,"form",1),M("submit",function(){return g(B),f(o.submit())}),C(1,H,2,0,"spk-alert",2),n(2,"div",3),s(3,"app-logo"),i(),n(4,"div",4)(5,"div",5),s(6,"input",6),n(7,"spk-form-field")(8,"label",7),r(9," Password "),n(10,"a",8)(11,"spk-icon"),r(12,"question"),i()()(),s(13,"input",9,0),i(),n(15,"button",10),r(16," Login "),n(17,"spk-icon"),r(18,"arrow-right"),i()()(),n(19,"div",11)(20,"label",12),s(21,"input",13),r(22," Keep me logged in "),i()()()()}t&2&&(_("formGroup",o.loginForm),c(),b(o.failedLogin()&&!o.successLogin()?1:-1),c(14),S("loader",o.isLoading()))},dependencies:[j,V,G,A,R,D,q,$,z,P,E,O,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{u as default};
|
package/chunk-VLBSM6YW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-EBXKOOS2.js")},{path:"encryption",loadComponent:()=>import("./chunk-F3LCHCDX.js")},{path:"select-files",loadComponent:()=>import("./chunk-EJZXEK6Z.js")},{path:"options",loadComponent:()=>import("./chunk-UKPX2XRO.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-IVBTBJGC.js")}],t=o;export{t as default};
|
package/chunk-WIDMAJIO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function u(e,n){n=encodeURIComponent(n);for(let o of e.split(";")){let r=o.indexOf("="),[s,c]=r==-1?[o,""]:[o.slice(0,r),o.slice(r+1)];if(s.trim()===n)return decodeURIComponent(c)}return null}var i="browser",l="server";function f(e){return e===i}function R(e){return e===l}var t=class{};export{u as a,i as b,l as c,f as d,R as e,t as f};
|
package/chunk-WPGKMLVU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Y,d as en}from"./chunk-AH5TLYN4.js";import{a as nn}from"./chunk-XIOHRQ3X.js";import{a as Ze}from"./chunk-WZRDKVOR.js";import{a as Ye}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import{a as Qe}from"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{e as he}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,f as Xe,g as we,h as ze,j as Ve,k as Ke,o as Ue,p as je,w as We,x as qe}from"./chunk-Y5IRBMLB.js";import{h as Je}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{$b as K,Ab as d,Ac as J,Bb as m,Cb as M,Db as f,Eb as x,H as j,Ic as ve,Kb as s,Lb as u,Mb as T,Nb as A,Ob as R,Pb as W,Qa as _,Qb as $,Rb as p,Z as h,ab as He,bc as H,da as N,ea as D,ec as r,fb as O,fc as Be,gc as E,jc as Le,kc as Ge,lc as be,na as X,pb as xe,qb as ye,sb as C,sc as q,tb as S,tc as P,ub as w,vb as z,wb as V,wc as k,xb as g,xc as y,yb as o,yc as I,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Q,Ve,qe,We,import("./chunk-3JKXOOME.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-NS4PAVKI.js").then(n=>n.RelativeTimePipe)],_n=()=>["/add-backup"],ln=()=>["/restore"],on=n=>({$implicit:n}),rn=n=>["/backup",n],cn=n=>["/restore",n],sn=n=>["/backup",n,"export"],un=n=>["/backup",n,"delete"],pn=n=>["/backup",n,"database"],Fn=n=>["/backup",n,"commandline"],dn=n=>["/backup",n,"log"];function gn(n,i){if(n&1){let e=x();o(0,"button",51),$("click",function(){let c=N(e).$implicit,F=p(2);return D(F.sortByColumn.set(c.value))}),T(1,15),t()}if(n&2){let e=i.$implicit,a=p(2);H("active",a.orderBy()===e.value),_(),A(e.label),R(1)}}function Tn(n,i){if(n&1&&(o(0,"spk-menu",52)(1,"button",53),s(2,14),d(3,"strong")(4,"spk-icon"),u(),t(),m(5,54),z(6,gn,2,3,"button",55,w),M(),t()),n&2){let e=p();_(4),A(e.orderBy()),R(2),_(2),V(e.sortOrderOptions())}}function Cn(n,i){if(n&1&&(o(0,"p")(1,"span"),T(2,21),t(),r(3),k(4,"relativeTime"),t()),n&2){let e=p().$implicit,a=p(4);_(3),E(" ",I(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function Sn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(4);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function En(n,i){n&1&&(m(0),r(1,"-"),M())}function mn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Mn(n,i){n&1&&(m(0),r(1,"-"),M())}function On(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){n&1&&f(0)}function Dn(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"spk-chip")(5,"spk-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),T(10,16),t(),r(11),k(12,"relativeTime"),t(),C(13,Cn,5,4,"p"),o(14,"p")(15,"span"),T(16,17),t(),C(17,Sn,2,4)(18,En,2,0,"ng-container"),t(),o(19,"p")(20,"span"),T(21,18),t(),C(22,mn,2,3)(23,Mn,2,0,"ng-container"),t(),o(24,"p")(25,"span"),T(26,19),t(),C(27,On,2,3)(28,kn,2,0,"ng-container"),t()(),o(29,"spk-chip",59),T(30,20),t(),o(31,"div",49),O(32,Nn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(4),c=K(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",I(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let F=a.getBackupVersionCount(e);_(3),A(F)(F),R(30),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,on,e))}}function fn(n,i){if(n&1&&z(0,Dn,33,17,"div",58,w),n&2){let e=p(3);V(e.backups())}}function Pn(n,i){n&1&&(m(0),T(1,22),M())}function $n(n,i){if(n&1&&(o(0,"div",56),C(1,fn,2,0)(2,Pn,2,0,"ng-container"),t()),n&2){let e=p(2);_(),S(e.backups().length?1:2)}}function In(n,i){n&1&&(s(0,23,1),f(1),u())}function An(n,i){n&1&&(s(0,24,1),f(1),u())}function Rn(n,i){n&1&&(s(0,25,1),f(1),u())}function Hn(n,i){n&1&&(s(0,26,1),f(1),u())}function xn(n,i){n&1&&(s(0,27,1),f(1),u())}function yn(n,i){n&1&&(s(0,28,1),f(1),u())}function Bn(n,i){n&1&&(s(0,29,1),f(1),u())}function Ln(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function hn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Xn(n,i){n&1&&(m(0),r(1,"-"),M())}function wn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function zn(n,i){n&1&&(m(0),r(1,"-"),M())}function Vn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){n&1&&f(0)}function jn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,hn,2,4)(13,Xn,2,0,"ng-container"),t(),o(14,"td"),C(15,wn,2,3)(16,zn,2,0,"ng-container"),t(),o(17,"td"),C(18,Vn,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),T(22,32),t()(),o(23,"td"),O(24,Un,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(3),c=K(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let F=a.getBackupVersionCount(e);_(4),A(F)(F),R(22),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,on,e))}}function Wn(n,i){if(n&1){let e=x();o(0,"spk-table",61),be("sortByColumnChange",function(c){N(e);let F=p(2);return Ge(F.sortByColumn,c)||(F.sortByColumn=c),D(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,In,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,An,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,Hn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),T(24,30),t(),o(25,"th"),T(26,31),t()(),z(27,jn,25,13,"tr",null,w),t()}if(n&2){let e=p(2),a=K(53);g("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(5),V(e.backups())}}function qn(n,i){if(n&1&&C(0,$n,3,1,"div",56)(1,Wn,29,10,"spk-table",57),n&2){let e=p();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Jn(n,i){n&1&&(o(0,"div",71),d(1,"spk-progress-bar",72),o(2,"div",45)(3,"h3"),T(4,33),t()()())}function Qn(n,i){n&1&&T(0,34,1)}function Yn(n,i){n&1&&(o(0,"spk-icon"),r(1,"check"),t())}function Zn(n,i){n&1&&(o(0,"spk-icon"),r(1,"dots-three-vertical"),t())}function et(n,i){if(n&1){let e=x();o(0,"button",73),$("click",function(){let c=N(e).$implicit,F=p();return D(F.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),d(2,"spk-icon"),C(3,Qn,1,0),u(),t(),o(4,"button",74)(5,"spk-icon"),r(6,"pencil-simple"),t()(),o(7,"spk-menu",75)(8,"button",46),C(9,Yn,2,0,"spk-icon")(10,Zn,2,0,"spk-icon"),t(),m(11,54),o(12,"h3",76),r(13,"Operations"),t(),o(14,"button",77),s(15,35),d(16,"spk-icon"),u(),t(),o(17,"button",77),s(18,36),d(19,"spk-icon"),u(),t(),o(20,"button",77),s(21,37),d(22,"spk-icon"),u(),t(),d(23,"spk-divider"),o(24,"h3",76),r(25,"Advanced"),t(),o(26,"button",77),s(27,38),d(28,"spk-icon"),u(),t(),o(29,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),d(34,"spk-icon"),u(),t(),o(35,"button",77),s(36,41),d(37,"spk-icon"),u(),t(),d(38,"spk-divider"),o(39,"h3",76),r(40,"Reporting"),t(),o(41,"button",77),s(42,42),d(43,"spk-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=p();H("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),g("routerLink",P(16,rn,e.Backup==null?null:e.Backup.ID)),_(3),g("right",!0),_(),H("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),g("routerLink",P(18,cn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(20,sn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(22,un,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(24,pn,e.Backup==null?null:e.Backup.ID)),_(9),g("routerLink",P(26,Fn,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(28,dn,e.Backup==null?null:e.Backup.ID))}}function nt(n,i){n&1&&(o(0,"spk-icon",78),r(1,"funnel-simple"),t(),o(2,"spk-icon",79),r(3,"sort-ascending"),t(),o(4,"spk-icon",80),r(5,"sort-descending"),t())}var tn={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=h(Je);#t=h(Ze);#e=h(Ye);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Qe("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);return tn[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=tn[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let F="http://null?"+i.split("?")[1],B=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[L,G]of Object.entries(en))if(B.endsWith(L))return G}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=He({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let B;B=$localize`My backups`;let L;L=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let G;G=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let pe;pe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Fe;Fe=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize`Version`;let me;me=$localize`Actions`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${v}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ne;Ne=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let De;De=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let fe;fe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let $e;$e=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Ie;Ie=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Re;return Re=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,F,U,B,L,G,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,de,ge,Te,Ce,Se,Ee,me,Me,Oe,ke,Ne,De,fe,Pe,$e,Ie,Ae,Re,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","nextrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=x();d(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",43),d(4,"img",44),o(5,"div",45)(6,"h3"),T(7,2),t(),o(8,"p"),T(9,3),t()(),o(10,"button",46),s(11,4),d(12,"spk-icon"),u(),t()(),o(13,"spk-card",43),d(14,"img",47),o(15,"div",45)(16,"h3"),T(17,5),t(),o(18,"p"),T(19,6),t()(),o(20,"button",46),s(21,7),d(22,"spk-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),T(26,8),M(),o(27,"div",49)(28,"spk-button-group",50)(29,"button",51),$("click",function(){return N(c),D(a.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){return N(c),D(a.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),t()(),o(35,"spk-menu",52)(36,"button",53),s(37,11),d(38,"strong")(39,"spk-icon"),u(),t(),m(40,54),o(41,"button",51),$("click",function(){return N(c),D(a.setTimeType("relative"))}),T(42,12),t(),o(43,"button",51),$("click",function(){return N(c),D(a.setTimeType("actual"))}),T(44,13),t(),M(),t(),C(45,Tn,8,1,"spk-menu",52),t()(),O(46,qn,2,1)(47,Jn,5,0),xe(48,46,an,null,47),t()(),O(50,et,44,30,"ng-template",null,0,J)(52,nt,6,0,"ng-template",null,1,J)}e&2&&(_(3),g("routerLink",q(9,_n)),_(10),g("routerLink",q(10,ln)),_(16),H("active",a.viewMode()==="list"),_(3),H("active",a.viewMode()==="details"),_(7),A(a.timeType()),R(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[he,nn,ze,we,Q,Ke,Ue,je,Xe],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
|
package/chunk-WRWIBPXL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as y}from"./chunk-DNJOKPEL.js";import"./chunk-WIDMAJIO.js";import{H as m,Hc as P,Qa as s,Rb as L,U as h,Z as r,ab as f,ac as x,ec as a,fc as M,na as d,sb as u,tb as C,ub as _,vb as v,wb as b,yb as o,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var l=class e{#e=r(y);isLoaded=d(!1);crashLog=d(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(m(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function S(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function k(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),M(n)}}function I(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),v(3,w,2,1,"li",null,_),i()()()),e&2){let n=L();x("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var p=class e{#e=r(l);logsLoading=P(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
|
|
2
|
-
`):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=f({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,c){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),u(2,S,2,0,"div",0)(3,k,2,0,"div",0)(4,I,5,4,"div",1)),n&2){let g;s(2),C(c.logsLoading()?2:c.crashLog()==null||((g=c.crashLog())==null?null:g.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{p as default};
|
package/chunk-WZNH4JPF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ie}from"./chunk-2BX65XJQ.js";import{a as Re}from"./chunk-6JQM2X3B.js";import{c as De,e as Ae,i as Le,s as $e}from"./chunk-NSIELNIY.js";import{A as ke,a as Se,d as be,e as Me,f as xe,l as ve,n as Ne,p as ye}from"./chunk-Y5IRBMLB.js";import{h as we}from"./chunk-DNJOKPEL.js";import{ea as Oe}from"./chunk-CWLTHXVS.js";import{$b as Y,Ab as G,Ac as Fe,B as le,Db as U,Eb as A,H as K,Hc as $,Ic as W,Kb as pe,Lb as _e,Mb as L,Mc as ie,Nb as ue,Nc as T,Ob as he,Oc as ne,Qa as m,Qb as y,Rb as u,Sb as fe,Tb as H,Z as B,Zb as J,_b as ge,ab as ae,ac as me,bc as N,da as O,ea as S,ec as F,fb as Q,fc as Ce,gc as Pe,jc as Z,kc as ee,lc as te,n as re,na as v,r as V,sb as b,sc as Te,tb as M,tc as j,uc as Ee,vb as ce,wb as de,x as se,xb as D,yb as d,zb as f}from"./chunk-BTMXQPBB.js";import{a as X,b as q}from"./chunk-EUDKD2JW.js";var je=["treeContainer"],ze=["formRef"],Xe=[[["label"]],[["label"]],[["input"]]],qe=["label","label","input"],Ke=o=>({children:o,level:0}),We=o=>({$implicit:o}),Qe=(o,t)=>({children:o,level:t}),Ue=()=>({maxWidth:"700px",width:"100%"}),Je=(o,t)=>t.id;function Ye(o,t){if(o&1){let e=A();d(0,"spk-button-group")(1,"button",19),y("click",function(){O(e);let n=u();return S(n.pathDiscoveryMethod.set("browse"))}),L(2,4),f(),d(3,"button",19),y("click",function(){O(e);let n=u();return S(n.pathDiscoveryMethod.set("path"))}),L(4,5),f()()}if(o&2){let e=u();m(),N("active",e.pathDiscoveryMethod()==="browse"),m(2),N("active",e.pathDiscoveryMethod()==="path")}}function Ze(o,t){o&1&&G(0,"spk-progress-bar",12)}function et(o,t){o&1&&(d(0,"spk-icon",24),F(1,"caret-down"),f())}function tt(o,t){o&1&&G(0,"spk-icon",24)}function it(o,t){o&1&&(d(0,"spk-icon",24),F(1,"caret-right"),f())}function nt(o,t){o&1&&(d(0,"spk-icon",22),F(1,"folder-open"),f())}function ot(o,t){o&1&&(d(0,"spk-icon",22),F(1,"folder-user"),f())}function rt(o,t){o&1&&(d(0,"spk-icon",22),F(1,"file"),f())}function st(o,t){o&1&&(d(0,"spk-icon",22),F(1,"folder"),f())}function lt(o,t){if(o&1&&(b(0,et,2,0,"spk-icon",24)(1,tt,1,0,"spk-icon",24)(2,it,2,0,"spk-icon",24),b(3,nt,2,0,"spk-icon",22)(4,ot,2,0,"spk-icon",22)(5,rt,2,0,"spk-icon",22)(6,st,2,0,"spk-icon",22)),o&2){let e=u(2).$implicit;M(e.children.length?0:e.cls==="file"?1:2),m(3),M(e.children.length?3:e.id==="%HOME%"?4:e.cls==="file"?5:6)}}function at(o,t){o&1&&(d(0,"spk-icon",22),F(1,"desktop-tower"),f())}function ct(o,t){o&1&&U(0)}function dt(o,t){if(o&1&&Q(0,ct,1,0,"ng-container",13),o&2){let e=u(2).$implicit,i=u().$implicit;u();let n=Y(7);D("ngTemplateOutlet",n)("ngTemplateOutletContext",j(5,We,Ee(2,Qe,e.children,i.level+1)))}}function pt(o,t){if(o&1){let e=A();d(0,"div",20,3),y("click",function(){O(e);let n=u().$implicit,r=u(2);return S(r.toggleNode(n.id,n))}),d(2,"div",21),b(3,lt,7,2)(4,at,2,0,"spk-icon",22),f(),d(5,"div",23),y("click",function(n){O(e);let r=u().$implicit,a=u(2);return S(a.toggleSelectedNode(n,r))}),F(6),f()(),b(7,dt,1,7,"ng-container")}if(o&2){let e=u().$implicit,i=u().$implicit,n=u();N("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",i.level===0),m(2),N("file",e.cls==="file"),m(),M(e.id!=="/"?3:4),m(3),Pe(" ",e.text," "),m(),M(e.children.length>0?7:-1)}}function _t(o,t){if(o&1&&b(0,pt,8,17),o&2){let e=t.$implicit,i=u(2);M(e.hidden&&i._showHiddenNodes()||!e.hidden?0:-1)}}function ut(o,t){if(o&1&&(d(0,"spk-list"),ce(1,_t,1,1,null,null,Je),f()),o&2){let e=t.$implicit;me("padding-left",e.level*.25,"rem"),m(),de(e.children)}}function ht(o,t){o&1&&U(0)}function ft(o,t){if(o&1){let e=A();d(0,"spk-toggle",25),y("click",function(){O(e);let n=u();return S(n._showHiddenNodes.set(!n._showHiddenNodes()))}),L(1,6),f()}if(o&2){let e=u();N("active",e._showHiddenNodes()),m(),ue(e.showFiles()?"files":"folders"),he(1)}}function gt(o,t){if(o&1){let e=A();d(0,"button",26),y("click",function(){O(e);let n=u();return S(n.openCreateFolderDialog())}),L(1,7),f()}if(o&2){let e=u();D("disabled",!e.isCurrentPathFolder())}}function mt(o,t){if(o&1){let e=A();d(0,"spk-dialog",27),te("isOpenChange",function(n){O(e);let r=u();return ee(r.createFolderDialogOpen,n)||(r.createFolderDialogOpen=n),S(n)}),d(1,"header",28)(2,"h2"),L(3,8),f()(),d(4,"div",29)(5,"div"),F(6," Folder will be created under "),d(7,"pre"),F(8),f()(),d(9,"spk-form-field")(10,"textarea",30),te("ngModelChange",function(n){O(e);let r=u();return ee(r.createFolderPath,n)||(r.createFolderPath=n),S(n)}),f()()(),d(11,"footer",31)(12,"button",32),y("click",function(){O(e);let n=u();return S(n.closeCreateFolderDialog(!1))}),F(13,"Cancel"),f(),d(14,"button",33),y("click",function(){O(e);let n=u();return S(n.closeCreateFolderDialog(!0))}),pe(15,9),G(16,"spk-icon"),_e(),f()()()}if(o&2){let e,i=u();Z("isOpen",i.createFolderDialogOpen),D("options",Te(5,Ue)),m(8),Ce(i.currentPath()),m(2),Z("ngModel",i.createFolderPath),m(4),D("disabled",!((e=i.createFolderPath())!=null&&e.length))}}var Ve=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(Ve||{}),E="/",oe=class o{#t=B(we);#n=B(Re);#d=B(Me);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);initialNodes=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);enableCreateFolder=T(!1);hideShortcuts=T(!1);includes=ie();excludes=ie();_showHiddenNodes=v(!1);createFolderDialogOpen=v(!1);createFolderPath=v(null);treeContainerRef=ne("treeContainer");formRef=ne("formRef");pathDiscoveryMethod=v("browse");isLoading=v(!1);currentPath=v("/");#o=v(null);treeSearchQuery=v("");treeNodes=v([]);isWindows=$(()=>this.#n.systemInfo()?.OSType==="Windows");pathDelimiter=$(()=>this.isWindows()?"\\":"/");filterGroups=this.#n.filterGroups();isByBackupSettings=$(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=$(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ve;treeStructure=$(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==E),i=structuredClone(e);for(let l=0;l<i.length;l++){let g=i[l].slice(1);if(g.startsWith("{")&&g.endsWith("}")){let h=g.slice(1,-1),c=this.filterGroups?.FilterGroups[h];if(c&&c.length){let x=c.map(C=>`-${C}`);i.splice(l,1,...x)}}}let n=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),_=this.pathDelimiter(),s=[];return r.length>0?s=r.map(l=>{let p=this.#s(i,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:p,isIndeterminate:!1,cls:this.#e(l,_)?"folder":"file"}}):s=[{id:E,resolvedpath:E,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],s.map(l=>{let p=new Map,g=l?.id;a&&(l.accepted=!0),p.set(l.id,l);let h=r.length>0?n.filter(c=>c.parentPath.startsWith(l.id)):n;for(let c of h){let C=(r.length>0?c.id.replace(g??"",""):c.id).split(_).filter(Boolean),P="",k=l;for(let R of C){if(P+=R+_,!p.has(P)){let z=c.hidden===!0&&t?0:this.#s(i,c.id,c.cls,k),w={id:c.id,isIndeterminate:this.isIndeterminate(i,c.id),evalState:z,parentPath:P,resolvedpath:c.cls=="folder"?this.#r(c.resolvedpath):P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),p.set(P,w),k.children.push(w)}k=p.get(P)}}return l}),s});#r(t){let e=this.pathDelimiter();return t?t.endsWith(e)||t===E?t:t+e:E}#s(t,e,i,n){if(n&&n.evalState===-1)return-2;let r=0,a=this.pathDelimiter(),_=t.filter(p=>!p.startsWith("-")&&!p.startsWith("+")),s=t.filter(p=>p.startsWith("-")||p.startsWith("+")),l=this.multiSelect();if(_.length===0)return r;for(let p=0;p<_.length;p++){let g=_[p];if(e===g){r=1;break}if(!l||!this.#e(g,a))continue;if(e?.startsWith(g)){r=1;break}}if(s.length===0)return r;for(let p=0;p<s.length;p++){let g=s[p],h=g.slice(1),c=g.startsWith("-")?-1:1;if(this.#e(h,a)){if(i!=="folder")continue;if(e===h){r=c;break}}if(h.startsWith("*")&&h.endsWith(`*${a}`)){if(i!=="folder")continue;let C=h.slice(1,-2);if(C==="")break;if(e?.includes(C+a)){r=c;break}}if(h.startsWith("[.*")&&h.endsWith(`[^\\${a}]*]`)){if(i!=="file")continue;let C=h.slice(3,-7);if(new RegExp(C).test(e)){r=c;break}}if(h.startsWith("[")&&h.endsWith("]")){let C=h.slice(1,-1),P=this.translateCSharpRegex(C);if(new RegExp(`${P}`).test(e)){r=c;break}}if(h.startsWith("*.")){if(i!=="file"||h.replace("*.","").length===0)continue;if(this.#l(e,h,!0)){r=c;break}}if(h==="")continue;if(h===e){r=c;break}if(this.#l(e,h,!0)){r=c;break}}return r}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let i=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(i,(n,r,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(i=>!i.startsWith("-")&&this.#e(i,this.pathDelimiter())).some(i=>i.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith(this.pathDelimiter())||t.startsWith("%")&&t.endsWith("%")&&!t.includes(this.pathDelimiter()):!1}#l(t,e,i=!1){let n=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${n}${i?"$":""}`).test(t)}showHiddenNodesEffect=W(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=W(()=>{let t=this.pathDiscoveryMethod(),e=this.#o();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===E)return!0;let i=t.split(",");if(i.length===0)return!0;let n="."+e.id.slice(e.id.indexOf("."));return n?i.some(r=>n.endsWith(r)):!1}currentPathEffect=W(()=>{let t=this.#o();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=W(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#p(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.#o.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#h(t);else{let e=this.rootPaths(),i=this.initialNodes();e&&e.length>0?(i&&i.length>0&&this.treeNodes.set(i.map(n=>({id:n.id,leaf:n.leaf,cls:n.cls,text:n.text,iconCls:n.iconCls,fileSize:n.fileSize,resolvedpath:n.resolvedpath,parentPath:this.getParentPath(n.id??"")}))),this.#i(null,e[0])):this.#i(null,E)}}getParentPath(t){let e=this.pathDelimiter(),i=t.split(e);return i.length<=1?E:(i.pop(),i.length!==0&&i.pop(),i.join(e)+e)}toggleSelectedNode(t,e){if(e.id===E||(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 n=this.currentPath().split("\0").filter(s=>s!==""&&s!==E),a=this.isChildOfSelected(e)?`-${e.id}`:e.id,_=this.#e(e.id,this.pathDelimiter());if(this.multiSelect())if(n.includes(e.id))this.currentPath.set(n.filter(s=>s!==e.id&&!(_&&s.startsWith(a))).join("\0"));else if(n.some(s=>s==a))this.currentPath.set(n.filter(s=>s!==a).join("\0"));else{let s=_?n.filter(l=>!l.startsWith(e.id)):n;this.currentPath.set([...s,a].join("\0"))}else n.includes(e.id)?this.currentPath.set(n.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(i=>i!==""&&i!==E&&this.#e(i,this.pathDelimiter())).some(i=>t.id?.startsWith(i)||`-${t.id}`.startsWith(i))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(i=>i.filter(n=>!n.id?.startsWith(e.id)||n.id===e.id)):this.#i(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let i=this.currentPath(),n=this.#r(e),r=i+n;this.#t.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+r}}).subscribe({next:()=>{this.currentPath.set(r),this.#i(null,i),setTimeout(()=>{this.#a()},500),this.createFolderDialogOpen.set(!1)},error:a=>{let _=a?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),s=_?_[1]:a?.message||$localize`An error occurred while trying to create the folder.`;this.#d.open(Ie,{data:{title:$localize`Cannot create folder`,message:s,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#a(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#p(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}#_(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#u(t){let e=this.backupSettings();if(this.#n.hasV2ListOperations())return this.#t.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(V(i=>i.Data??[]));{let i={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(i).pipe(V(n=>n.Files??[]))}}#c(t){return this.isByBackupSettings()?this.#u(t):this.#_(t)}#h(t){let e=this.pathDelimiter(),i=t.split("\0").filter(s=>s.startsWith("-")).map(s=>s.slice(1,-1)),n=t.split("\0").filter(s=>!s.startsWith("-")).filter(Boolean),r=n.map(s=>{let l=s.split(e);return l.at(-1)!==""&&l.pop(),l}),a=[E];r.forEach(s=>{s.forEach((l,p)=>{let g=s.slice(0,p+1).join(e);g!==""&&(a.includes(g)||a.push(g))})}),this.isLoading.set(!0);let _=a.map(s=>this.#c(s).pipe(V(l=>({status:"success",value:l,url:s})),le(l=>re({status:"error",value:l,url:s}))));se(_).pipe(K(()=>this.isLoading.set(!1))).subscribe({next:s=>{let l=s.filter(g=>g.status==="success"),p=s.filter(g=>g.status==="error");this.treeNodes.update(g=>{let h=l.flatMap(x=>x.value.map(C=>{let P=C.id,k=C.id.startsWith("%")&&C.id.endsWith("%")?C.resolvedpath+e:C.id,R=P&&P.split(e).filter(Boolean).slice(0,-1).join(e),z=P&&P.split(e).filter(Boolean).join(e),w=e+z,Be=n.findIndex(I=>this.multiSelect()?w.startsWith(I):w===I)>-1,Ge=n.findIndex(I=>I===P)>-1,He=i.findIndex(I=>I===w)>-1;return q(X({},C),{cls:this.#e(k,e)||k==E?"folder":"file",parentPath:R.startsWith("%")?R:e+R,isSelected:Be&&!He||Ge})})),c=[...new Map([...g,...h].map(x=>[x.id,x])).values()];return this.#a(),this.hideShortcuts()?c.filter(x=>!x.id.startsWith("%")):c})}})}#e(t,e){return t.startsWith("%")&&t.endsWith("%")||t.endsWith(e)}#i(t=null,e=E){let i=this.pathDelimiter();this.isLoading.set(!0),this.#c(e).pipe(K(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.map(a=>({text:a.Path.split(i).filter(_=>_!=="").pop(),id:a.Path,cls:this.#e(a.Path,i)?"folder":"file",leaf:t!==null,resolvedpath:a.Path,hidden:!1})):n;this.treeNodes.update(a=>{let _=r.map(l=>{let p=this.#e(l.id,i)?"folder":"file";return q(X({},l),{cls:p,parentPath:e})}),s=[...new Map([...a,..._].map(l=>[l.id,l])).values()];return this.hideShortcuts()?s.filter(l=>!l.id.startsWith("%")):s})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ae({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,i){e&1&&(J(i.treeContainerRef,je,5),J(i.formRef,ze,5)),e&2&&ge(2)},hostVars:2,hostBindings:function(e,i){e&2&&N("disabled",i.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:qe,decls:18,vars:17,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let i;i=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let n;n=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;return a=$localize` Create folder ${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:folder-plus${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,i,n,r,a,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"active"],["spk-button","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"],["spk-button","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){if(e&1&&(fe(Xe),b(0,Ye,5,4,"spk-button-group"),d(1,"div",10),H(2,0,["ngProjectAs","label",5,["label"]]),d(3,"div",11,0),b(5,Ze,1,0,"spk-progress-bar",12),Q(6,ut,3,2,"ng-template",null,1,Fe)(8,ht,1,0,"ng-container",13),f(),d(9,"div",14),b(10,ft,2,3,"spk-toggle",15),b(11,gt,2,1,"button",16),f()(),d(12,"div",17,2)(14,"spk-form-field"),H(15,1,["ngProjectAs","label",5,["label"]]),H(16,2,["ngProjectAs","input",5,["input"]]),f()(),b(17,mt,17,6,"spk-dialog",18)),e&2){let n=Y(7);M(i.multiSelect()?-1:0),m(),N("hidden",i.pathDiscoveryMethod()!=="browse"),m(2),N("visualize-accepted",i.accepts()),m(2),M(i.isLoading()?5:-1),m(3),D("ngTemplateOutlet",n)("ngTemplateOutletContext",j(15,We,j(13,Ke,i.treeStructure()))),m(2),M(!i.accepts()&&!i.isByBackupSettings()?10:-1),m(),M(i.enableCreateFolder()?11:-1),m(),N("hidden",i.pathDiscoveryMethod()!=="path"),m(5),M(i.createFolderDialogOpen()?17:-1)}},dependencies:[xe,ke,Se,ve,Ne,ye,be,Oe,$e,De,Ae,Le],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}'],changeDetection:0})};export{oe as a};
|
package/chunk-WZRDKVOR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as $}from"./chunk-ULLALJQ2.js";import{a as R}from"./chunk-J6BHRR34.js";import{a as _}from"./chunk-2BX65XJQ.js";import{a as B}from"./chunk-6JQM2X3B.js";import{a as z}from"./chunk-WXARH2SG.js";import{e as S}from"./chunk-Y5IRBMLB.js";import{h as P}from"./chunk-DNJOKPEL.js";import{H as u,Hc as c,Ic as f,P as d,U as m,Z as s,n as k,na as n,r as h}from"./chunk-BTMXQPBB.js";import{a as l,b as r}from"./chunk-EUDKD2JW.js";var T={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},b=class p{#i=s(z);#t=s(P);#o=s($);#e=s(R);#c=s(S);#p=s(B);#s=n(!1);#l=n(null);statusData=this.#l.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(l({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null})),this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#p.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#k=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#a(r(l({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(_,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(d(e=>{let i=e.TaskID??null;return i===null?k(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(l({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#a(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#a(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#l.set(r(l({},e),{progress:this.#g(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#g(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,a)=>(o??0)+(a??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?T[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,a=e.TotalFileSize-e.ProcessedFileSize-t,F=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",g=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${g}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${g}`:i=`${F}${o} files (${this.#i.transform(a)}) to go ${g}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=m({token:p,factory:p.\u0275fac,providedIn:"root"})};export{b as a};
|
package/chunk-X7SFNRJF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-LDIZ5E5Z.js";import{h as o}from"./chunk-DNJOKPEL.js";import{Hc as n,U as i,Z as r,na as s}from"./chunk-BTMXQPBB.js";var c=class e{#e=r(o);#i=p(this.#e.getApiV1Serversettings());#t=s(void 0);serverSettings=n(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:t=>{this.#t.set(t)}})}static \u0275fac=function(a){return new(a||e)};static \u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})};export{c as a};
|
package/chunk-XBJRRUMO.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as q}from"./chunk-LDIZ5E5Z.js";import{a as W,d as X,g as z}from"./chunk-Y5IRBMLB.js";import{h as J}from"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as u,Eb as f,Ic as G,Kb as A,Lb as D,Mb as y,Na as k,Qa as r,Qb as C,Rb as S,Z as h,ab as F,da as d,ea as _,ec as s,fc as I,gc as L,hc as w,jc as N,kc as $,lc as B,na as m,pc as V,r as E,sb as v,sc as U,tb as M,ub as P,vb as R,wb as x,xb as g,yb as o,zb as a}from"./chunk-BTMXQPBB.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
|
|
2
|
-
`),n="";for(let i=0;i<e.length;i++)n+=`<li>${e[i]}</li>`;return n}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=F({type:l,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let i=f();o(0,"h3"),y(1,0),a(),R(2,H,13,5,"div",2,P),o(4,"spk-dialog",3),B("isOpenChange",function(p){return d(i),$(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),o(5,"header",4)(6,"h3"),s(7),a()(),o(8,"div",5)(9,"div",6),s(10),a()(),o(11,"footer",7)(12,"button",8),C("click",function(){return d(i),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),s(13,"Close"),a()()()}if(e&2){let i,c;r(2),x(n.licenses()),r(2),N("isOpen",n.dialogIsOpen),g("options",U(4,K)),r(3),I((i=n.dialogLicense())==null?null:i.Title);let p=((c=n.dialogLicense())==null?null:c.License)??"";r(3),L(" ",p," ")}},dependencies:[W,z,X],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"],changeDetection:0})};export{b as default};
|
package/chunk-XIOHRQ3X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ce}from"./chunk-WZRDKVOR.js";import{a as ge}from"./chunk-ULLALJQ2.js";import{a as me}from"./chunk-J6BHRR34.js";import{a as de}from"./chunk-6JQM2X3B.js";import{c as Ee,e as Oe,i as fe,k as Ae,s as v}from"./chunk-NSIELNIY.js";import{b as oe}from"./chunk-3ZVSHKLD.js";import{a as ae,b as se,e as le,g as re,i as _e,l as pe,p as ue,q as Se,s as ce,t as Te}from"./chunk-Y5IRBMLB.js";import{h as A}from"./chunk-DNJOKPEL.js";import{a as Pe}from"./chunk-UZK7ABRM.js";import{la as ie}from"./chunk-CWLTHXVS.js";import{Ab as C,Eb as k,H as L,Hc as y,Kb as E,Lb as O,Mb as u,Mc as $,Pb as Q,Qa as r,Qb as S,Rb as d,Z as T,ab as f,ac as ee,bc as m,da as N,ea as M,ec as g,gc as G,hc as z,jc as h,kc as b,lc as B,na as c,sb as I,tb as D,ub as Z,vb as q,wb as J,wc as X,xb as R,xc as te,yb as s,yc as ne,zb as l}from"./chunk-BTMXQPBB.js";function ke(a,n){if(a&1){let i=k();s(0,"spk-radio",10),S("click",function(){let t=N(i).$implicit,o=d();return M(o.pauseOption.set(t.value))}),g(1),l()}if(a&2){let i=n.$implicit,e=d();m("active",e.pauseOption()===i.value),r(),G(" ",i.label," ")}}var he=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],x=class a{#e=T(A);pauseOptions=c(he);closed=$();isSubmitting=c(!1);pauseTransfers=c(!1);pauseOption=c(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,i=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:i,pauseTransfers:n}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let i;i=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let t;t=$localize`Cancel`;let o;return o=$localize` Update settings `,[n,i,e,t,o,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header",5)(1,"h3"),u(2,0),l()(),s(3,"div",6)(4,"div",7),q(5,ke,2,3,"spk-radio",8,Z),l(),s(7,"div",9)(8,"spk-checkbox",10),S("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),u(9,1),l(),s(10,"spk-alert",11),u(11,2),l()()(),s(12,"footer",12)(13,"button",13),S("click",function(){return e.closed.emit()}),u(14,3),l(),s(15,"button",14),S("click",function(){return e.submit()}),u(16,4),l()()),i&2&&(r(5),J(e.pauseOptions()),r(3),m("active",e.pauseTransfers()),r(7),m("loader",e.isSubmitting()))},dependencies:[v,Se,_e,se],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Me={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},be=["mbps","gbps"],Ie=8,V=1024,w=V*1024,W=w*1024,Y=W*1024,De=Y*1024,Be={B:1,KB:V,MB:w,GB:W,TB:Y,PB:De},ye=1e3,K=ye*1e3,H=K*1e3,Ue=[{threshold:De,unitPrefix:"PByte"},{threshold:Y,unitPrefix:"TByte"},{threshold:W,unitPrefix:"GByte"},{threshold:w,unitPrefix:"MByte"},{threshold:V,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],U=class a{#e=T(A);closed=$();isSubmitting=c(!1);sizeOptions=c([...be]);maxUpload=c(0);maxDownload=c(0);maxUploadUnit=c("mbps");maxDownloadUnit=c("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(n,i){let t=n*(Be[i.toUpperCase()]||w)*Ie;return t===0?{value:0,unit:"mbps"}:t>=H?{value:parseFloat((t/H).toFixed(2)),unit:"gbps"}:{value:parseFloat((t/K).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(n,i){let e=0;switch(i){case"gbps":e=n*H;break;case"mbps":e=n*K;break}let t=e/Ie;if(t===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:o,unitPrefix:_}of Ue)if(t>=o)return{valueForApi:Math.round(t/o),unitPrefixForApi:_};return{valueForApi:Math.round(t),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let i=n?.["max-upload-speed"],e=n?.["max-download-speed"];if(i&&i!==""){let t=i.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxUpload.set(p.value),this.maxUploadUnit.set(p.unit)}else console.warn("Unexpected max-upload-speed format from API:",i),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let t=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(t){let o=parseFloat(t[1]),_=t[2],p=this.convertToBitsPerSecondUnits(o,_);this.maxDownload.set(p.value),this.maxDownloadUnit.set(p.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:n=>{console.error("Failed to get server settings:",n),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let i=n.clipboardData?.getData("text/plain");if(!i)return;let e=i.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n="",i="",e=this.maxUpload()??0,t=this.maxUploadUnit(),o=this.maxDownload()??0,_=this.maxDownloadUnit();if(e>0){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(e,t),F=Me[P];F?n=`${p}${F}`:console.error(`Invalid unit prefix for API submission (upload): ${P}. Defaulting to empty string.`)}if(o){let{valueForApi:p,unitPrefixForApi:P}=this.convertFromBitsPerSecondUnits(o,_),F=Me[P];F?i=`${p}${F}`:console.error(`Invalid unit prefix for API submission (download): ${P}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":i}}).pipe(L(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:p=>{console.error("Failed to submit throttle settings:",p)}})}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let n;n=$localize`Throttle network speed`;let i;i=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let t;t=$localize`Max download speed`;let o;o=$localize`Cancel`;let _;return _=$localize` Update settings `,[n,i,e,t,o,_,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(i,e){i&1&&(s(0,"header")(1,"h3"),u(2,0),l(),s(3,"p"),u(4,1),l()(),s(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),u(9,2),l(),s(10,"spk-form-field")(11,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxUpload,o)||(e.maxUpload=o),o}),l()(),s(12,"spk-select",10)(13,"input",11),B("ngModelChange",function(o){return b(e.maxUploadUnit,o)||(e.maxUploadUnit=o),o}),l()()(),s(14,"div",8)(15,"label"),u(16,3),l(),s(17,"spk-form-field")(18,"input",9),S("paste",function(o){return e.cleanupInputAfterPasting(o)})("keydown",function(o){return e.blockDecimalKeys(o)}),B("ngModelChange",function(o){return b(e.maxDownload,o)||(e.maxDownload=o),o}),l()(),s(19,"spk-select",10)(20,"input",11),B("ngModelChange",function(o){return b(e.maxDownloadUnit,o)||(e.maxDownloadUnit=o),o}),l()()()()(),s(21,"footer",12)(22,"button",13),S("click",function(){return e.closed.emit(!1)}),u(23,4),l(),s(24,"button",14),S("click",function(){return e.submit()}),u(25,5),l()()),i&2&&(r(11),h("ngModel",e.maxUpload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxUploadUnit),r(5),h("ngModel",e.maxDownload),r(),R("isClearable",!1)("options",e.sizeOptions()),r(),h("ngModel",e.maxDownloadUnit),r(4),m("loader",e.isSubmitting()))},dependencies:[v,Ee,Ae,Oe,fe,pe,Te],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Le(a,n){if(a&1&&(s(0,"div"),g(1),l(),C(2,"spk-progress-bar",11)),a&2){let i=d();r(),z("",i.statusData().actionText," - ",i.statusData().statusText),r(),R("value",i.statusData().progress*100)}}function Ge(a,n){if(a&1&&(s(0,"div",7),g(1),s(2,"spk-icon"),g(3,"clock"),l(),g(4),X(5,"relativeTime"),X(6,"date"),l()),a&2){let i,e=d();r(),G(" ",(i=e.nextBackup().backup)==null||i.Backup==null?null:i.Backup.Name," - "),r(3),z(" ",te(5,3,e.nextBackup().time)," at ",ne(6,5,e.nextBackup().time,"shortTime")," ")}}function $e(a,n){a&1&&(s(0,"div",7),u(1,1),l())}function ve(a,n){a&1&&(s(0,"div",8),E(1,2),C(2,"spk-spinner"),O(),l()),a&2&&(r(2),ee("--spinner-size","12px")("--spinner-thickness","2px"))}function xe(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.abort())}),E(1,3),C(2,"spk-icon"),O(),l()}}function we(a,n){if(a&1){let i=k();s(0,"button",10),S("click",function(){N(i);let t=d(2);return M(t.stop())}),E(1,4),C(2,"spk-icon"),O(),l()}}function ze(a,n){if(a&1&&I(0,xe,3,0,"button",12)(1,we,3,0,"button",12),a&2){let i=d();D(i.isStopping()?0:1)}}function Xe(a,n){a&1&&(E(0,0,1),C(1,"spk-icon"),O())}function He(a,n){a&1&&(E(0,0,2),C(1,"spk-icon"),O())}var Re=new Date,j=class a{#e=T(A);#t=T(Ce);#n=T(le);#a=T(ge);#s=T(oe);#l=T(de);#i=T(me);minsAgo=Re.setMinutes(Re.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=y(()=>this.#i.serverState()?.ActiveTask?.Item1);isStopping=y(()=>this.runningTask()==this.#o());#o=c(-1);pgState=y(()=>this.#i.serverState());nextBackup=y(()=>{let n=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(U,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let n=this.runningTask();n&&(this.#o.set(n),this.#e.postApiV1TaskByTaskidStop({taskid:n}).subscribe())}abort(){let n=this.runningTask();n&&this.#e.postApiV1TaskByTaskidAbort({taskid:n}).subscribe()}ngAfterViewInit(){let n=this.#s.relayIsEnabled()||!this.#l.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=f({type:a,selectors:[["app-status-bar"]],decls:15,vars:5,consts:()=>{let n;n=$localize`${"\uFFFD*10:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Pause ${"\uFFFD/*10:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*11:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Start ${"\uFFFD/*11:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Q(n);let i;i=$localize`No scheduled tasks`;let e;e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_SPINNER:`;let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Abort `;let o;return o=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Stop `,[n,i,e,t,o,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"],["spk-button",""]]},template:function(i,e){if(i&1&&(s(0,"div",5)(1,"div",6),I(2,Le,3,3)(3,Ge,7,8,"div",7)(4,$e,2,0,"div",7)(5,ve,3,4,"div",8),l(),s(6,"div",9),I(7,ze,2,1),s(8,"button",10),S("click",function(){return e.pauseResume()}),E(9,0),I(10,Xe,2,0)(11,He,2,0),O(),l(),s(12,"button",10),S("click",function(){return e.openThrottleSettingsDialog()}),s(13,"spk-icon"),g(14,"speedometer"),l()()()()),i&2){let t;r(2),D((t=e.serverState())!=null&&t.ActiveTask&&(!((t=e.statusData())==null||t.task==null)&&t.task.Status)&&((t=e.statusData())==null||t.task==null?null:t.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(t=e.serverState())!=null&&t.ActiveTask?5:4),r(5),D(e.runningTask()?7:-1),r(),m("loader",e.isResuming()),r(2),D(e.clientIsRunning()?10:11)}},dependencies:[ue,Pe,ie,ae,re,ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{j as a};
|
package/chunk-Y5IRBMLB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ea as dt}from"./chunk-CWLTHXVS.js";import{$b as rt,Ab as Z,Db as ve,Eb as ee,Fc as qe,Hc as F,Ic as N,Mc as ce,Nc as w,Oc as ie,Pa as it,Pc as ct,Qa as E,Qb as B,Qc as U,Rb as O,Sa as _e,Sb as j,Sc as pt,Tb as D,U as Ee,Ua as me,Wa as nt,X as Ze,Yb as ot,Yc as ze,Z as P,Zb as te,_b as se,a as Je,aa as et,ab as A,ac as G,bc as z,ca as tt,cb as Se,cc as at,da as H,dc as oe,ea as L,ec as R,fb as ge,fc as He,gc as ae,ha as Te,hc as ye,ja as Me,jb as Re,jc as Le,kc as je,lc as Be,ma as Ie,mc as lt,na as I,nc as le,ob as st,oc as K,rb as Ve,sb as W,sc as We,ta as $,tb as q,tc as ke,ub as Pe,vb as Ae,wb as Fe,xb as re,yb as _,zb as S}from"./chunk-BTMXQPBB.js";import{a as ne,b as pe,c as Ke,d as h,e as b,f as T,g as x}from"./chunk-EUDKD2JW.js";var Y=["*"],Dt=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Ot=["[icon]","[title]","*","[content]"];function bt(t,e){t&1&&(_(0,"spk-icon",3),R(1,"info"),S())}function Et(t,e){t&1&&(_(0,"spk-icon",3),R(1,"info"),S())}function Tt(t,e){t&1&&(_(0,"spk-icon",3),R(1,"warning"),S())}function Mt(t,e){t&1&&(_(0,"spk-icon",3),R(1,"warning-octagon"),S())}function It(t,e){t&1&&(_(0,"spk-icon",3),R(1,"check-circle"),S())}function Rt(t,e){t&1&&(_(0,"spk-icon",3),R(1,"question"),S())}function Vt(t,e){if(t&1){let o=ee();_(0,"spk-icon",7),B("click",function(){H(o);let n=O();return L(n.removeAlert())}),R(1,"plus"),S()}}var Pt=["dialogRef"];function At(t,e){if(t&1){let o=ee();_(0,"div",4),B("click",function(){H(o);let n=O();return L(n.isOpen.set(!1))}),S()}}var Ft=["spk-button",""];var Ht=["triggerRef"],Lt=["popoverRef"],jt=[[["","trigger",""]],"*"],Bt=["[trigger]","*"];var Wt=()=>({closeOnButton:!1,closeOnEsc:!0});var qt=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],zt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],ut=["input"],Nt=[[["label"]]],Ut=["label"];function $t(t,e){if(t&1&&(_(0,"div",3),R(1),S()),t&2){let o=O();E(),He(o.files()[0].name)}}function Qt(t,e){if(t&1&&(_(0,"div",3),R(1),S()),t&2){let o=O();E(),ae("",o.files().length," files selected")}}function Yt(t,e){if(t&1&&(_(0,"div",4),R(1),S()),t&2){let o=O();E(),He(o.filesOver()?o.overlayText():o.placeholder())}}var Xt=["optionsRef"],Gt=["*",[["","menu",""]]],Kt=["*","[menu]"];function Jt(t,e){t&1&&(_(0,"spk-icon",5),R(1,"caret-down"),S())}var Zt=[[["label"]],[["input","type","range"]]],ei=["label","input[type=range]"],ti=["optionsWrap"],ii=[[["label"]],[["input"]],[["textarea"]]],ni=["label","input","textarea"],si=()=>({closeOnButton:!1,closeOnEsc:!1}),Ye=t=>({$implicit:t});function oi(t,e){if(t&1&&R(0),t&2){let o=O();ae(" ",o.inputValue()," ")}}function ri(t,e){t&1&&ve(0)}function ai(t,e){if(t&1&&ge(0,ri,1,0,"ng-container",13),t&2){let o=O(3).$implicit;O(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ke(2,Ye,o))}}function li(t,e){if(t&1&&R(0),t&2){let o=O(3).$implicit,i=O(2);ae(" ",i.getLabel(o)," ")}}function ci(t,e){if(t&1){let o=ee();_(0,"spk-chip",11),W(1,ai,1,4,"ng-container")(2,li,1,1),_(3,"spk-icon",12),B("click",function(n){H(o);let s=O(2).$index,u=O(2);return L(u.removeSelectedOptionByIndex(n,s))}),R(4,"x-bold"),S()()}if(t&2){let o=O(4),i=K(2);oe(o.selectClasses()),E(),q(i?1:2)}}function pi(t,e){t&1&&ve(0)}function di(t,e){if(t&1&&ge(0,pi,1,0,"ng-container",13),t&2){let o=O(4).$implicit;O(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ke(2,Ye,o))}}function ui(t,e){if(t&1&&R(0),t&2){let o=O(4).$implicit,i=O(2);ae(" ",i.getLabel(o)," ")}}function hi(t,e){if(t&1&&W(0,di,1,4,"ng-container")(1,ui,1,1),t&2){O(5);let o=K(2);q(o?0:1)}}function fi(t,e){if(t&1&&W(0,hi,2,1),t&2){O(4);let o=K(5);q(o?-1:0)}}function mi(t,e){if(t&1&&W(0,ci,5,3,"spk-chip",10)(1,fi,1,1),t&2){O(3);let o=K(4);q(o?0:1)}}function gi(t,e){if(t&1&&W(0,mi,2,1),t&2){let o=e.$implicit;q(o?0:-1)}}function vi(t,e){if(t&1&&Ae(0,gi,1,1,null,null,Pe),t&2){O();let o=K(1);Fe(o)}}function Ci(t,e){t&1&&ve(0)}function _i(t,e){if(t&1&&ge(0,Ci,1,0,"ng-container",14),t&2){O(2);let o=K(0);re("ngTemplateOutlet",o)}}function Si(t,e){if(t&1&&R(0),t&2){let o=O(2);ae(" ",o.placeholderText()??""," ")}}function yi(t,e){if(t&1&&W(0,_i,1,1,"ng-container")(1,Si,1,1),t&2){O();let o=K(0);q(o?0:1)}}function ki(t,e){t&1&&(_(0,"spk-icon",6),R(1,"caret-down"),S())}function wi(t,e){t&1&&Z(0,"spk-spinner",7)}function xi(t,e){t&1&&(_(0,"spk-icon",6),R(1,"list-magnifying-glass"),S())}function Di(t,e){t&1&&(_(0,"spk-icon",6),R(1,"magnifying-glass"),S())}function Oi(t,e){if(t&1){let o=ee();_(0,"spk-icon",15),B("click",function(n){H(o);let s=O();return L(s.clear(n))}),R(1,"x-bold"),S()}}function bi(t,e){t&1&&(_(0,"spk-icon",6),R(1,"caret-down"),S())}function Ei(t,e){t&1&&(_(0,"spk-icon",6),R(1,"caret-up"),S())}function Ti(t,e){if(t&1&&Z(0,"spk-checkbox"),t&2){let o=O().$index,i=O();oe(i.selectClasses()),z("active",i.isSelected(o))}}function Mi(t,e){t&1&&ve(0)}function Ii(t,e){if(t&1&&ge(0,Mi,1,0,"ng-container",13),t&2){let o=O().$implicit;O();let i=K(3);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ke(2,Ye,o))}}function Ri(t,e){if(t&1&&R(0),t&2){let o=O().$implicit,i=O();ae(" ",i.getLabel(o)," ")}}function Vi(t,e){if(t&1){let o=ee();_(0,"li",16),B("click",function(){let n=H(o).$index,s=O();return L(s.toggleOptionByIndex(n))}),W(1,Ti,1,4,"spk-checkbox",17),W(2,Ii,1,4,"ng-container")(3,Ri,1,1),S()}if(t&2){let o=e.$index,i=O(),n=K(3);z("selected",i.isSelected(o))("focused",o===i.focusedOptionIndex()),E(),q(i.selectMultiple()?1:-1),E(),q(n?2:3)}}var Pi=["dragImageElement"],Ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Fi=["[sidenav]","[sidenav-closed-topbar]","*"];function Hi(t,e){t&1&&Z(0,"div",1,0)}function Li(t,e){if(t&1){let o=ee();_(0,"div",7),B("drop",function(n){H(o);let s=O();return L(s.drop(n))})("dragover",function(n){H(o);let s=O();return L(s.dragOver(n))})("dragenter",function(){H(o);let n=O();return L(n.dragEnter())})("dragleave",function(){H(o);let n=O();return L(n.dragLeave())}),S()}}function ji(t,e){if(t&1){let o=ee();_(0,"div",8),B("dragstart",function(n){H(o);let s=O();return L(s.dragStart(n))})("dragend",function(n){H(o);let s=O();return L(s.dragEnd(n))})("drag",function(n){H(o);let s=O();return L(s.drag(n))})("touchstart",function(n){H(o);let s=O();return L(s.touchStart(n))})("touchmove",function(n){H(o);let s=O();return L(s.touchMove(n))})("touchend",function(n){H(o);let s=O();return L(s.touchEnd(n))})("touchcancel",function(n){H(o);let s=O();return L(s.touchCancel(n))}),S()}}var Bi=["thead"],Wi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],qi=["[table-header]","*","[table-no-rows]"];function zi(t,e){t&1&&Z(0,"spk-progress-bar",1)}function Ni(t,e){t&1&&(_(0,"div",2),D(1,2),S())}var Ui=[[["","title",""]],"*"],$i=["[title]","*"];function Qi(t,e){t&1&&R(0,"Title")}function Yi(t,e){t&1&&(_(0,"spk-icon",1),R(1,"caret-down"),S())}var Xi=["bold","thin","light","fill"],ue=(()=>{var e,o;let i=class i{constructor(){b(this,e,P($));b(this,o,P(me))}ngAfterContentInit(){let s=h(this,e).nativeElement.textContent?.trim();if(!s)return;let u=s.split("-").at(-1);u&&Xi.includes(u)&&h(this,o).addClass(h(this,e).nativeElement,u)}};e=new WeakMap,o=new WeakMap,i.\u0275fac=function(u){return new(u||i)},i.\u0275cmp=A({type:i,selectors:[["spk-icon"]],ngContentSelectors:Y,decls:1,vars:0,template:function(u,f){u&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=i;return t})(),En=(()=>{let e=class e{constructor(){this._el=P($),this.alertService=w(null),this.id=w(null),this.alertClasses=F(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Ot,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(n,s){if(n&1&&(j(Dt),_(0,"div",1)(1,"div",2,0),D(3),S(),_(4,"div",2),W(5,bt,2,0,"spk-icon",3)(6,Et,2,0,"spk-icon",3)(7,Tt,2,0,"spk-icon",3)(8,Mt,2,0,"spk-icon",3)(9,It,2,0,"spk-icon",3)(10,Rt,2,0,"spk-icon",3),S(),_(11,"div",4),D(12,1),D(13,2),S(),W(14,Vt,2,0,"spk-icon",5),_(15,"div",6),D(16,3),S()()),n&2){let u=rt(2);E(),G("display",u.children.length?"block":"none");let f=s.alertClasses();E(4),q(f.includes("primary")?5:f.includes("accent")?6:f.includes("warn")?7:f.includes("error")?8:f.includes("success")?9:10),E(9),q(s.id()?14:-1)}},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})();function Xe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Tn=(()=>{let e=class e{constructor(){this.alertHistory=I([]),this.alertHistoryIsOpen=I(!1),this.alertHistoryIsHidden=I(!0)}error(i){this.addAlert({type:"error",title:i??"An error occured"})}success(i){this.addAlert({type:"success",title:i})}question(i){this.addAlert({type:"question",title:i})}warning(i){this.addAlert({type:"warn",title:i})}info(i){this.addAlert({type:"primary",title:i})}addAlert(i){let n=Xe();this.alertHistory.update(s=>[pe(ne({},i),{isOpen:!0,animateIn:!0,animateOut:!1,id:n}),...s]),setTimeout(()=>{this.alertHistory.update(s=>s.map(u=>pe(ne({},u),{animateIn:u.id===n?!1:u.animateIn})))},40),setTimeout(()=>{this.hideAlert(n)},2500)}removeAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{animateOut:s.id===i?!1:s.animateOut}))),setTimeout(()=>{this.alertHistory.update(n=>n.filter(s=>s.id!==i))},300)}hideAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{isOpen:s.id===i?!1:s.isOpen})))}setHidden(i){this.alertHistoryIsHidden.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Ee({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),be=new Ze("Sparkle UI Config"),Gi={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Ki=(()=>{var e;let o=class o{constructor(){b(this,e);T(this,e,P(be,{optional:!0})),this.dialogRef=ie("dialogRef"),this.isOpen=U(!1),this.options=w(),this.closed=ce(),this.defaultOptionMerge=F(()=>ne(pe(ne({},Gi),{class:h(this,e)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=N(()=>{let n=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(n?.showModal(),n?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",s=>{s.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&s.preventDefault(),s.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),n?.close())})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=A({type:o,selectors:[["spk-dialog"]],viewQuery:function(s,u){s&1&&te(u.dialogRef,Pt,5),s&2&&se()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Y,decls:5,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(s,u){if(s&1&&(j(),_(0,"dialog",1,0)(2,"div",2),D(3),S(),W(4,At,1,0,"div",3),S()),s&2){let f=u.defaultOptionMerge();oe(f.class),G("width",f.width??"")("max-width",f.maxWidth??"")("max-height",f.maxHeight??"")("height",f.height??""),E(4),q(u.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0});let t=o;return t})(),Mn=(()=>{var e,o,i,ht,Ce;let u=class u{constructor(){b(this,i);b(this,e);b(this,o);T(this,e,document.querySelector("body")),T(this,o,P(st)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(l,r){let d=h(this,o).injector,m=x(this,i,ht).call(this),k=r||{},{data:v,closed:a}=k,c=Ke(k,["data","closed"]);this.compRef&&x(this,i,Ce).call(this),this.insertedCompRef=ze(l,{environmentInjector:d}),this.compRef=ze(Ki,{hostElement:m,environmentInjector:d,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let p=this.insertedCompRef.instance?.data,g=this.insertedCompRef.instance?.closed;if(v){if(Ie(p))this.insertedCompRef.setInput("data",v);else if(!Ie(p))throw new Error("data is not an input signal on the passed component")}g instanceof qe&&(this.closedFieldSub=g.subscribe((...M)=>{a?.(...M),x(this,i,Ce).call(this)})),h(this,o).attachView(this.insertedCompRef.hostView),h(this,o).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",c),this.compRef.instance.closed.subscribe(()=>C());let y=this;function C(){var M;g&&g instanceof qe?g.emit(!1):a?.(void 0),x(M=y,i,Ce).call(M)}return{component:this.insertedCompRef.instance,close:C}}ngOnDestroy(){x(this,i,Ce).call(this)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,ht=function(){let l=document.createElement("spk-dialog-ref");return l.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||h(this,e).append(l),document.getElementById("spk-dialog-ref")},Ce=function(){this.insertedCompRef&&(h(this,o).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(h(this,o).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},u.\u0275fac=function(r){return new(r||u)},u.\u0275prov=Ee({token:u,factory:u.\u0275fac,providedIn:"root"});let t=u;return t})(),In=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-button-group"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Ji=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["","spk-button",""]],attrs:Ft,ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Rn=(()=>{var e;let o=class o{constructor(){b(this,e);T(this,e,P(be,{optional:!0})),this.class=I(h(this,e)?.cardType??"default")}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=A({type:o,selectors:[["spk-card"]],hostVars:2,hostBindings:function(s,u){s&2&&oe(u.class())},ngContentSelectors:Y,decls:1,vars:0,template:function(s,u){s&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),Zi=(()=>{var e;let o=class o{constructor(){b(this,e,P($))}onClick(){h(this,e).nativeElement.querySelector("input")&&h(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=A({type:o,selectors:[["spk-checkbox"]],hostBindings:function(s,u){s&1&&B("click",function(){return u.onClick()})},ngContentSelectors:Y,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(s,u){s&1&&(j(),_(0,"div",0)(1,"spk-icon",1),R(2,"check"),S(),_(3,"spk-icon",2),R(4,"minus"),S()(),D(5))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=o;return t})(),en=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-chip"]],ngContentSelectors:Y,decls:2,vars:0,template:function(n,s){n&1&&(j(),_(0,"div"),D(1),S())},encapsulation:2,changeDetection:0});let t=e;return t})();var tn=["scroll","auto"],nn={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},ft=(()=>{var e,o,i,mt,we;let u=class u{constructor(){b(this,i);b(this,e);b(this,o);T(this,e,P(pt)),T(this,o,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=w(!1),this.right=w(!1),this.onHover=w(!1),this.asMultiLayer=w(!1),this.markForCheck=w(null),this._above=I(this.above()),this._right=I(this.right()),this.disableOpenByClick=w(!1),this.isOpen=U(!1),this.options=w(),this.closed=ce(),this.defaultOptionMerge=F(()=>ne(ne({},nn),this.options())),this.triggerRef=ie.required("triggerRef"),this.popoverRef=ie.required("popoverRef"),this.id=I("--"+Xe()),this.menuStyle=I(null),this.openAbort=null,this.openEffect=N(()=>{let l=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let d={signal:this.openAbort?.signal};l?.showPopover(),document.addEventListener("keydown",m=>{m.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&m.preventDefault(),m.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},d),setTimeout(()=>{x(this,i,mt).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>x(this,i,we).call(this),d),window?.addEventListener("resize",()=>x(this,i,we).call(this),d),x(this,i,we).call(this)})}else l.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=N(()=>{this.markForCheck()&&h(this,e).markForCheck()})}toggleIsOpen(l){l.preventDefault(),l.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(l){l.stopPropagation(),l.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,mt=function(l){let r=l.parentElement;for(;r;){if(tn.indexOf(window?.getComputedStyle(r).overflowY)>-1&&r.scrollHeight>r.clientHeight)return r;r=r.parentElement}return document.documentElement},we=function(){let l=this.triggerRef()?.nativeElement.getBoundingClientRect(),r=this.popoverRef()?.nativeElement.getBoundingClientRect(),d=l.left,m=l.bottom,v=d,a=m+h(this,o),c=v+r.width>window?.innerWidth,p=a+r.height>window?.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(p),this._right.set(c);else{if(v=d,a=m+h(this,o),p){let y=l.top-r.height-h(this,o);y<0||(a=y)}c&&(v=l.right-r.width,v<0&&(v=0));let g={left:v+"px",top:a+"px"};this.menuStyle.set(g)}},u.\u0275fac=function(r){return new(r||u)},u.\u0275cmp=A({type:u,selectors:[["spk-popover"]],viewQuery:function(r,d){r&1&&(te(d.triggerRef,Ht,5),te(d.popoverRef,Lt,5)),r&2&&se(2)},hostVars:6,hostBindings:function(r,d){r&2&&z("above",d.above())("right",d.right())("multi-layer",d.asMultiLayer())},inputs:{above:[1,"above"],right:[1,"right"],onHover:[1,"onHover"],asMultiLayer:[1,"asMultiLayer"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Bt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(r,d){if(r&1){let m=ee();j(jt),_(0,"div",2,0),B("click",function(a){return H(m),L(d.toggleIsOpen(a))}),_(2,"div",3),D(3),S(),_(4,"button",4),R(5,"Open popover"),S()(),_(6,"div",5,1)(8,"div",6),B("click",function(a){return H(m),L(d.isOpen()&&d.eventClose(a))}),S(),D(9,1),S()}r&2&&(G("anchor-name",d.id()),E(6),at(d.menuStyle()),G("position-anchor",d.id()))},dependencies:[Ji],encapsulation:2,changeDetection:0});let t=u;return t})();var Vn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-divider"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Ge=(()=>{var e;let o=class o{constructor(){b(this,e,P($));Re(()=>{let n=typeof CSS<"u"&&CSS.supports("field-sizing","content"),s=h(this,e).nativeElement.querySelector("textarea");if(!n&&s!==null){let l=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},r=function(){setTimeout(l,0)};var u=l,f=r;s.addEventListener("change",l),s.addEventListener("cut",r),s.addEventListener("paste",r),s.addEventListener("drop",r),s.addEventListener("keydown",r),s.focus(),s.select(),l()}})}onClick(){h(this,e).nativeElement.querySelector("input")&&h(this,e).nativeElement.querySelector("input").focus(),h(this,e).nativeElement.querySelector("textarea")&&h(this,e).nativeElement.querySelector("textarea").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=A({type:o,selectors:[["spk-form-field"]],hostBindings:function(s,u){s&1&&B("click",function(){return u.onClick()})},ngContentSelectors:zt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(s,u){s&1&&(j(qt),D(0),_(1,"div",0)(2,"div",1),D(3,1),D(4,2),S(),D(5,3),D(6,4),_(7,"div",2),D(8,5),D(9,6),S()(),_(10,"div",3)(11,"div",4),D(12,7),S(),_(13,"div",5),D(14,8),S()())},encapsulation:2,changeDetection:0});let t=o;return t})(),Pn=(()=>{let e=class e{constructor(){this._el=P($),this.inputRef=ie.required("input"),this.filesOver=I(!1),this.multiple=w(),this.accept=w(null),this.placeholder=U("Click or drag files here"),this.overlayText=w("Drop files here"),this.files=U([]),this.fileUploadClasses=F(()=>this._el.nativeElement.classList.toString()),this.inputEffect=N(()=>{let i=this.inputRef().nativeElement;i&&(i.placeholder&&this.placeholder.set(i.placeholder),i.addEventListener("dragover",n=>{n.preventDefault(),this.filesOver.set(!0)}),i.addEventListener("dragleave",n=>{n.preventDefault(),this.filesOver.set(!1)}),i.addEventListener("drop",n=>{n.preventDefault(),this.filesOver.set(!1);let s=n.dataTransfer?.files;s&&s.length>0&&(this.handleFileUpload(Array.from(s)),i.files=s)}),i.addEventListener("change",n=>{n.preventDefault(),this.handleFileUpload(Array.from(n.target.files))}))})}handleFileUpload(i){this.multiple()?this.files.update(n=>[...n,...i]):this.files.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-file-upload"]],viewQuery:function(n,s){n&1&&te(s.inputRef,ut,5),n&2&&se()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:Ut,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(n,s){n&1&&(j(Nt),_(0,"spk-form-field"),D(1,0,["ngProjectAs","label",5,["label"]]),_(2,"div",2,0),W(4,$t,2,1,"div",3)(5,Qt,2,1,"div",3)(6,Yt,2,1,"div",4),Z(7,"input",5,1)(9,"div",6),S(),_(10,"spk-icon",7),R(11,"upload-simple"),S()()),n&2&&(oe(s.fileUploadClasses()),E(4),q(s.files().length===1?4:s.files().length>1?5:6),E(3),Ve("multiple",s.multiple())("accept",s.accept()),E(2),z("files-over",s.filesOver()))},dependencies:[Ge,ue],encapsulation:2,changeDetection:0});let t=e;return t})(),An=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-list"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();function gt(t,e){let o=e?.injector||(tt(gt),P(Te)),{debounce:i=0,initialValue:n=void 0,transform:s=C=>C,compare:u=(C,k)=>C===k,forceType:f=void 0,returnPreviousValue:l=!0}=e||{},r=I(n),d=o.get(Me),m=F(()=>{let C=t()?.nativeElement;if(C instanceof HTMLInputElement||C instanceof HTMLTextAreaElement)return g(C)}),v=!1,a,c=null;return N(()=>{let C=m();if(!C)return r.set(l&&a?s(a):void 0);n!==void 0&&C.value===""?r.set(n):C.value!==""&&p();let k=M=>{c!==null&&clearTimeout(c),c=setTimeout(()=>{c=null,p()},i)};C.addEventListener("input",k),C.addEventListener("inputValueChanged",k),d.onDestroy(()=>{C.removeEventListener("input",k),C.removeEventListener("inputValueChanged",k),c!==null&&clearTimeout(c)})},{injector:o}),N(()=>{let C=m();if(!C)return;let k=r()??"",M=k==null?"":String(k);C.value!==M&&(a=M,C.value=M,C.dispatchEvent(new Event("input")))},{injector:o}),r;function p(){if(!v){v=!0;try{let C=m();if(!C)return;let k=C.value,M=f?y(k,f):s(k);a=k,u(r(),M)||r.set(M)}finally{v=!1}}}function g(C){return Object.defineProperty(C,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").get.call(this)},set(k){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").set.call(this,k);let V=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:k}});return this.dispatchEvent(V),k}}),C}function y(C,k){switch(k){case"string":return C.toString();case"number":let M=Number(C);return isNaN(M)?void 0:M;case"boolean":return C.toLowerCase()==="true"?!0:C.toLowerCase()==="false"?!1:void 0;default:return C}}}function vt(t,e){let o=P(Te),i=o.get(Me),n=I([]),s=null,u=null,f=(r,d)=>{u&&u.disconnect();let m=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(m),typeof MutationObserver<"u"&&(u=new MutationObserver(v=>{requestAnimationFrame(()=>{let a=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(a)})}),u.observe(r.nativeElement,{childList:!0,subtree:!0})),i.onDestroy(()=>l())};s=N(()=>{let r=typeof t=="function"&&t[Je]?t():t,d=typeof e=="function"?e():e;r&&d?.length>0?f(r,d):(n.set([]),u&&(u.disconnect(),u=null))},{injector:o});function l(){s&&s.destroy(),u&&u.disconnect()}return{signal:n.asReadonly(),destroy:l}}var Fn=(()=>{var e,o,Ct,Ne;let s=class s{constructor(){b(this,o);b(this,e);T(this,e,P(me)),this.above=w(!1),this.right=w(!1),this.asMultiLayer=w(!1),this.openIndicator=w(!1),this.disabled=w(!1),this.customOptionElementSelectors=w(["button"]),this.keepClickedOptionActive=w(!1),this.closeOnClick=w(!0),this.isOpen=U(!1),this.closed=ce(),this.searchable=w(!1),this.activeOptionIndex=I(-1),this.inputRef=ie("input"),this.optionsRef=ie("optionsRef"),this.options=vt(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=F(()=>this.options.signal().filter(f=>!f.disabled)),this.inputValue=gt(this.inputRef),this.abortController=null,this.optionsEffect=N(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let f=this.inputRef()?.nativeElement;f&&(queueMicrotask(()=>f.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,m=this.activeElements();if(!m.length){let a=this.optionsEl();this.activeElements.set(a),m=a}let v=m.findIndex(a=>a===d);v>-1&&(this.activeOptionIndex.set(v),f.focus())}),f.addEventListener("keydown",l=>{let r=this.activeOptionIndex();l.key==="ArrowDown"?(l.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):l.key==="ArrowUp"?(l.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):l.key==="Enter"?(l.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):l.key==="Tab"&&(l.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=I([]),this.lastInputValue="",this.inputValueEffect=N(()=>{if(!this.searchable())return;let l=(this.inputValue()??"").toLowerCase();if(x(this,o,Ne).call(this),!l||l==="")return;let r=this._lastElementList.length&&l.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=l;for(let d=0;d<r.length;d++){let m=r[d],v=m.textContent?.toLowerCase()||"",a=x(this,o,Ct).call(this,v,l);m.value=a}r=r.filter(d=>d.value>0).sort((d,m)=>m.value-d.value);for(let d=0;d<r.length;d++)h(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=N(()=>{let f=this.activeElements(),l=this.activeOptionIndex();for(let r=0;r<f.length;r++)f[r].classList.remove("active");l>-1&&(f[l].scrollIntoView({block:"center"}),f[l].classList.add("active"))})}nextActiveIndex(f){let l=this.activeElements();if(!l.length){let d=this.optionsEl();this.activeElements.set(d),l=d}if(f===-1||f===l.length-1)return 0;let r=f+1;return l[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(f){let l=this.activeElements();if(!l.length){let d=this.optionsEl();this.activeElements.set(d),l=d}if(f===0||f===-1)return l.length-1;let r=f-1;return l[r].disabled?this.prevActiveIndex(r):r}close(f="closed",l){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||f==="closed")&&x(this,o,Ne).call(this),this.isOpen.set(!1),this.closed.emit(f==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,o=new WeakSet,Ct=function(f,l){if(!l)return 0;let r=0,d=-1,m=0,v=!0;for(let a=0;a<l.length;a++){let c=l[a];if(f.length>d+1&&f[d+1]===c)r+=a===0?100:150,d++,m++;else{let p=f.indexOf(c,d+1);if(a>0&&(v=!1),p===-1)return 0;r+=100,d=p,m++}}return v&&l.length===m&&(r+=1e3),r+=m*20,r},Ne=function(){this.activeOptionIndex.set(-1);let f=this.optionsEl();for(let l=0;l<f.length;l++)f[l].classList.remove("active")},s.\u0275fac=function(l){return new(l||s)},s.\u0275cmp=A({type:s,selectors:[["spk-menu"]],viewQuery:function(l,r){l&1&&(te(r.inputRef,ut,5),te(r.optionsRef,Xt,5)),l&2&&se(2)},hostVars:6,hostBindings:function(l,r){l&2&&z("disabled",r.disabled())("has-search",r.searchable())("multi-layer",r.asMultiLayer())},inputs:{above:[1,"above"],right:[1,"right"],asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Kt,decls:12,vars:14,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(l,r){if(l&1){let d=ee();j(Gt),_(0,"spk-popover",3,0),Be("isOpenChange",function(v){return H(d),je(r.isOpen,v)||(r.isOpen=v),L(v)}),B("closed",function(){return H(d),L(r.close("fromPopover"))}),_(2,"div",4),B("click",function(){return H(d),L(!r.disabled()&&r.isOpen.set(!0))}),D(3),W(4,Jt,2,0,"spk-icon",5),S(),_(5,"div",6)(6,"spk-form-field",7),Z(7,"input",8,1),S()(),_(9,"div",9,2),B("click",function(){return H(d),L(r.close("active"))}),D(11,1),S()()}l&2&&(Le("isOpen",r.isOpen),re("disableOpenByClick",!0)("above",r.above())("right",r.right())("asMultiLayer",r.asMultiLayer())("options",We(13,Wt)),E(2),z("is-open",r.isOpen()),E(2),q(r.openIndicator()?4:-1),E(2),z("hidden",r.searchable()===!1),E(3),z("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[ft,Ge,ue],encapsulation:2,changeDetection:0});let t=s;return t})(),sn=(()=>{let e=class e{constructor(){this.value=w(void 0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(n,s){n&1&&Z(0,"div",0),n&2&&G("width",s.value(),"%")},encapsulation:2,changeDetection:0});let t=e;return t})(),Hn=(()=>{var e;let o=class o{constructor(){b(this,e,P($))}onClick(){h(this,e).nativeElement.querySelector("input")&&h(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=A({type:o,selectors:[["spk-radio"]],hostBindings:function(s,u){s&1&&B("click",function(){return u.onClick()})},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"radio"]],template:function(s,u){s&1&&(j(),Z(0,"div",0),D(1))},encapsulation:2,changeDetection:0});let t=o;return t})(),Ln=(()=>{var e,o,i,n,s,Ue,_t,St,yt;let d=class d{constructor(){b(this,s);b(this,e);b(this,o);b(this,i);b(this,n);T(this,e,P($)),T(this,o,null),T(this,i,null),T(this,n,0),this.alwaysShowThumb=w(!1),this.unit=w(""),this.value=U(h(this,n)),this.inputState=I({min:0,max:100,step:1}),this.valuePercentage=F(()=>{let{min:v,max:a}=this.inputState(),c=this.value()??v;if(isNaN(c))return 0;let p=a-v;if(p===0)return 0;let g=(c-v)/p*100;return Math.max(0,Math.min(100,g))}),this.trackFilledPercentage=F(()=>this.valuePercentage()),this.thumbPositionPercentage=F(()=>this.valuePercentage()),this.syncModelToInputEffect=N(()=>{let v=this.value();if(h(this,i)){let a=parseFloat(h(this,i).value);(isNaN(a)||String(a)!==String(v))&&(h(this,i).value=String(v))}})}get hasInputElement(){return!!h(this,i)}ngAfterViewInit(){T(this,i,h(this,e).nativeElement.querySelector('input[type="range"]')),h(this,i)?(x(this,s,yt).call(this,h(this,i)),h(this,i).oninput=()=>{this.setNewInputValue(h(this,i).value)},h(this,i).addEventListener("inputValueChanged",v=>{this.setNewInputValue(v.detail.value)}),queueMicrotask(()=>x(this,s,Ue).call(this,!0)),x(this,s,_t).call(this)):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(v){let a=parseFloat(v??"0");if(!isNaN(a)){let{min:c,max:p}=this.inputState();this.value.set(Math.max(c,Math.min(p,a)))}}trackEvent(v){if(!h(this,i)||h(this,i).readOnly||h(this,i).disabled){v.preventDefault(),v.stopPropagation();return}if(v.target===h(this,i)||v.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let c=v.currentTarget.getBoundingClientRect(),p=v.clientX-c.left,g=c.width,{min:y,max:C,step:k}=this.inputState(),M=C-y;if(g>0&&M!==0&&k>0){let Q=(p/g*M+y-y)/k,J=y+Math.round(Q)*k,he=x(this,s,St).call(this,k);J=parseFloat(J.toFixed(he));let fe=Math.max(y,Math.min(C,J));this.value.set(fe)}}ngOnDestroy(){h(this,o)&&h(this,o).disconnect(),h(this,i)&&(h(this,i).oninput=null)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,Ue=function(v=!1){if(!h(this,i))return;let a=parseFloat(h(this,i).min??"0")??0,c=parseFloat(h(this,i).max??"100")??100,p=h(this,i).step,g=1;if(p&&p.toLowerCase()!=="any"){let C=parseFloat(p);!isNaN(C)&&C>0&&(g=C)}this.inputState.set({min:a,max:c,step:g});let y=parseFloat(h(this,i).value??String(a))??a;if(v&&this.value()!==h(this,n)){let C=this.value(),k=Math.max(a,Math.min(c,C));y!==k&&(h(this,i).value=String(k)),C!==k&&this.value.set(k)}else{let C=Math.max(a,Math.min(c,y));this.value()!==C&&this.value.set(C)}},_t=function(){if(!h(this,i)||typeof MutationObserver>"u")return;let v=["min","max","step","value","readonly","disabled"];T(this,o,new MutationObserver(a=>{let c=!1;for(let p of a)if(p.type==="attributes"&&v.includes(p.attributeName??"")){c=!0;break}c&&x(this,s,Ue).call(this,!1)})),h(this,o).observe(h(this,i),{attributes:!0})},St=function(v){if(isNaN(v)||Math.floor(v)===v)return 0;let c=v.toString().split(".")[1];return c?c.length:0},yt=function(v){Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(a){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,a);let p=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:a}});return this.dispatchEvent(p),a}})},d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=A({type:d,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(a,c){a&2&&z("has-input",c.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:ei,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(a,c){a&1&&(j(Zt),_(0,"div",0),D(1),S(),_(2,"div",1)(3,"div",2),R(4),S(),_(5,"div",3),B("click",function(g){return c.trackEvent(g)}),D(6,1),_(7,"div",4),Z(8,"div",5),S(),_(9,"div",6)(10,"div",7)(11,"div",8),R(12),S()()()(),_(13,"div",9),R(14),S()()),a&2&&(E(4),ye("",c.inputState().min,"",c.unit()),E(4),G("width",c.trackFilledPercentage(),"%"),E(),G("left",c.thumbPositionPercentage(),"%"),E(),z("always-show",c.alwaysShowThumb()),E(2),ye("",c.value(),"",c.unit()),E(2),ye("",c.inputState().max,"",c.unit()))},encapsulation:2,changeDetection:0});let t=d;return t})(),on=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(n,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),jn=(()=>{var e,o,i,$e,s,Qe,X,kt,wt,xt;let m=class m{constructor(){b(this,i);b(this,e);b(this,o);b(this,s);T(this,e,P($)),this.value=w(),this.label=w(),this.asFreeText=w(!1),this.placeholder=w(),this.readonly=U(!1),this.disabled=U(!1),this.lazySearch=w(!1),this.inlineSearch=w(!1),this.asText=w(!1),this.isClearable=w(!0),this.selectMultiple=w(!1),this.optionTemplate=w(null),this.selectedOptionTemplate=w(null),this.placeholderTemplate=w(null),this.isOpen=U(!1),this.isLoading=U(!1),this.options=U([]),this.selectedOptions=U([]),this.cleared=ce(),this.inlineTemplate=ct(_e),this.optionsWrapRef=ie.required("optionsWrap"),this.inputRefInput=I(null),T(this,o,typeof MutationObserver<"u"&&new MutationObserver(a=>{for(var c of a)c&&(c.target.nodeName==="INPUT"||c.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new $(c.target)),h(this,o).disconnect())})),this.inputValue=I(""),this.prevInputValue=I(null),this.focusedOptionIndex=I(-1),this._isClearable=F(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=F(()=>h(this,e).nativeElement.classList.toString()),this.stretch=F(()=>this.selectClasses().includes("stretch")),this.small=F(()=>this.selectClasses().includes("small")),this.placeholderText=F(()=>{let a=this.placeholder(),c=this.inputRefEl();return a||c?.placeholder||null}),this.selectedOptionValues=F(()=>{let a=this.selectedOptions(),c=this.value();return c?a.map(p=>x(this,i,X).call(this,p,c)):a}),this.filteredOptions=F(()=>{let a=this.options()||[],c=this.label(),p=this.value(),g=this.inlineSearch(),y=this.inputValue().toLowerCase(),C=x(this,i,wt).call(this,y);if(a.length<=0)return[];if(!g||y==="")return a;let M=a.filter(V=>{let Q=c?(x(this,i,X).call(this,V,c)??"").toString().toLowerCase():(V??"").toString().toLowerCase(),J=((p?x(this,i,X).call(this,V,p):V)??"").toString().toLowerCase(),he=C.test(Q),fe=C.test(J);return he||fe}).map(V=>{let Q=c?(x(this,i,X).call(this,V,c)??"").toString().toLowerCase():(V??"").toString().toLowerCase(),J=((p?x(this,i,X).call(this,V,p):V)??"").toString().toLowerCase(),he=x(this,i,$e).call(this,Q,y),fe=x(this,i,$e).call(this,J,y);return{item:V,score:Math.max(he,fe)}});return M.sort((V,Q)=>Q.score-V.score),M.map(V=>V.item)}),this.inputRefEl=F(()=>{let a=this.inputRefInput();if(a===null)return;let c=a?a.nativeElement:null;return c?(c.autocomplete="off",x(this,i,kt).call(this,c),c.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&c.addEventListener("input",p=>{let g=p.target.value,y=this.inputValue();g!==y&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(g),this.updateInputElValue())}),c.addEventListener("inputValueChanged",p=>{let g=p.detail.value,y=this.inputValue();if(g!==y){if(g===""){this.clear();return}this.setSelectedOptionsFromValue(g),this.setInputValueFromSelectedOptions(),x(this,i,Qe).call(this)}}),c):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=N(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let c=this.inputRefEl();if(!c)return;c.addEventListener("keydown",p=>{if((p.key==="Escape"||p.key==="Tab")&&(p.preventDefault(),this.close()),(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),p.key==="ArrowDown"){p.preventDefault();let g=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(g>this.filteredOptions().length-1?0:g)}if(p.key==="ArrowUp"){p.preventDefault();let g=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(g<0?this.filteredOptions().length-1:g)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=N(()=>{let a=this.inputValue();this._inputValue=a}),this.inputRefElEffect=N(()=>{let a=this.inputRefEl();a&&a.value!==this._inputValue&&(this.disabled.set(a.disabled),this.setSelectedOptionsFromValue(a.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=F(()=>{let a=this.selectedOptions();return this.label()?a.map(p=>this.getLabel(p)).join(", "):a.join(", ")}),this.inputState=F(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=F(()=>this.inlineSearch()||this.lazySearch()),T(this,s,N(()=>{if(this.selectMultiple()&&this.hasSearch())return;let a=this.selectedOptions(),c=this.value(),p=a.map(g=>c?x(this,i,X).call(this,g,c):g).join(",");this.inputValue.set(p)}))}ngOnInit(){this.setInitInput()}setInitInput(){let a=h(this,e).nativeElement.querySelector("input");if(a){this.inputRefInput.set(new $(a));return}let c=h(this,e).nativeElement.querySelector("textarea");if(c){this.inputRefInput.set(new $(c));return}typeof MutationObserver<"u"&&h(this,o).observe(h(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(a){let c=this.options()||[],p=this.value(),g=this.selectMultiple(),y=a.toString().split(",");if(y.length===0){this.selectedOptions.set([]);return}let C=g?y:[y[0]],k=c.filter(M=>{let V=p?x(this,i,X).call(this,M,p)?.toString():M?.toString();return V&&C.includes(V)});this.selectedOptions.set(g?k:[k[0]])}setInputValueFromSelectedOptions(){let a=this.selectedOptions(),c=this.value();if(a.length===0){this.inputValue.set(""),this.updateInputElValue();return}let p=a.map(g=>c?x(this,i,X).call(this,g,c):g).join(",");this.inputValue.set(p),this.updateInputElValue()}getLabel(a){let c=this.label();return c?x(this,i,X).call(this,a,c):a}toggleOptionByIndex(a,c){let p=this.filteredOptions()[a];if(this.asFreeText()&&a===-1||!p){this.close();return}c&&c.stopPropagation();let g=this.selectMultiple(),y=this._isClearable(),C=this.value(),k=this.selectedOptionValues(),M=C?x(this,i,X).call(this,p,C):p;this.prevInputValue.set(null),this.selectedOptions.update(V=>{let Q=k.indexOf(M);if(Q>-1){let J=[...V.slice(0,Q),...V.slice(Q+1)];return y||J.length>0?J:V}else return this.focusedOptionIndex.set(a),g?[...V,p]:[p]}),g?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),g&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(a,c){a.stopPropagation(),this.selectedOptions.update(p=>[...p.slice(0,c),...p.slice(c+1)]),this.setInputValueFromSelectedOptions()}isSelected(a){let c=this.value(),p=this.filteredOptions()[a],g=c?x(this,i,X).call(this,p,c):p;return this.selectedOptionValues().indexOf(g)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||x(this,i,Qe).call(this))}close(){this.isOpen.set(!1);let a=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&a&&(this.inputValue.set(a),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(a){a?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let a=this.inputRefEl(),c=this.inputValue();a&&(a.value=c,a.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&h(this,o).disconnect()}};e=new WeakMap,o=new WeakMap,i=new WeakSet,$e=function(a,c){if(!c)return 0;let p=0,g=-1,y=0,C=!0;for(let k=0;k<c.length;k++){let M=c[k];if(a.length>g+1&&a[g+1]===M)p+=k===0?100:150,g++,y++;else{let V=a.indexOf(M,g+1);if(k>0&&(C=!1),V===-1)return 0;p+=100,g=V,y++}}return C&&c.length===y&&(p+=1e3),p+=y*20,p},s=new WeakMap,Qe=function(){let a=this.selectedOptionValues()[0],c=this.value();if(a){let p=this.filteredOptions().findIndex(g=>c?x(this,i,X).call(this,g,c)===a:g===a);this.focusedOptionIndex.set(p)}else this.focusedOptionIndex.set(-1)},X=function(a,c){return c.split(".").reduce((p,g)=>p?.[g],a)},kt=function(a){Object.defineProperty(a,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").get.call(this)},set(c){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").set.call(this,c);let g=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:c}});return this.dispatchEvent(g),c}})},wt=function(a){let c=(a??"").toLowerCase(),p="^";for(let g of c)p+=".*"+x(this,i,xt).call(this,g);return p+=".*$",new RegExp(p,"i")},xt=function(a){return a.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},m.\u0275fac=function(c){return new(c||m)},m.\u0275cmp=A({type:m,selectors:[["spk-select"]],contentQueries:function(c,p,g){c&1&&ot(g,p.inlineTemplate,_e,5),c&2&&se()},viewQuery:function(c,p){c&1&&te(p.optionsWrapRef,ti,5),c&2&&se()},hostVars:2,hostBindings:function(c,p){c&2&&z("multiple",p.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:ni,decls:28,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(c,p){if(c&1){let g=ee();j(ii),lt(0)(1)(2)(3)(4)(5),_(6,"spk-popover",2,0),Be("isOpenChange",function(C){return H(g),je(p.isOpen,C)||(p.isOpen=C),L(C)}),B("closed",function(){return H(g),L(p.close())}),_(8,"spk-form-field",3),B("click",function(){return H(g),L(p.open())}),D(9,0,["ngProjectAs","label",5,["label"]]),_(10,"div",4)(11,"div",5),W(12,oi,1,1)(13,vi,2,0)(14,yi,2,1),D(15,1),D(16,2),S()(),W(17,ki,2,0,"spk-icon",6)(18,wi,1,0,"spk-spinner",7)(19,xi,2,0,"spk-icon",6)(20,Di,2,0,"spk-icon",6)(21,Oi,2,0,"spk-icon",6)(22,bi,2,0,"spk-icon",6)(23,Ei,2,0,"spk-icon",6),S(),_(24,"div",8,1),Ae(26,Vi,4,6,"li",9,Pe),S()()}if(c&2){le(p.placeholderTemplate());let g=p.optionTemplate(),y=p.selectedOptionTemplate(),C=p.inlineTemplate();E();let k=le(p.selectedOptions()),M=p.inputState();E(),le(y||g||C),E(),le(g||C),E();let V=le(!p.asText()&&p.selectMultiple());E();let Q=le(p.isOpen()&&p.hasSearch()&&(V||p.inputValue().length>0));E(),Le("isOpen",p.isOpen),re("disableOpenByClick",!0)("options",We(21,si)),E(2),z("stretch",p.stretch())("small",p.small())("readonly",p.readonly()||p.disabled()),E(2),z("show-search-text",Q),E(),z("is-selected",M==="selected"),E(),q(p.asFreeText()&&p.inputValue().length>0&&!p.isOpen()?12:k.length>0?13:Q?-1:14),E(5),q(M==="closed"?17:M==="loading"?18:M==="open-searching"?19:M==="searching"?20:M==="selected"&&p._isClearable()?21:M==="selected"&&!p._isClearable()?22:23),E(9),Fe(p.filteredOptions())}},dependencies:[dt,ft,Ge,ue,Zi,on,en],encapsulation:2,changeDetection:0});let t=m;return t})(),Bn=(()=>{var e,o,i,xe,De;let u=class u{constructor(){b(this,i);b(this,e);b(this,o);T(this,e,P(be,{optional:!0})),T(this,o,I(h(this,e)?.sidenavType)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=w(!1),this.isOpen=U(!1),this.type=w(void 0),this._type=F(()=>this.type()?this.type():h(this,e)?.sidenavType),this.dragImageElement=ie.required("dragImageElement"),this.dragIsEnding=I(!1),this.dragIsOnScreen=I(!0),this.isDragging=I(!1),this.dragPositionX=I(0),this.dragActualPositionX=F(()=>{let l=this.dragPositionX(),r=.32;return l>this.openWidthTreshold?this.openWidthTreshold+(l-this.openWidthTreshold)*r:l}),this.draggingStyle=F(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=N(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(l){l.stopPropagation(),x(this,i,xe).call(this,l.clientX)}dragEnd(l){(l.clientX<0||!this.dragIsOnScreen())&&x(this,i,xe).call(this,0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(l){l.preventDefault(),x(this,i,De).call(this,l)}dragStart(l){l.stopPropagation(),this.isDragging.set(!0),x(this,i,De).call(this,l)}drag(l){l.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(l.clientX)}),x(this,i,De).call(this,l)}touchStart(l){l.stopPropagation(),this.isDragging.set(!0)}touchMove(l){l.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(l.touches[0].clientX)})}touchEnd(l){l.stopPropagation(),x(this,i,xe).call(this,l.changedTouches[0].clientX)}touchCancel(l){l.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,xe=function(l){this.isDragging.set(!1),l<=0?this.isOpen.set(!1):l>this.openWidthTreshold?this.isOpen.set(!0):l<this.openWidthTreshold&&(!this.isOpen()&&l<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))},De=function(l){l.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)},u.\u0275fac=function(r){return new(r||u)},u.\u0275cmp=A({type:u,selectors:[["spk-sidenav"]],viewQuery:function(r,d){r&1&&te(d.dragImageElement,Pi,5),r&2&&se()},hostVars:8,hostBindings:function(r,d){r&2&&(oe(d._type()),z("open",d.isOpen())("closed",!d.isOpen())("is-dragging",d.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Fi,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(r,d){r&1&&(j(Ai),W(0,Hi,2,0,"div",1),W(1,Li,1,0,"div",2),_(2,"div",3),D(3),S(),_(4,"div",4),W(5,ji,1,0,"div",5),_(6,"div",6),D(7,1),S(),_(8,"main"),D(9,2),S()()),r&2&&(q(d.type()==="overlay"?0:-1),E(),q(d.type()==="overlay"&&d.isDragging()?1:-1),E(3),G("transform",d.draggingStyle()),E(),q(d.type()==="overlay"&&!d.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let t=u;return t})();var Wn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-stepper"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var qn=(()=>{var e;let o=class o{constructor(){b(this,e);T(this,e,P(rn)),this.spkSort=w(),this.sortAsc=F(()=>{let n=h(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===s}),this.sortDesc=F(()=>{let n=h(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===`-${s}`})}toggleSort(){let n=this.spkSort();n&&h(this,e).toggleSort(n)}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275dir=Se({type:o,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(s,u){s&1&&B("mousedown",function(){return u.toggleSort()}),s&2&&z("sort-asc",u.sortAsc())("sort-desc",u.sortDesc())},inputs:{spkSort:[1,"spkSort"]}});let t=o;return t})();var de=1.5,rn=(()=>{var e,o,i,n,s,Oe;let f=class f{constructor(){b(this,s);b(this,e);b(this,o);b(this,i);b(this,n);T(this,e,P($)),T(this,o,P(be,{optional:!0})),this.loading=w(!1),this.data=w([]),this.dataChange=ce(),this.sortByColumn=U(null),this.thead=ie("thead"),this.columns=vt(this.thead,["TH"]),this.class=I(h(this,o)?.tableType??"default"),this.resizing=I(!1),this.sizeTrigger=I(!0),T(this,i,null),T(this,n,I(!1)),this.scrollXState=I(-1),this.scrollYState=I(-1),this.canScrollX=I(!1),this.canScrollY=I(!1),this.columnSizes=F(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,m,v)=>{let a=m,c=v===r.length-1;return a.dataset?.size?`${d} ${a.dataset.size}`:a.classList.contains("sticky")||a.classList.contains("sticky-end")?`${d} min-content`:c?`${d} 1fr`:`${d} 1fr`},"")}),this.e=N(()=>{let r=this.sortByColumn();if(r===null)return h(this,n).call(this)||(T(this,i,this.data()),h(this,n).set(!0)),this.dataChange.emit(structuredClone(h(this,i)));let d=r.startsWith("-")?r.slice(1):r,m=r.startsWith("-"),v=this.data().sort((a,c)=>{let p=a[d],g=c[d],y=0;return typeof p=="number"&&typeof g=="number"&&(y=p-g),p instanceof Date&&g instanceof Date&&(y=p.getTime()-g.getTime()),typeof p=="string"&&typeof g=="string"&&(y=p.localeCompare(g,void 0,{sensitivity:"base"})),m?-y:y});this.dataChange.emit(v)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){x(this,s,Oe).call(this)}onResize(r){x(this,s,Oe).call(this)}ngAfterViewInit(){queueMicrotask(()=>x(this,s,Oe).call(this))}toggleSort(r){let d=this.sortByColumn(),m=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(m)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,Oe=function(){let r=h(this,e).nativeElement,d=-1,m=-1,v=r.scrollWidth>r.clientWidth+de;if(v){let c=r.scrollLeft<=de;r.scrollWidth-(r.scrollLeft+r.clientWidth)<de?d=1:c||(d=0)}this.scrollXState.set(d),this.canScrollX.set(v);let a=r.scrollHeight>r.clientHeight+de;if(a){let c=r.scrollTop<=de;r.scrollHeight-(r.scrollTop+r.clientHeight)<de?m=1:c||(m=0)}this.scrollYState.set(m),this.canScrollY.set(a)},f.\u0275fac=function(d){return new(d||f)},f.\u0275cmp=A({type:f,selectors:[["spk-table"]],viewQuery:function(d,m){d&1&&te(m.thead,Bi,5),d&2&&se()},hostVars:18,hostBindings:function(d,m){d&1&&B("scroll",function(){return m.onScroll()})("resize",function(a){return m.onResize(a)},it),d&2&&(oe(m.class()),G("grid-template-columns",m.columnSizes()),z("resizing",m.resizing())("can-scroll-x",m.canScrollX())("can-scroll-y",m.canScrollY())("scrolled-x",m.scrollXState()>=0)("scrolled-x-end",m.scrollXState()===1)("scrolled-y",m.scrollYState()>=0)("scrolled-y-end",m.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:qi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,m){d&1&&(j(Wi),_(0,"thead",null,0),D(2),W(3,zi,1,0,"spk-progress-bar",1),S(),_(4,"tbody"),D(5,1),S(),W(6,Ni,2,0,"div",2)),d&2&&(E(3),q(m.loading()?3:-1),E(3),q(m.loading()?-1:6))},dependencies:[sn],encapsulation:2,changeDetection:0});let t=f;return t})(),zn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-tabs"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(j(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Nn=(()=>{let e=class e{constructor(){this.isActive=U(!1),this.disallowToggle=w(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(n,s){n&2&&z("active",s.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:$i,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(n,s){n&1&&(j(Ui),_(0,"h3",0),B("click",function(){return s.disallowToggle()||s.toggle()}),D(1,0,null,Qi,1,0),W(3,Yi,2,0,"spk-icon",1),S(),_(4,"div",2)(5,"div",3),D(6,1),S()()),n&2&&(E(3),q(s.disallowToggle()?-1:3))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})(),Un=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=A({type:e,selectors:[["spk-toggle"]],ngContentSelectors:Y,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(n,s){n&1&&(j(),_(0,"div",0),Z(1,"div",1),S(),D(2))},encapsulation:2,changeDetection:0});let t=e;return t})();var $n=(()=>{let e=class e{constructor(){this.filesOver=I(!1),this.filesDropped=ce()}onDragOver(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!0)}onDragLeave(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1)}ondrop(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1);let n=i.dataTransfer?.files;n&&n.length>0&&this.filesDropped.emit(n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Se({type:e,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(n,s){n&1&&B("dragover",function(f){return s.onDragOver(f)})("dragleave",function(f){return s.onDragLeave(f)})("drop",function(f){return s.ondrop(f)}),n&2&&z("filesover",s.filesOver())},outputs:{filesDropped:"filesDropped"}});let t=e;return t})();var an=(()=>{var e,o,i;let n=class n{constructor(){b(this,e);b(this,o);b(this,i);this.positionAnchorName=w.required(),this.anchorEl=w.required(),this.isOpen=w(!1),T(this,e,P($)),T(this,o,P(me)),T(this,i,null),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=I(!1),this.openEffect=N(()=>{this.isOpen()?setTimeout(()=>{h(this,e).nativeElement.showPopover(),this.calculateTooltipPosition()}):h(this,e).nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let u=this.anchorEl().nativeElement.getBoundingClientRect(),f=h(this,e).nativeElement,l=f.getBoundingClientRect();if(!(l.width===0&&l.height===0))if(this.SUPPORTS_ANCHOR)this.isBelow.set(u.top<l.bottom);else{let r=u.top-l.height<0,d=u.top-l.height,m=u.left+u.width/2-l.width/2;r?(d=u.top+u.height,this.isBelow.set(!0)):this.isBelow.set(!1),m+l.width>window?.innerWidth&&(m=u.right-l.width/2),m<0&&(m=-(l.width/2)),h(this,o).setStyle(f,"left",`${m}px`),h(this,o).setStyle(f,"top",`${d}px`),h(this,o).setStyle(f,"position","fixed")}},Re(()=>{T(this,i,new AbortController);let u={signal:h(this,i).signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,u),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:h(this,i).signal}),setTimeout(()=>this.calculateTooltipPosition())})}ngOnDestroy(){h(this,i)?.abort()}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n.\u0275fac=function(f){return new(f||n)},n.\u0275cmp=A({type:n,selectors:[["sparkle-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(f,l){f&2&&(Ve("popover","auto"),G("position-anchor",l.positionAnchorName()),z("below",l.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(f,l){f&1&&(j(),_(0,"div",0),D(1),S())},encapsulation:2});let t=n;return t})(),Qn=(()=>{var e,o,i,n,s,u;let f=class f{constructor(){b(this,e);b(this,o);b(this,i);b(this,n);b(this,s);b(this,u);this.spkTooltip=w.required(),T(this,e,P($)),T(this,o,P(nt)),T(this,i,P(et)),T(this,n,P(me)),T(this,s,null),T(this,u,null),this.anchorName=`--${Xe()}`,this.isOpen=I(!1)}onMouseEnter(){this.showTooltip()}onMouseLeave(){this.cleanupTooltip()}ngOnDestroy(){this.cleanupTooltip()}showTooltip(){if(h(this,s)||!this.spkTooltip())return;this.isOpen.set(!0);let r,d=this.spkTooltip();if(typeof d=="string")r=[[h(this,n).createText(d)]];else if(d instanceof _e)T(this,u,d.createEmbeddedView({})),h(this,u).detectChanges(),r=[h(this,u).rootNodes];else return;T(this,s,h(this,o).createComponent(an,{environmentInjector:h(this,i),projectableNodes:r})),h(this,s).setInput("positionAnchorName",this.anchorName),h(this,s).setInput("anchorEl",h(this,e)),h(this,s).setInput("isOpen",this.isOpen),h(this,s).changeDetectorRef.detectChanges()}cleanupTooltip(){this.isOpen.set(!1),h(this,s)&&(h(this,s).destroy(),T(this,s,null)),h(this,u)&&(h(this,u).destroy(),T(this,u,null))}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,u=new WeakMap,f.\u0275fac=function(d){return new(d||f)},f.\u0275dir=Se({type:f,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(d,m){d&1&&B("mouseenter",function(){return m.onMouseEnter()})("mouseleave",function(){return m.onMouseLeave()}),d&2&&(G("anchor-name",m.anchorName),z("active",m.isOpen()))},inputs:{spkTooltip:[1,"spkTooltip"]}});let t=f;return t})();export{ue as a,En as b,Tn as c,Ki as d,Mn as e,In as f,Ji as g,Rn as h,Zi as i,en as j,Vn as k,Ge as l,Pn as m,An as n,Fn as o,sn as p,Hn as q,Ln as r,on as s,jn as t,Bn as u,Wn as v,qn as w,rn as x,zn as y,Nn as z,Un as A,$n as B,Qn as C};
|